PR c/4157
[official-gcc.git] / gcc / config / i386 / cygwin.h
blob168b46e48708e36f32432ef335c59ffaedb37210
1 /* Operating system specific defines to be used when targeting GCC for
2 hosting on Windows32, using a Unix style C library and tools.
3 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
4 Free Software Foundation, Inc.
6 This file is part of GNU CC.
8 GNU CC 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 GNU CC 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 GNU CC; 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 #define YES_UNDERSCORES
25 #define DBX_DEBUGGING_INFO
26 #define SDB_DEBUGGING_INFO
27 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
29 #include <stdio.h> /* Required for FILE use below */
30 #include "i386/gas.h"
31 #include "dbxcoff.h"
33 /* Augment TARGET_SWITCHES with the cygwin/no-cygwin options. */
34 #define MASK_WIN32 0x40000000 /* Use -lming32 interface */
35 #define MASK_CYGWIN 0x20000000 /* Use -lcygwin interface */
36 #define MASK_WINDOWS 0x10000000 /* Use windows interface */
37 #define MASK_DLL 0x08000000 /* Use dll interface */
38 #define MASK_NOP_FUN_DLLIMPORT 0x20000 /* Ignore dllimport for functions */
40 #define TARGET_WIN32 (target_flags & MASK_WIN32)
41 #define TARGET_CYGWIN (target_flags & MASK_CYGWIN)
42 #define TARGET_WINDOWS (target_flags & MASK_WINDOWS)
43 #define TARGET_DLL (target_flags & MASK_DLL)
44 #define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT)
46 #undef SUBTARGET_SWITCHES
47 #define SUBTARGET_SWITCHES \
48 { "cygwin", MASK_CYGWIN, \
49 N_("Use the Cygwin interface") }, \
50 { "no-cygwin", MASK_WIN32, \
51 N_("Use the Mingw32 interface") }, \
52 { "windows", MASK_WINDOWS, N_("Create GUI application") }, \
53 { "no-win32", -MASK_WIN32, N_("Don't set Windows defines") },\
54 { "win32", 0, N_("Set Windows defines") }, \
55 { "console", -MASK_WINDOWS, \
56 N_("Create console application") }, \
57 { "dll", MASK_DLL, N_("Generate code for a DLL") }, \
58 { "nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, \
59 N_("Ignore dllimport for functions") }, \
60 { "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \
61 { "threads", 0, N_("Use Mingw-specific thread support") },
63 #undef CPP_PREDEFINES
64 #define CPP_PREDEFINES "-D_X86_=1 -Asystem=winnt"
66 #ifdef CROSS_COMPILE
67 #define CYGWIN_INCLUDES "-idirafter " CYGWIN_CROSS_DIR "/include"
68 #define W32API_INC "-idirafter " CYGWIN_CROSS_DIR "/include/w32api"
69 #define W32API_LIB "-L" CYGWIN_CROSS_DIR "/lib/w32api/"
70 #define CYGWIN_LIB CYGWIN_CROSS_DIR "/lib"
71 #define MINGW_LIBS "-L" CYGWIN_CROSS_DIR "/lib/mingw"
72 #define MINGW_INCLUDES "-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++-3 "\
73 "-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++ "\
74 "-idirafter " CYGWIN_CROSS_DIR "/include/mingw"
75 #else
76 #define CYGWIN_INCLUDES "-isystem /usr/local/include -idirafter /usr/include"
77 #define W32API_INC "-idirafter /usr/include/w32api"
78 #define W32API_LIB "-L/usr/lib/w32api/"
79 #define CYGWIN_LIB "/usr/lib"
80 #define MINGW_LIBS "-L/usr/local/lib/mingw -L/usr/lib/mingw"
81 #define MINGW_INCLUDES "-isystem /usr/include/mingw/g++-3 "\
82 "-isystem /usr/include/mingw/g++ "\
83 "-isystem /usr/local/include/mingw " \
84 "-idirafter /usr/include/mingw"
85 #endif
87 /* Support the __declspec keyword by turning them into attributes.
88 We currently only support: dllimport and dllexport.
89 Note that the current way we do this may result in a collision with
90 predefined attributes later on. This can be solved by using one attribute,
91 say __declspec__, and passing args to it. The problem with that approach
92 is that args are not accumulated: each new appearance would clobber any
93 existing args. */
95 #undef CPP_SPEC
96 #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
97 -D__stdcall=__attribute__((__stdcall__)) \
98 -D__cdecl=__attribute__((__cdecl__)) \
99 %{!ansi:-D_stdcall=__attribute__((__stdcall__)) \
100 -D_cdecl=__attribute__((__cdecl__))} \
101 -D__declspec(x)=__attribute__((x)) \
102 -D__i386__ -D__i386 \
103 %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \
104 %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{mthreads:-D_MT} "\
105 MINGW_INCLUDES "} \
106 %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix "\
107 CYGWIN_INCLUDES "}\
108 %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT}\
109 %{!mno-win32:" W32API_INC "}\
112 #undef STARTFILE_SPEC
113 #define STARTFILE_SPEC "\
114 %{shared|mdll: %{mno-cygwin:" MINGW_LIBS " mingw/dllcrt2%O%s}}\
115 %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:" MINGW_LIBS " mingw/crt2%O%s}\
116 %{pg:gcrt0%O%s}}}\
119 /* Normally, -lgcc is not needed since everything in it is in the DLL, but we
120 want to allow things to be added to it when installing new versions of
121 GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled
122 by calling the init function from the prologue. */
124 #undef LIBGCC_SPEC
125 #define LIBGCC_SPEC "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmsvcrt}"
127 /* This macro defines names of additional specifications to put in the specs
128 that can be used in various specifications like CC1_SPEC. Its definition
129 is an initializer with a subgrouping for each command option.
131 Each subgrouping contains a string constant, that defines the
132 specification name, and a string constant that used by the GNU CC driver
133 program.
135 Do not define this macro if it does not need to do anything. */
137 #undef SUBTARGET_EXTRA_SPECS
138 #define SUBTARGET_EXTRA_SPECS \
139 { "mingw_include_path", DEFAULT_TARGET_MACHINE }
141 /* We have to dynamic link to get to the system DLLs. All of libc, libm and
142 the Unix stuff is in cygwin.dll. The import library is called
143 'libcygwin.a'. For Windows applications, include more libraries, but
144 always include kernel32. We'd like to specific subsystem windows to
145 ld, but that doesn't work just yet. */
147 #undef LIB_SPEC
148 #define LIB_SPEC "\
149 %{pg:-lgmon} \
150 %{!mno-cygwin:-lcygwin} \
151 %{mno-cygwin:%{mthreads:-lmingwthrd} -lmingw32} \
152 %{mwindows:-lgdi32 -lcomdlg32} \
153 -luser32 -lkernel32 -ladvapi32 -lshell32"
155 #define LINK_SPEC W32API_LIB "\
156 %{mwindows:--subsystem windows} \
157 %{mconsole:--subsystem console} \
158 %{shared: %{mdll: %eshared and mdll are not compatible}} \
159 %{shared: --shared} %{mdll:--dll} \
160 %{static:-Bstatic} %{!static:-Bdynamic} \
161 %{shared|mdll: -e \
162 %{mno-cygwin:_DllMainCRTStartup@12} \
163 %{!mno-cygwin:__cygwin_dll_entry@12}}\
164 --dll-search-prefix=cyg"
166 #undef MATH_LIBRARY
167 #define MATH_LIBRARY ""
169 #define SIZE_TYPE "unsigned int"
170 #define PTRDIFF_TYPE "int"
171 #define WCHAR_UNSIGNED 1
172 #define WCHAR_TYPE_SIZE 16
173 #define WCHAR_TYPE "short unsigned int"
176 /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */
177 #define HANDLE_PRAGMA_PACK_PUSH_POP 1
179 /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
180 is a valid machine specific attribute for DECL.
181 The attributes in ATTRIBUTES have previously been assigned to DECL. */
183 union tree_node;
184 #define TREE union tree_node *
186 #undef VALID_MACHINE_DECL_ATTRIBUTE
187 #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
188 i386_pe_valid_decl_attribute_p (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
189 extern int i386_pe_valid_decl_attribute_p PARAMS ((TREE, TREE, TREE, TREE));
191 /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
192 is a valid machine specific attribute for TYPE.
193 The attributes in ATTRIBUTES have previously been assigned to TYPE. */
195 #undef VALID_MACHINE_TYPE_ATTRIBUTE
196 #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
197 i386_pe_valid_type_attribute_p (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)
198 extern int i386_pe_valid_type_attribute_p PARAMS ((TREE, TREE, TREE, TREE));
200 extern union tree_node *i386_pe_merge_decl_attributes PARAMS ((TREE, TREE));
201 #define MERGE_MACHINE_DECL_ATTRIBUTES(OLD, NEW) \
202 i386_pe_merge_decl_attributes ((OLD), (NEW))
203 extern TREE i386_pe_merge_decl_attributes PARAMS ((TREE, TREE));
205 /* Used to implement dllexport overriding dllimport semantics. It's also used
206 to handle vtables - the first pass won't do anything because
207 DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0.
208 It's also used to handle dllimport override semantics. */
209 #if 0
210 #define REDO_SECTION_INFO_P(DECL) \
211 ((DECL_MACHINE_ATTRIBUTES (DECL) != NULL_TREE) \
212 || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL)))
213 #else
214 #define REDO_SECTION_INFO_P(DECL) 1
215 #endif
218 #undef EXTRA_SECTIONS
219 #define EXTRA_SECTIONS in_ctor, in_dtor, in_drectve
221 #undef EXTRA_SECTION_FUNCTIONS
222 #define EXTRA_SECTION_FUNCTIONS \
223 CTOR_SECTION_FUNCTION \
224 DTOR_SECTION_FUNCTION \
225 DRECTVE_SECTION_FUNCTION \
226 SWITCH_TO_SECTION_FUNCTION
228 #define CTOR_SECTION_FUNCTION \
229 void \
230 ctor_section () \
232 if (in_section != in_ctor) \
234 fprintf (asm_out_file, "\t.section .ctor\n"); \
235 in_section = in_ctor; \
238 void ctor_section PARAMS ((void));
240 #define DTOR_SECTION_FUNCTION \
241 void \
242 dtor_section () \
244 if (in_section != in_dtor) \
246 fprintf (asm_out_file, "\t.section .dtor\n"); \
247 in_section = in_dtor; \
250 void dtor_section PARAMS ((void));
252 #define DRECTVE_SECTION_FUNCTION \
253 void \
254 drectve_section () \
256 if (in_section != in_drectve) \
258 fprintf (asm_out_file, "%s\n", "\t.section .drectve\n"); \
259 in_section = in_drectve; \
262 void drectve_section PARAMS ((void));
264 /* Switch to SECTION (an `enum in_section').
266 ??? This facility should be provided by GCC proper.
267 The problem is that we want to temporarily switch sections in
268 ASM_DECLARE_OBJECT_NAME and then switch back to the original section
269 afterwards. */
270 #define SWITCH_TO_SECTION_FUNCTION \
271 void switch_to_section PARAMS ((enum in_section, tree)); \
272 void \
273 switch_to_section (section, decl) \
274 enum in_section section; \
275 tree decl; \
277 switch (section) \
279 case in_text: text_section (); break; \
280 case in_data: data_section (); break; \
281 case in_named: named_section (decl, NULL, 0); break; \
282 case in_ctor: ctor_section (); break; \
283 case in_dtor: dtor_section (); break; \
284 case in_drectve: drectve_section (); break; \
285 default: abort (); break; \
289 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
290 do { \
291 ctor_section (); \
292 fputs (ASM_LONG, FILE); \
293 assemble_name (FILE, NAME); \
294 fprintf (FILE, "\n"); \
295 } while (0)
297 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
298 do { \
299 dtor_section (); \
300 fputs (ASM_LONG, FILE); \
301 assemble_name (FILE, NAME); \
302 fprintf (FILE, "\n"); \
303 } while (0)
305 /* Don't allow flag_pic to propagate since gas may produce invalid code
306 otherwise. */
308 #undef SUBTARGET_OVERRIDE_OPTIONS
309 #define SUBTARGET_OVERRIDE_OPTIONS \
310 do { \
311 if (flag_pic) \
313 warning ("-f%s ignored for target (all code is position independent)",\
314 (flag_pic > 1) ? "PIC" : "pic"); \
315 flag_pic = 0; \
317 } while (0) \
319 /* Define this macro if references to a symbol must be treated
320 differently depending on something about the variable or
321 function named by the symbol (such as what section it is in).
323 On i386 running Windows NT, modify the assembler name with a suffix
324 consisting of an atsign (@) followed by string of digits that represents
325 the number of bytes of arguments passed to the function, if it has the
326 attribute STDCALL.
328 In addition, we must mark dll symbols specially. Definitions of
329 dllexport'd objects install some info in the .drectve section.
330 References to dllimport'd objects are fetched indirectly via
331 _imp__. If both are declared, dllexport overrides. This is also
332 needed to implement one-only vtables: they go into their own
333 section and we need to set DECL_SECTION_NAME so we do that here.
334 Note that we can be called twice on the same decl. */
336 extern void i386_pe_encode_section_info PARAMS ((TREE));
338 #ifdef ENCODE_SECTION_INFO
339 #undef ENCODE_SECTION_INFO
340 #endif
341 #define ENCODE_SECTION_INFO(DECL) i386_pe_encode_section_info (DECL)
343 /* Utility used only in this file. */
344 #define I386_PE_STRIP_ENCODING(SYM_NAME) \
345 ((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0))
347 /* This macro gets just the user-specified name
348 out of the string in a SYMBOL_REF. Discard
349 trailing @[NUM] encoded by ENCODE_SECTION_INFO. */
350 #undef STRIP_NAME_ENCODING
351 #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
352 do { \
353 const char *_p; \
354 const char *_name = I386_PE_STRIP_ENCODING (SYMBOL_NAME); \
355 for (_p = _name; *_p && *_p != '@'; ++_p) \
357 if (*_p == '@') \
359 int _len = _p - _name; \
360 char *_new_name = (char *) alloca (_len + 1); \
361 strncpy (_new_name, _name, _len); \
362 _new_name[_len] = '\0'; \
363 (VAR) = _new_name; \
365 else \
366 (VAR) = _name; \
367 } while (0)
370 /* Output a reference to a label. */
371 #undef ASM_OUTPUT_LABELREF
372 #define ASM_OUTPUT_LABELREF(STREAM, NAME) \
373 fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \
374 I386_PE_STRIP_ENCODING (NAME)) \
376 /* Output a common block. */
377 #undef ASM_OUTPUT_COMMON
378 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
379 do { \
380 if (i386_pe_dllexport_name_p (NAME)) \
381 i386_pe_record_exported_symbol (NAME, 1); \
382 if (! i386_pe_dllimport_name_p (NAME)) \
384 fprintf ((STREAM), "\t.comm\t"); \
385 assemble_name ((STREAM), (NAME)); \
386 fprintf ((STREAM), ", %d\t%s %d\n", \
387 (ROUNDED), ASM_COMMENT_START, (SIZE)); \
389 } while (0)
391 /* Output the label for an initialized variable. */
392 #undef ASM_DECLARE_OBJECT_NAME
393 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
394 do { \
395 if (i386_pe_dllexport_name_p (NAME)) \
396 i386_pe_record_exported_symbol (NAME, 1); \
397 ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
398 } while (0)
401 /* Emit code to check the stack when allocating more that 4000
402 bytes in one go. */
404 #define CHECK_STACK_LIMIT 4000
406 /* By default, target has a 80387, uses IEEE compatible arithmetic,
407 and returns float values in the 387 and needs stack probes */
408 #undef TARGET_DEFAULT
410 #define TARGET_DEFAULT \
411 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE)
413 /* This is how to output an assembler line
414 that says to advance the location counter
415 to a multiple of 2**LOG bytes. */
417 #undef ASM_OUTPUT_ALIGN
418 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
419 if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
421 /* Define this macro if in some cases global symbols from one translation
422 unit may not be bound to undefined symbols in another translation unit
423 without user intervention. For instance, under Microsoft Windows
424 symbols must be explicitly imported from shared libraries (DLLs). */
425 #define MULTIPLE_SYMBOL_SPACES
427 #define UNIQUE_SECTION_P(DECL) DECL_ONE_ONLY (DECL)
428 extern void i386_pe_unique_section PARAMS ((TREE, int));
429 #define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC)
431 #define SUPPORTS_ONE_ONLY 1
433 /* A C statement to output something to the assembler file to switch to section
434 NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
435 NULL_TREE. Some target formats do not support arbitrary sections. Do not
436 define this macro in such cases. */
437 #undef ASM_OUTPUT_SECTION_NAME
438 #define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
439 do { \
440 static struct section_info \
442 struct section_info *next; \
443 char *name; \
444 enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \
445 } *sections; \
446 struct section_info *s; \
447 const char *mode; \
448 enum sect_enum type; \
450 for (s = sections; s; s = s->next) \
451 if (!strcmp (NAME, s->name)) \
452 break; \
454 if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \
455 type = SECT_EXEC, mode = "x"; \
456 else if (DECL && DECL_READONLY_SECTION (DECL, RELOC)) \
457 type = SECT_RO, mode = ""; \
458 else \
460 type = SECT_RW; \
461 if (DECL && TREE_CODE (DECL) == VAR_DECL \
462 && lookup_attribute ("shared", DECL_MACHINE_ATTRIBUTES (DECL))) \
463 mode = "ws"; \
464 else \
465 mode = "w"; \
468 if (s == 0) \
470 s = (struct section_info *) xmalloc (sizeof (struct section_info)); \
471 s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME)); \
472 strcpy (s->name, NAME); \
473 s->type = type; \
474 s->next = sections; \
475 sections = s; \
476 fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode); \
477 /* Functions may have been compiled at various levels of \
478 optimization so we can't use `same_size' here. Instead, \
479 have the linker pick one. */ \
480 if ((DECL) && DECL_ONE_ONLY (DECL)) \
481 fprintf (STREAM, "\t.linkonce %s\n", \
482 TREE_CODE (DECL) == FUNCTION_DECL \
483 ? "discard" : "same_size"); \
485 else \
487 fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode); \
489 } while (0)
491 /* Write the extra assembler code needed to declare a function
492 properly. If we are generating SDB debugging information, this
493 will happen automatically, so we only need to handle other cases. */
494 #undef ASM_DECLARE_FUNCTION_NAME
495 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
496 do \
498 if (i386_pe_dllexport_name_p (NAME)) \
499 i386_pe_record_exported_symbol (NAME, 0); \
500 if (write_symbols != SDB_DEBUG) \
501 i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \
502 ASM_OUTPUT_LABEL (FILE, NAME); \
504 while (0)
506 /* Add an external function to the list of functions to be declared at
507 the end of the file. */
508 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
509 do \
511 if (TREE_CODE (DECL) == FUNCTION_DECL) \
512 i386_pe_record_external_function (NAME); \
514 while (0)
516 /* Declare the type properly for any external libcall. */
517 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
518 i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)
520 /* This says out to put a global symbol in the BSS section. */
521 #undef ASM_OUTPUT_ALIGNED_BSS
522 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
523 asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
525 /* Output function declarations at the end of the file. */
526 #undef ASM_FILE_END
527 #define ASM_FILE_END(FILE) \
528 i386_pe_asm_file_end (FILE)
530 #undef ASM_COMMENT_START
531 #define ASM_COMMENT_START " #"
533 /* DWARF2 Unwinding doesn't work with exception handling yet. */
534 #define DWARF2_UNWIND_INFO 0
536 /* Don't assume anything about the header files. */
537 #define NO_IMPLICIT_EXTERN_C
539 #define SUBTARGET_PROLOGUE \
540 if (profile_flag \
541 && MAIN_NAME_P (DECL_NAME (current_function_decl))) \
543 emit_call_insn (gen_rtx (CALL, VOIDmode, \
544 gen_rtx_MEM (FUNCTION_MODE, \
545 gen_rtx_SYMBOL_REF (Pmode, "_monstartup")), \
546 const0_rtx)); \
549 /* External function declarations. */
551 extern void i386_pe_record_external_function PARAMS ((const char *));
552 extern void i386_pe_declare_function_type PARAMS ((FILE *, const char *, int));
553 extern void i386_pe_record_exported_symbol PARAMS ((const char *, int));
554 extern void i386_pe_asm_file_end PARAMS ((FILE *));
555 extern int i386_pe_dllexport_name_p PARAMS ((const char *));
556 extern int i386_pe_dllimport_name_p PARAMS ((const char *));
558 /* For Win32 ABI compatibility */
559 #undef DEFAULT_PCC_STRUCT_RETURN
560 #define DEFAULT_PCC_STRUCT_RETURN 0
562 /* No data type wants to be aligned rounder than this. */
563 #undef BIGGEST_ALIGNMENT
564 #define BIGGEST_ALIGNMENT 128
566 /* Native complier aligns internal doubles in structures on dword boundaries. */
567 #undef BIGGEST_FIELD_ALIGNMENT
568 #define BIGGEST_FIELD_ALIGNMENT 64
570 /* A bitfield declared as `int' forces `int' alignment for the struct. */
571 #undef PCC_BITFIELDS_TYPE_MATTERS
572 #define PCC_BITFIELDS_TYPE_MATTERS 1
573 #define GROUP_BITFIELDS_BY_ALIGN TYPE_NATIVE(rec)
576 /* Enable alias attribute support. */
577 #ifndef SET_ASM_OP
578 #define SET_ASM_OP "\t.set\t"
579 #endif
581 /* Override GCC's relative pathname lookup unless otherwise told
582 by other subtargets. */
583 #ifndef WIN32_NO_ABSOLUTE_INST_DIRS
584 #undef MD_STARTFILE_PREFIX
585 #define MD_STARTFILE_PREFIX "/usr/lib/"
587 #undef STANDARD_STARTFILE_PREFIX
588 #define STANDARD_STARTFILE_PREFIX "/usr/lib/mingw/"
590 #ifndef CROSS_COMPILE
591 #undef LOCAL_INCLUDE_DIR
592 #undef TOOL_INCLUDE_DIR
593 #undef SYSTEM_INCLUDE_DIR
594 #undef STANDARD_INCLUDE_DIR
595 #define STANDARD_INCLUDE_DIR 0
596 #endif /* not CROSS_COMPILE */
597 #endif /* not WIN32_NO_ABSOLUTE_INST_DIRS */
599 #undef TREE
601 #ifndef BUFSIZ
602 # undef FILE
603 #endif