* pretty-print.c (pp_base_maybe_space): New function.
[official-gcc.git] / gcc / config / i386 / mingw32.h
blob4bf0dda1d98d3cc09b61fa39161f2899632b4a78
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 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 #undef TARGET_VERSION
24 #define TARGET_VERSION fprintf (stderr, " (x86 MinGW)");
26 /* See i386/crtdll.h for an alternative definition. */
27 #define EXTRA_OS_CPP_BUILTINS() \
28 do \
29 { \
30 builtin_define ("__MSVCRT__"); \
31 builtin_define ("__MINGW32__"); \
32 builtin_define ("_WIN32"); \
33 builtin_define_std ("WIN32"); \
34 builtin_define_std ("WINNT"); \
35 } \
36 while (0)
38 /* Override the standard choice of /usr/include as the default prefix
39 to try when searching for header files. */
40 #undef STANDARD_INCLUDE_DIR
41 #define STANDARD_INCLUDE_DIR "/mingw/include"
42 #undef STANDARD_INCLUDE_COMPONENT
43 #define STANDARD_INCLUDE_COMPONENT "MINGW"
45 #undef CPP_SPEC
46 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT}"
48 /* For Windows applications, include more libraries, but always include
49 kernel32. */
50 #undef LIB_SPEC
51 #define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
52 -luser32 -lkernel32 -ladvapi32 -lshell32"
54 /* Include in the mingw32 libraries with libgcc */
55 #undef LINK_SPEC
56 #define LINK_SPEC "%{mwindows:--subsystem windows} \
57 %{mconsole:--subsystem console} \
58 %{shared: %{mdll: %eshared and mdll are not compatible}} \
59 %{shared: --shared} %{mdll:--dll} \
60 %{static:-Bstatic} %{!static:-Bdynamic} \
61 %{shared|mdll: -e _DllMainCRTStartup@12}"
63 /* Include in the mingw32 libraries with libgcc */
64 #undef LIBGCC_SPEC
65 #define LIBGCC_SPEC \
66 "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt"
68 #undef STARTFILE_SPEC
69 #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
70 %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s}"
72 /* An additional prefix to try after the standard prefixes. */
73 #undef MD_STARTFILE_PREFIX
74 #define MD_STARTFILE_PREFIX "/mingw/lib/"
76 /* Output STRING, a string representing a filename, to FILE.
77 We canonicalize it to be in Unix format (backslashes are replaced
78 forward slashes. */
79 #undef OUTPUT_QUOTED_STRING
80 #define OUTPUT_QUOTED_STRING(FILE, STRING) \
81 do { \
82 char c; \
84 putc ('\"', asm_file); \
86 while ((c = *string++) != 0) \
87 { \
88 if (c == '\\') \
89 c = '/'; \
91 if (ISPRINT (c)) \
92 { \
93 if (c == '\"') \
94 putc ('\\', asm_file); \
95 putc (c, asm_file); \
96 } \
97 else \
98 fprintf (asm_file, "\\%03o", (unsigned char) c); \
99 } \
101 putc ('\"', asm_file); \
102 } while (0)
104 /* Define as short unsigned for compatibility with MS runtime. */
105 #undef WINT_TYPE
106 #define WINT_TYPE "short unsigned int"