cppfiles.c (INO_T_EQ): Handle UWIN.
[platform/upstream/gcc.git] / gcc / config / i386 / uwin.h
1 /* Operating system specific defines to be used when targeting GCC for
2    hosting on U/WIN (Windows32), using GNU tools and the Windows32 API 
3    Library, as distinct from winnt.h, which is used to build GCC for use 
4    with a windows style library and tool set and uses the Microsoft tools.
5    Copyright (C) 1999 Free Software Foundation, Inc.
6    Contributed by Mumit Khan  <khan@xraylith.wisc.edu>.
7
8 This file is part of GNU CC.
9
10 GNU CC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 GNU CC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with GNU CC; see the file COPYING.  If not, write to
22 the Free Software Foundation, 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
24
25 /* Most of this is the same as for Cygwin32, except for changing some
26    specs.  */
27
28 #include "i386/cygwin.h"
29
30 #define STANDARD_INCLUDE_COMPONENT "UWIN"
31 #define SYSTEM_INCLUDE_DIR "/usr/gnu/include"
32
33 #undef CPP_PREDEFINES
34 #define CPP_PREDEFINES "-D__i386__ -D_WIN32 -D__WIN32__ \
35   -D_UWIN -DWINNT  -D_X86_=1 -D__STDC__=1 \
36   -D__UWIN__ -D__MSVCRT__ \
37   -D_STD_INCLUDE_DIR=mingw32 \
38   -D__stdcall=__attribute__((__stdcall__)) \
39   _D_stdcall=__attribute__((__stdcall__)) \
40   -D__cdecl=__attribute__((__cdecl__)) \
41   -D__declspec(x)=__attribute__((x)) \
42   -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
43
44 #undef CPP_SPEC
45 #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
46   -include /usr/include/astwin32.h \
47   -iprefix /usr/gnu/include -iwithprefix /mingw32"
48
49 /* For Windows applications, include more libraries, but always include
50    kernel32.  */
51 #undef LIB_SPEC
52 #define LIB_SPEC \
53   "%{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 -ladvapi32"
54
55 /* This is needed in g77spec.c for now. Will be removed in the future. */
56 #define WIN32_UWIN_TARGET 1
57
58 /* Include in the mingw32 libraries with libgcc */
59 #undef LIBGCC_SPEC
60 #define LIBGCC_SPEC "-lgnuwin -lposix -lgcc -last -lmoldname -lmsvcrt"
61
62 /* Specify a different entry point when linking a DLL */
63 #undef LINK_SPEC
64 #define LINK_SPEC \
65   "%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMainCRTStartup@12}"
66
67 #undef STARTFILE_SPEC
68 #define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
69
70 /* These are PE BFD bug workarounds. Should go away eventually. */
71
72 #undef ASM_DECLARE_FUNCTION_NAME
73 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)                     \
74   do                                                                    \
75     {                                                                   \
76       if (i386_pe_dllexport_name_p (NAME))                              \
77         {                                                               \
78           drectve_section ();                                           \
79           fprintf ((FILE), "\t.ascii \" -export:%s\"\n",                \
80                    I386_PE_STRIP_ENCODING (NAME));                      \
81           function_section (DECL);                                      \
82         }                                                               \
83       /* disable i386_pe_declare_function_type for UWIN */              \
84       if (0 && write_symbols != SDB_DEBUG)                              \
85         i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \
86       ASM_OUTPUT_LABEL (FILE, NAME);                                    \
87     }                                                                   \
88   while (0)
89
90 #undef ASM_OUTPUT_EXTERNAL
91 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
92 #undef ASM_FILE_END
93