summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config/i386/win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/config/i386/win32.h')
-rw-r--r--contrib/gcc/config/i386/win32.h104
1 files changed, 31 insertions, 73 deletions
diff --git a/contrib/gcc/config/i386/win32.h b/contrib/gcc/config/i386/win32.h
index 0aa7a57..93f58c9 100644
--- a/contrib/gcc/config/i386/win32.h
+++ b/contrib/gcc/config/i386/win32.h
@@ -2,7 +2,7 @@
hosting on Windows NT 3.x, using a Unix style C library and tools,
as distinct from winnt.h, which is used to build GCC for use with a
windows style library and tool set and uses the Microsoft tools.
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002
Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -22,15 +22,15 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define YES_UNDERSCORES
-
/* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */
#define HANDLE_PRAGMA_PACK_PUSH_POP 1
-#define DBX_DEBUGGING_INFO
-#define SDB_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO 1
+#define SDB_DEBUGGING_INFO 1
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#include "i386/unix.h"
+#include "i386/bsd.h"
#include "i386/gas.h"
#include "dbxcoff.h"
@@ -62,11 +62,24 @@ Boston, MA 02111-1307, USA. */
{ "no-nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, "" },
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D_WIN32 -DWINNT -D_X86_=1 \
- -D__stdcall=__attribute__((__stdcall__)) \
- -D__cdecl=__attribute__((__cdecl__)) \
- -Asystem=winnt"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("_WIN32"); \
+ builtin_define_std ("WINNT"); \
+ builtin_define ("_X86_"); \
+ builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
+ builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
+ builtin_assert ("system=winnt"); \
+ if (TARGET_CYGWIN) \
+ { \
+ builtin_define ("__CYGWIN32__"); \
+ builtin_define ("__CYGWIN__"); \
+ } \
+ else \
+ builtin_define ("__MINGW32__"); \
+ } \
+ while (0)
#undef STARTFILE_SPEC
@@ -74,9 +87,8 @@ Boston, MA 02111-1307, USA. */
%{mcygwin:crt0%O%s} %{pg:gcrt0%O%s}}"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
- %{!mcygwin:-iwithprefixbefore include/mingw32 -D__MINGW32__} \
- %{mcygwin:-D__CYGWIN32__ -D__CYGWIN__}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
+ %{!mcygwin:-iwithprefixbefore include/mingw32}"
/* We have to dynamic link to get to the system DLLs. All of libc, libm and
the Unix stuff is in cygwin.dll. The import library is called
@@ -95,7 +107,6 @@ Boston, MA 02111-1307, USA. */
#define SIZE_TYPE "unsigned int"
#define PTRDIFF_TYPE "int"
-#define WCHAR_UNSIGNED 1
#define WCHAR_TYPE_SIZE 16
#define WCHAR_TYPE "short unsigned int"
/* Currently we do not have the atexit() function,
@@ -103,63 +114,10 @@ Boston, MA 02111-1307, USA. */
#define NEED_ATEXIT 1
-/* Define this macro if references to a symbol must be treated
- differently depending on something about the variable or
- function named by the symbol (such as what section it is in).
-
- On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol
- so that we may access it directly in the GOT.
-
- On i386 running Windows NT, modify the assembler name with a suffix
- consisting of an atsign (@) followed by string of digits that represents
- the number of bytes of arguments passed to the function, if it has the
- attribute STDCALL. */
-
-#ifdef ENCODE_SECTION_INFO
-#undef ENCODE_SECTION_INFO
-#define ENCODE_SECTION_INFO(DECL) \
-do \
- { \
- if (flag_pic) \
- { \
- rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
- ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
- SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
- = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
- || ! TREE_PUBLIC (DECL)); \
- } \
- if (TREE_CODE (DECL) == FUNCTION_DECL) \
- if (lookup_attribute ("stdcall", \
- TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \
- XEXP (DECL_RTL (DECL), 0) = \
- gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \
- } \
-while (0)
-#endif
-
-/* This macro gets just the user-specified name
- out of the string in a SYMBOL_REF. Discard
- trailing @[NUM] encoded by ENCODE_SECTION_INFO.
- Do we need the stripping of leading '*'? */
-#undef STRIP_NAME_ENCODING
-#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
-do { \
- const char *_p; \
- const char *const _name = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'));\
- for (_p = _name; *_p && *_p != '@'; ++_p) \
- ; \
- if (*_p == '@') \
- { \
- int _len = _p - _name; \
- char *_new_name = (char *) alloca (_len + 1); \
- strncpy (_new_name, _name, _len); \
- _new_name[_len] = '\0'; \
- (VAR) = _new_name; \
- } \
- else \
- (VAR) = _name; \
-} while (0)
-
+#undef TARGET_ENCODE_SECTION_INFO
+#define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
+#undef TARGET_STRIP_NAME_ENCODING
+#define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full
/* Emit code to check the stack when allocating more that 4000
bytes in one go. */
@@ -187,8 +145,8 @@ do { \
symbols must be explicitly imported from shared libraries (DLLs). */
#define MULTIPLE_SYMBOL_SPACES
-extern void i386_pe_unique_section ();
-#define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC)
+extern void i386_pe_unique_section PARAMS ((tree, int));
+#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
#define SUPPORTS_ONE_ONLY 1
OpenPOWER on IntegriCloud