]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/gcc/config/i386/mingw32.h
This commit was generated by cvs2svn to compensate for changes in r55099,
[FreeBSD/FreeBSD.git] / contrib / gcc / config / i386 / mingw32.h
1 /* Operating system specific defines to be used when targeting GCC for
2    hosting on Windows32, using GNU tools and the Windows32 API Library,
3    as distinct from winnt.h, which is used to build GCC for use with a
4    windows style library and tool set and uses the Microsoft tools.
5    Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
6
7 This file is part of GNU CC.
8
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING.  If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
23
24 /* Most of this is the same as for cygwin, except for changing some
25    specs.  */
26
27 #include "i386/cygwin.h"
28
29 /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The
30    only difference between the two should be __MSVCRT__ needed to 
31    distinguish MSVC from CRTDLL runtime in mingw headers. */
32 #undef CPP_PREDEFINES
33 #define CPP_PREDEFINES "-Di386 -D_WIN32 -DWIN32 -D__WIN32__ \
34   -D__MINGW32__=0.2 -D__MSVCRT__ -DWINNT  -D_X86_=1 -D__STDC__=1\
35   -D__stdcall=__attribute__((__stdcall__)) \
36   -D_stdcall=__attribute__((__stdcall__)) \
37   -D__cdecl=__attribute__((__cdecl__)) \
38   -D__declspec(x)=__attribute__((x)) \
39   -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
40
41 /* Specific a different directory for the standard include files.  */
42 #undef STANDARD_INCLUDE_DIR
43 #define STANDARD_INCLUDE_DIR "/usr/local/i386-mingw32/include"
44
45 #define STANDARD_INCLUDE_COMPONENT "MINGW32"
46
47 #undef CPP_SPEC
48 #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
49
50 /* For Windows applications, include more libraries, but always include
51    kernel32.  */
52 #undef LIB_SPEC
53 #define LIB_SPEC "%{mwindows:-lgdi32 -lcomdlg32} \
54                   -luser32 -lkernel32 -ladvapi32 -lshell32"
55
56 /* Include in the mingw32 libraries with libgcc */
57 #undef LIBGCC_SPEC
58 #define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lmsvcrt"
59
60 #undef STARTFILE_SPEC
61 #define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
62
63 /* MS runtime does not need a separate math library. */
64 #define MATH_LIBRARY ""
65
66 /* Output STRING, a string representing a filename, to FILE.  We canonicalize
67    it to be in MS-DOS format.  */
68 #define OUTPUT_QUOTED_STRING(FILE, STRING) \
69 do {                                            \
70   char c;                                       \
71                                                 \
72   putc ('\"', asm_file);                        \
73   if (STRING[1] == ':'                          \
74       && (STRING[2] == '/' || STRING[2] == '\\')) \
75     {                                           \
76       putc ('/', asm_file);                     \
77       putc ('/', asm_file);                     \
78       putc (*string, asm_file);                 \
79       string += 2;                              \
80     }                                           \
81                                                 \
82   while ((c = *string++) != 0)                  \
83     {                                           \
84       if (c == '\\')                            \
85         c = '/';                                \
86                                                 \
87       if (c == '\"')                            \
88         putc ('\\', asm_file);                  \
89       putc (c, asm_file);                       \
90     }                                           \
91                                                 \
92   putc ('\"', asm_file);                        \
93 } while (0)
94