jumbo patch to convert CYGWIN32 to CYGWIN

Jim Wilson wilson@cygnus.com
Fri Nov 13 00:30:00 GMT 1998


I just installed this patch from Geoff Noer.

------------------------- ChangeLog entry -------------------------

Thu Nov 12 19:20:57 1998  Geoffrey Noer  <noer@cygnus.com>

	* i386/cygwin32.asm: Delete.
	* i386/cygwin.asm: New file, renamed from cygwin32.asm.
	* i386/cygwin32.h: Delete.
	* i386/cygwin.h: New file, renamed from cygwin32.h.
	* i386/t-cygwin32: Delete.
	* i386/t-cygwin: New file, renamed from t-cygwin32.  Include
	cygwin.asm instead of cygwin32.asm.  Remove "32" from comment.
	* i386/x-cygwin32: Delete.
	* i386/x-cygwin: New file, renamed from x-cygwin32.
	* i386/xm-cygwin32: Delete.
	* i386/xm-cygwin: New file, renamed from xm-cygwin32.  Use newly
	renamed cygwin_ funcs for path translations.
	* i386/win32.h: Define __CYGWIN__ when -mcygwin given.
	* i386/winnt.c: Remove "32" from comment about cygwin.
	* i386/mingw32.h: Fix references to cygwin32.h in light of above.
	* rs6000/cygwin32.h: Delete.
	* rs6000/cygwin.h: New file, renamed from cygwin32.h.  Add
	-D__CYGWIN__ to CPP_PREDEFINES.
	* rs6000/x-cygwin32: Delete.
	* rs6000/x-cygwin: New file, renamed from x-cygwin32.
	* rs6000/xm-cygwin32: Delete.
	* rs6000/xm-cygwin: New file, renamed from xm-cygwin32.

	* configure.in: Check for cygwin* instead of cygwin32.  Account
	for the rename of cygwin-related config files to lose the "32"s.
	* configure: Regenerate.

	* cccp.c, collect2.c, gcc.c, getpwd.c, libgcc2.c, protoize.c,
	toplev.c: Change all refs to __CYGWIN32__ to __CYGWIN__.

--------------------------- Patch -----------------------------------

cvs server: Diffing .
Index: cccp.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/cccp.c,v
retrieving revision 1.187
diff -c -3 -p -r1.187 cccp.c
*** cccp.c	1998/11/11 05:48:13	1.187
--- cccp.c	1998/11/12 02:07:36
*************** static int hack_vms_include_specificatio
*** 85,91 ****
  #endif /* VMS */
  
  /* Windows does not natively support inodes, and neither does MSDOS.  */
! #if (defined (_WIN32) && ! defined (CYGWIN32)) || defined (__MSDOS__)
  #define INO_T_EQ(a, b) 0
  #endif
  
--- 85,91 ----
  #endif /* VMS */
  
  /* Windows does not natively support inodes, and neither does MSDOS.  */
! #if (defined (_WIN32) && ! defined (__CYGWIN__)) || defined (__MSDOS__)
  #define INO_T_EQ(a, b) 0
  #endif
  
*************** static int
*** 5020,5029 ****
  absolute_filename (filename)
       char *filename;
  {
! #if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN32__))
    if (ISALPHA (filename[0]) && filename[1] == ':') filename += 2;
  #endif
! #if defined (__CYGWIN32__)
    /* At present, any path that begins with a drive spec is absolute.  */
    if (ISALPHA (filename[0]) && filename[1] == ':') return 1;
  #endif
--- 5020,5029 ----
  absolute_filename (filename)
       char *filename;
  {
! #if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN__))
    if (ISALPHA (filename[0]) && filename[1] == ':') filename += 2;
  #endif
! #if defined (__CYGWIN__)
    /* At present, any path that begins with a drive spec is absolute.  */
    if (ISALPHA (filename[0]) && filename[1] == ':') return 1;
  #endif
Index: collect2.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/collect2.c,v
retrieving revision 1.109
diff -c -3 -p -r1.109 collect2.c
*** collect2.c	1998/11/11 05:48:13	1.109
--- collect2.c	1998/11/12 02:07:36
*************** Boston, MA 02111-1307, USA.  */
*** 35,41 ****
  #include "demangle.h"
  #include "obstack.h"
  #include "gansidecl.h"
! #ifdef __CYGWIN32__
  #include <process.h>
  #endif
  
--- 35,41 ----
  #include "demangle.h"
  #include "obstack.h"
  #include "gansidecl.h"
! #ifdef __CYGWIN__
  #include <process.h>
  #endif
  
*************** collect_execute (prog, argv, redir)
*** 1668,1674 ****
    if (argv[0] == 0)
      fatal ("cannot find `%s'", prog);
  
! #ifndef __CYGWIN32__
    pid = vfork ();
    if (pid == -1)
      {
--- 1668,1674 ----
    if (argv[0] == 0)
      fatal ("cannot find `%s'", prog);
  
! #ifndef __CYGWIN__
    pid = vfork ();
    if (pid == -1)
      {
Index: configure.in
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/configure.in,v
retrieving revision 1.259
diff -c -3 -p -r1.259 configure.in
*** configure.in	1998/11/11 05:48:19	1.259
--- configure.in	1998/11/12 02:07:36
*************** changequote([,])dnl
*** 1495,1504 ****
  changequote(,)dnl
  	i[34567]86-*-win32)
  changequote([,])dnl
! 		xm_file="${xm_file} i386/xm-cygwin32.h"
! 		tmake_file=i386/t-cygwin32
  		tm_file=i386/win32.h
! 		xmake_file=i386/x-cygwin32
  		extra_objs=winnt.o
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
--- 1495,1504 ----
  changequote(,)dnl
  	i[34567]86-*-win32)
  changequote([,])dnl
! 		xm_file="${xm_file} i386/xm-cygwin.h"
! 		tmake_file=i386/t-cygwin
  		tm_file=i386/win32.h
! 		xmake_file=i386/x-cygwin
  		extra_objs=winnt.o
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
*************** changequote([,])dnl
*** 1507,1518 ****
  		exeext=.exe
  		;;
  changequote(,)dnl
! 	i[34567]86-*-pe | i[34567]86-*-cygwin32)
  changequote([,])dnl
! 		xm_file="${xm_file} i386/xm-cygwin32.h"
! 		tmake_file=i386/t-cygwin32
! 		tm_file=i386/cygwin32.h
! 		xmake_file=i386/x-cygwin32
  		extra_objs=winnt.o
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
--- 1507,1518 ----
  		exeext=.exe
  		;;
  changequote(,)dnl
! 	i[34567]86-*-pe | i[34567]86-*-cygwin*)
  changequote([,])dnl
! 		xm_file="${xm_file} i386/xm-cygwin.h"
! 		tmake_file=i386/t-cygwin
! 		tm_file=i386/cygwin.h
! 		xmake_file=i386/x-cygwin
  		extra_objs=winnt.o
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
*************** changequote(,)dnl
*** 1525,1533 ****
  changequote([,])dnl
  		tm_file=i386/mingw32.h
  		xm_file="${xm_file} i386/xm-mingw32.h"
! 		tmake_file="i386/t-cygwin32 i386/t-mingw32"
  		extra_objs=winnt.o
! 		xmake_file=i386/x-cygwin32
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
  			thread_file='win32'
--- 1525,1533 ----
  changequote([,])dnl
  		tm_file=i386/mingw32.h
  		xm_file="${xm_file} i386/xm-mingw32.h"
! 		tmake_file="i386/t-cygwin i386/t-mingw32"
  		extra_objs=winnt.o
! 		xmake_file=i386/x-cygwin
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
  			thread_file='win32'
*************** changequote([,])dnl
*** 2826,2836 ****
  		fi
  		extra_headers=ppc-asm.h
  		;;
! 	powerpcle-*-pe | powerpcle-*-cygwin32)
! 		tm_file=rs6000/cygwin32.h
! 		xm_file="rs6000/xm-cygwin32.h ${xm_file}"
  		tmake_file=rs6000/t-winnt
! 		xmake_file=rs6000/x-cygwin32
  #		extra_objs=pe.o
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
--- 2826,2836 ----
  		fi
  		extra_headers=ppc-asm.h
  		;;
! 	powerpcle-*-pe | powerpcle-*-cygwin*)
! 		tm_file=rs6000/cygwin.h
! 		xm_file="rs6000/xm-cygwin.h ${xm_file}"
  		tmake_file=rs6000/t-winnt
! 		xmake_file=rs6000/x-cygwin
  #		extra_objs=pe.o
  		fixincludes=Makefile.in
   		if test x$enable_threads = xyes; then
Index: gcc.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/gcc.c,v
retrieving revision 1.247
diff -c -3 -p -r1.247 gcc.c
*** gcc.c	1998/11/11 05:48:47	1.247
--- gcc.c	1998/11/12 02:07:37
*************** execute ()
*** 2636,2642 ****
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        {				/* each command.  */
! #if defined (__MSDOS__) || (defined (_WIN32) && defined (__CYGWIN32_)) || defined (OS2) || defined (VMS)
          fatal ("-pipe not supported");
  #endif
  	argbuf[i] = 0;	/* termination of command args.  */
--- 2636,2642 ----
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        {				/* each command.  */
! #if defined (__MSDOS__) || (defined (_WIN32) && defined (__CYGWIN__)) || defined (OS2) || defined (VMS)
          fatal ("-pipe not supported");
  #endif
  	argbuf[i] = 0;	/* termination of command args.  */
Index: getpwd.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/getpwd.c,v
retrieving revision 1.16
diff -c -3 -p -r1.16 getpwd.c
*** getpwd.c	1998/11/11 05:48:58	1.16
--- getpwd.c	1998/11/12 02:07:37
***************
*** 22,28 ****
  
  char *xmalloc ();
  
! #if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN32__)))
  
  /* Get the working directory.  Use the PWD environment variable if it's
     set correctly, since this is faster and gives more uniform answers
--- 22,28 ----
  
  char *xmalloc ();
  
! #if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN__)))
  
  /* Get the working directory.  Use the PWD environment variable if it's
     set correctly, since this is faster and gives more uniform answers
*************** getpwd ()
*** 70,76 ****
    return p;
  }
  
! #else	/* VMS || _WIN32 && !__CYGWIN32__ */
  
  #ifndef MAXPATHLEN
  #define MAXPATHLEN 255
--- 70,76 ----
    return p;
  }
  
! #else	/* VMS || _WIN32 && !__CYGWIN__ */
  
  #ifndef MAXPATHLEN
  #define MAXPATHLEN 255
*************** getpwd ()
*** 90,93 ****
    return pwd;
  }
  
! #endif	/* VMS || _WIN32 && !__CYGWIN32__ */
--- 90,93 ----
    return pwd;
  }
  
! #endif	/* VMS || _WIN32 && !__CYGWIN__ */
Index: libgcc2.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/libgcc2.c,v
retrieving revision 1.174
diff -c -3 -p -r1.174 libgcc2.c
*** libgcc2.c	1998/11/11 05:49:02	1.174
--- libgcc2.c	1998/11/12 02:07:37
*************** __clear_cache (char *beg, char *end)
*** 2569,2575 ****
  
  /* Jump to a trampoline, loading the static chain address.  */
  
! #if defined(WINNT) && ! defined(__CYGWIN32__)
  
  long getpagesize()
  {
--- 2569,2575 ----
  
  /* Jump to a trampoline, loading the static chain address.  */
  
! #if defined(WINNT) && ! defined(__CYGWIN__)
  
  long getpagesize()
  {
*************** cacheflush (char *beg, int size, int fla
*** 2807,2813 ****
  #endif /* sony_news */
  #endif /* L_trampoline */
  
! #ifndef __CYGWIN32__
  #ifdef L__main
  
  #include "gbl-ctors.h"
--- 2807,2813 ----
  #endif /* sony_news */
  #endif /* L_trampoline */
  
! #ifndef __CYGWIN__
  #ifdef L__main
  
  #include "gbl-ctors.h"
*************** SYMBOL__MAIN ()
*** 2889,2895 ****
  #endif /* no HAS_INIT_SECTION or INVOKE__main */
  
  #endif /* L__main */
! #endif /* __CYGWIN32__ */
  
  #ifdef L_ctors
  
--- 2889,2895 ----
  #endif /* no HAS_INIT_SECTION or INVOKE__main */
  
  #endif /* L__main */
! #endif /* __CYGWIN__ */
  
  #ifdef L_ctors
  
Index: protoize.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/protoize.c,v
retrieving revision 1.63
diff -c -3 -p -r1.63 protoize.c
*** protoize.c	1998/11/11 05:49:14	1.63
--- protoize.c	1998/11/12 02:07:37
*************** Boston, MA 02111-1307, USA.  */
*** 59,65 ****
  
  #include "system.h"
  #include <sys/stat.h>
! #if ! defined (_WIN32) || defined (__CYGWIN32__)
  #if defined(POSIX) || defined(CONCURRENT)
  #include <dirent.h>
  #else
--- 59,65 ----
  
  #include "system.h"
  #include <sys/stat.h>
! #if ! defined (_WIN32) || defined (__CYGWIN__)
  #if defined(POSIX) || defined(CONCURRENT)
  #include <dirent.h>
  #else
Index: toplev.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/toplev.c,v
retrieving revision 1.337
diff -c -3 -p -r1.337 toplev.c
*** toplev.c	1998/11/11 05:49:31	1.337
--- toplev.c	1998/11/12 02:07:38
*************** get_run_time ()
*** 1313,1319 ****
  #ifdef __BEOS__
    return 0;
  #else /* not BeOS */
! #if defined (_WIN32) && !defined (__CYGWIN32__)
    if (clock() < 0)
      return 0;
    else
--- 1313,1319 ----
  #ifdef __BEOS__
    return 0;
  #else /* not BeOS */
! #if defined (_WIN32) && !defined (__CYGWIN__)
    if (clock() < 0)
      return 0;
    else
*************** main (argc, argv)
*** 5144,5150 ****
  
    compile_file (filename);
  
! #if !defined(OS2) && !defined(VMS) && (!defined(_WIN32) || defined (__CYGWIN32__))
    if (flag_print_mem)
      {
        char *lim = (char *) sbrk (0);
--- 5144,5150 ----
  
    compile_file (filename);
  
! #if !defined(OS2) && !defined(VMS) && (!defined(_WIN32) || defined (__CYGWIN__))
    if (flag_print_mem)
      {
        char *lim = (char *) sbrk (0);
*************** main (argc, argv)
*** 5160,5166 ****
  #endif /* not USG */
  #endif
      }
! #endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN32) */
  
    if (errorcount)
      exit (FATAL_EXIT_CODE);
--- 5160,5166 ----
  #endif /* not USG */
  #endif
      }
! #endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) */
  
    if (errorcount)
      exit (FATAL_EXIT_CODE);
cvs server: Diffing config
cvs server: Diffing config/i386
Index: config/i386/cygwin.asm
===================================================================
RCS file: cygwin.asm
diff -N cygwin.asm
*** config/i386/cygwin.asm	Mon Dec 31 20:00:00 1979
--- config/i386/cygwin.asm	Wed Nov 11 18:07:38 1998
***************
*** 0 ****
--- 1,32 ----
+ /* stuff needed for libgcc1 on win32. */
+ 
+ #ifdef L_chkstk
+ 
+ 	.global ___chkstk
+ 	.global	__alloca
+ ___chkstk:
+ __alloca:
+ 	pushl  %ecx		/* save temp */
+ 	movl   %esp,%ecx	/* get sp */
+ 	addl   $0x8,%ecx	/* and point to return addr */
+ 
+ probe: 	cmpl   $0x1000,%eax	/* > 4k ?*/
+ 	jb    done		
+ 
+ 	subl   $0x1000,%ecx  		/* yes, move pointer down 4k*/
+ 	orl    $0x0,(%ecx)   		/* probe there */
+ 	subl   $0x1000,%eax  	 	/* decrement count */
+ 	jmp    probe           	 	/* and do it again */
+ 
+ done: 	subl   %eax,%ecx	   
+ 	orl    $0x0,(%ecx)	/* less that 4k, just peek here */
+ 
+ 	movl   %esp,%eax
+ 	movl   %ecx,%esp	/* decrement stack */
+ 
+ 	movl   (%eax),%ecx	/* recover saved temp */
+ 	movl   4(%eax),%eax	/* get return address */
+ 	jmp    *%eax	
+ 
+ 
+ #endif
Index: config/i386/cygwin.h
===================================================================
RCS file: cygwin.h
diff -N cygwin.h
*** config/i386/cygwin.h	Mon Dec 31 20:00:00 1979
--- config/i386/cygwin.h	Wed Nov 11 18:07:38 1998
***************
*** 0 ****
--- 1,504 ----
+ /* Operating system specific defines to be used when targeting GCC for
+    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 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ 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
+ 
+ #define DBX_DEBUGGING_INFO 
+ #define SDB_DEBUGGING_INFO 
+ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+ 
+ #include "i386/gas.h"
+ #include "dbxcoff.h"
+ 
+ /* Augment TARGET_SWITCHES with the cygwin/no-cygwin options. */
+ #define MASK_WIN32 0x40000000 /* Use -lming32 interface */
+ #define MASK_CYGWIN  0x20000000 /* Use -lcygwin interface */
+ #define MASK_WINDOWS 0x10000000 /* Use windows interface */
+ #define MASK_DLL     0x08000000 /* Use dll interface    */
+ #define MASK_NOP_FUN_DLLIMPORT 0x20000 /* Ignore dllimport for functions */
+ 
+ #define TARGET_WIN32             (target_flags & MASK_WIN32)
+ #define TARGET_CYGWIN            (target_flags & MASK_CYGWIN)
+ #define TARGET_WINDOWS           (target_flags & MASK_WINDOWS)
+ #define TARGET_DLL               (target_flags & MASK_DLL)
+ #define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT)
+ 
+ #undef  SUBTARGET_SWITCHES
+ #define SUBTARGET_SWITCHES \
+ { "no-cygwin",                       MASK_WIN32 }, \
+ { "cygwin",                          MASK_CYGWIN },  \
+ { "windows",                         MASK_WINDOWS }, \
+ { "dll",                             MASK_DLL },     \
+ { "nop-fun-dllimport",               MASK_NOP_FUN_DLLIMPORT }, \
+ { "no-nop-fun-dllimport",            MASK_NOP_FUN_DLLIMPORT },
+ 
+ 
+ /* Support the __declspec keyword by turning them into attributes.
+    We currently only support: dllimport and dllexport.
+    Note that the current way we do this may result in a collision with
+    predefined attributes later on.  This can be solved by using one attribute,
+    say __declspec__, and passing args to it.  The problem with that approach
+    is that args are not accumulated: each new appearance would clobber any
+    existing args.  */
+ 
+ #ifdef CPP_PREDEFINES
+ #undef CPP_PREDEFINES
+ #endif
+ 
+ #define CPP_PREDEFINES "-Di386 -D_WIN32 \
+   -DWINNT  -D_X86_=1 -D__STDC__=1\
+   -D__stdcall=__attribute__((__stdcall__)) \
+   -D__cdecl=__attribute__((__cdecl__)) \
+   -D__declspec(x)=__attribute__((x)) \
+   -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
+ 
+ /* Normally, -lgcc is not needed since everything in it is in the DLL, but we
+    want to allow things to be added to it when installing new versions of
+    GCC without making a new CYGWIN.DLL, so we leave it.  Profiling is handled
+    by calling the init function from the prologue. */
+ 
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC "%{mdll: %{!mno-cygwin:dllcrt0%O%s} \
+                                 %{mno-cygwin:dllcrt1%O%s}} \
+                         %{!mdll: %{!mno-cygwin:crt0%O%s} \
+                                  %{mno-cygwin:crt1%O%s} %{pg:gcrt0%O%s}}"
+ 
+ #undef CPP_SPEC
+ #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
+   %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__} \
+   %{mno-cygwin:-iwithprefixbefore include/mingw32 -D__MINGW32__=0.2}"
+ 
+ /* 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
+    'libcygwin.a'.  For Windows applications, include more libraries, but
+    always include kernel32.  We'd like to specific subsystem windows to
+    ld, but that doesn't work just yet.  */
+ 
+ #undef LIB_SPEC
+ #define LIB_SPEC "%{pg:-lgmon} \
+                   %{!mno-cygwin:-lcygwin} \
+                   %{mno-cygwin:-lmingw32 -lmoldname -lcrtdll} \
+                   %{mwindows:-luser32 -lgdi32 -lcomdlg32} \
+ 		  -lkernel32 -ladvapi32 -lshell32"
+ 
+ #define LINK_SPEC "%{mwindows:--subsystem windows} \
+                    %{mdll:--dll -e _DllMainCRTStartup@12}"
+ 
+ 
+ #define SIZE_TYPE "unsigned int"
+ #define PTRDIFF_TYPE "int"
+ #define WCHAR_UNSIGNED 1
+ #define WCHAR_TYPE_SIZE 16
+ #define WCHAR_TYPE "short unsigned int"
+ 
+ #define HAVE_ATEXIT 1
+ 
+ 
+ /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop).  */
+ #define HANDLE_PRAGMA_PACK_PUSH_POP 1
+ 
+ /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
+    is a valid machine specific attribute for DECL.
+    The attributes in ATTRIBUTES have previously been assigned to DECL.  */
+ extern int i386_pe_valid_decl_attribute_p ();
+ 
+ #undef VALID_MACHINE_DECL_ATTRIBUTE
+ #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
+   i386_pe_valid_decl_attribute_p (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
+ 
+ /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
+    is a valid machine specific attribute for TYPE.
+    The attributes in ATTRIBUTES have previously been assigned to TYPE.  */
+ 
+ #undef VALID_MACHINE_TYPE_ATTRIBUTE
+ #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
+   i386_pe_valid_type_attribute_p (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)
+ extern int i386_pe_valid_type_attribute_p ();
+ 
+ extern union tree_node *i386_pe_merge_decl_attributes ();
+ #define MERGE_MACHINE_DECL_ATTRIBUTES(OLD, NEW) \
+   i386_pe_merge_decl_attributes ((OLD), (NEW))
+ 
+ /* Used to implement dllexport overriding dllimport semantics.  It's also used
+    to handle vtables - the first pass won't do anything because
+    DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0.
+    It's also used to handle dllimport override semantics.  */
+ #if 0
+ #define REDO_SECTION_INFO_P(DECL) \
+   ((DECL_MACHINE_ATTRIBUTES (DECL) != NULL_TREE) \
+    || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL)))
+ #else
+ #define REDO_SECTION_INFO_P(DECL) 1
+ #endif
+ 
+ 
+ #undef EXTRA_SECTIONS
+ #define EXTRA_SECTIONS in_ctor, in_dtor, in_drectve
+ 
+ #undef EXTRA_SECTION_FUNCTIONS
+ #define EXTRA_SECTION_FUNCTIONS					\
+   CTOR_SECTION_FUNCTION						\
+   DTOR_SECTION_FUNCTION						\
+   DRECTVE_SECTION_FUNCTION					\
+   SWITCH_TO_SECTION_FUNCTION
+ 
+ #define CTOR_SECTION_FUNCTION					\
+ void								\
+ ctor_section ()							\
+ {								\
+   if (in_section != in_ctor)					\
+     {								\
+       fprintf (asm_out_file, "\t.section .ctor\n");		\
+       in_section = in_ctor;					\
+     }								\
+ }
+ 
+ #define DTOR_SECTION_FUNCTION					\
+ void								\
+ dtor_section ()							\
+ {								\
+   if (in_section != in_dtor)					\
+     {								\
+       fprintf (asm_out_file, "\t.section .dtor\n");		\
+       in_section = in_dtor;					\
+     }								\
+ }
+ 
+ #define DRECTVE_SECTION_FUNCTION \
+ void									\
+ drectve_section ()							\
+ {									\
+   if (in_section != in_drectve)						\
+     {									\
+       fprintf (asm_out_file, "%s\n", "\t.section .drectve\n");		\
+       in_section = in_drectve;						\
+     }									\
+ }
+ 
+ /* Switch to SECTION (an `enum in_section').
+ 
+    ??? This facility should be provided by GCC proper.
+    The problem is that we want to temporarily switch sections in
+    ASM_DECLARE_OBJECT_NAME and then switch back to the original section
+    afterwards.  */
+ #define SWITCH_TO_SECTION_FUNCTION 				\
+ void 								\
+ switch_to_section (section, decl) 				\
+      enum in_section section; 					\
+      tree decl; 						\
+ { 								\
+   switch (section) 						\
+     { 								\
+       case in_text: text_section (); break; 			\
+       case in_data: data_section (); break; 			\
+       case in_named: named_section (decl, NULL, 0); break; 	\
+       case in_ctor: ctor_section (); break; 			\
+       case in_dtor: dtor_section (); break; 			\
+       case in_drectve: drectve_section (); break; 		\
+       default: abort (); break; 				\
+     } 								\
+ }
+ 
+ #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)	\
+   do {						\
+     ctor_section ();				\
+     fprintf (FILE, "%s\t", ASM_LONG);		\
+     assemble_name (FILE, NAME);			\
+     fprintf (FILE, "\n");			\
+   } while (0)
+ 
+ #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)       	\
+   do {						\
+     dtor_section ();                   		\
+     fprintf (FILE, "%s\t", ASM_LONG);		\
+     assemble_name (FILE, NAME);			\
+     fprintf (FILE, "\n");			\
+   } while (0)
+ 
+ /* 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 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.
+ 
+    In addition, we must mark dll symbols specially. Definitions of 
+    dllexport'd objects install some info in the .drectve section.  
+    References to dllimport'd objects are fetched indirectly via
+    _imp__.  If both are declared, dllexport overrides.  This is also 
+    needed to implement one-only vtables: they go into their own
+    section and we need to set DECL_SECTION_NAME so we do that here.
+    Note that we can be called twice on the same decl.  */
+ 
+ extern void i386_pe_encode_section_info ();
+ 
+ #ifdef ENCODE_SECTION_INFO
+ #undef ENCODE_SECTION_INFO
+ #endif
+ #define ENCODE_SECTION_INFO(DECL) i386_pe_encode_section_info (DECL)
+ 
+ /* Utility used only in this file.  */
+ #define I386_PE_STRIP_ENCODING(SYM_NAME) \
+   ((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0))
+ 
+ /* This macro gets just the user-specified name
+    out of the string in a SYMBOL_REF.  Discard
+    trailing @[NUM] encoded by ENCODE_SECTION_INFO.  */
+ #undef  STRIP_NAME_ENCODING
+ #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME)				\
+ do {									\
+   char *_p;								\
+   char *_name = I386_PE_STRIP_ENCODING (SYMBOL_NAME);			\
+   for (_p = _name; *_p && *_p != '@'; ++_p)				\
+     ;									\
+   if (*_p == '@')							\
+     {									\
+       int _len = _p - _name;						\
+       (VAR) = (char *) alloca (_len + 1);				\
+       strncpy ((VAR), _name, _len);					\
+       (VAR)[_len] = '\0';						\
+     }									\
+   else									\
+     (VAR) = _name;							\
+ } while (0)
+       
+ 
+ /* Output a reference to a label.  */
+ #undef ASM_OUTPUT_LABELREF
+ #define ASM_OUTPUT_LABELREF(STREAM, NAME)  		\
+   fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, 		\
+            I386_PE_STRIP_ENCODING (NAME))		\
+ 
+ /* Output a common block.  */
+ #undef ASM_OUTPUT_COMMON
+ #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED)	\
+ do {							\
+   if (i386_pe_dllexport_name_p (NAME))			\
+     {							\
+       drectve_section ();				\
+       fprintf ((STREAM), "\t.ascii \" -export:%s\"\n",	\
+                I386_PE_STRIP_ENCODING (NAME));		\
+     }							\
+   if (! i386_pe_dllimport_name_p (NAME))		\
+     {							\
+       fprintf ((STREAM), "\t.comm\t"); 			\
+       assemble_name ((STREAM), (NAME));			\
+       fprintf ((STREAM), ", %d\t%s %d\n",		\
+ 	       (ROUNDED), ASM_COMMENT_START, (SIZE));	\
+     }							\
+ } while (0)
+ 
+ /* Output the label for an initialized variable.  */
+ #undef ASM_DECLARE_OBJECT_NAME
+ #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) 	\
+ do {							\
+   if (i386_pe_dllexport_name_p (NAME))			\
+     {							\
+       enum in_section save_section = in_section;	\
+       drectve_section ();				\
+       fprintf ((STREAM), "\t.ascii \" -export:%s\"\n",	\
+                I386_PE_STRIP_ENCODING (NAME));		\
+       switch_to_section (save_section, (DECL));		\
+     }							\
+   ASM_OUTPUT_LABEL ((STREAM), (NAME));			\
+ } while (0)
+ 
+ 
+ /* Emit code to check the stack when allocating more that 4000
+    bytes in one go. */
+ 
+ #define CHECK_STACK_LIMIT 4000
+ 
+ /* By default, target has a 80387, uses IEEE compatible arithmetic,
+    and returns float values in the 387 and needs stack probes */
+ #undef TARGET_DEFAULT
+ 
+ #define TARGET_DEFAULT \
+    (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE) 
+ 
+ /* This is how to output an assembler line
+    that says to advance the location counter
+    to a multiple of 2**LOG bytes.  */
+ 
+ #undef ASM_OUTPUT_ALIGN
+ #define ASM_OUTPUT_ALIGN(FILE,LOG)	\
+     if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
+ 
+ /* Define this macro if in some cases global symbols from one translation
+    unit may not be bound to undefined symbols in another translation unit
+    without user intervention.  For instance, under Microsoft Windows
+    symbols must be explicitly imported from shared libraries (DLLs).  */
+ #define MULTIPLE_SYMBOL_SPACES
+ 
+ #define UNIQUE_SECTION_P(DECL) DECL_ONE_ONLY (DECL)
+ extern void i386_pe_unique_section ();
+ #define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC)
+ 
+ #define SUPPORTS_ONE_ONLY 1
+ 
+ /* A C statement to output something to the assembler file to switch to section
+    NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
+    NULL_TREE.  Some target formats do not support arbitrary sections.  Do not
+    define this macro in such cases.  */
+ #undef ASM_OUTPUT_SECTION_NAME
+ #define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC)		\
+ do {									\
+   static struct section_info						\
+     {									\
+       struct section_info *next;					\
+       char *name;							\
+       enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type;		\
+     } *sections;							\
+   struct section_info *s;						\
+   char *mode;								\
+   enum sect_enum type;							\
+ 									\
+   for (s = sections; s; s = s->next)					\
+     if (!strcmp (NAME, s->name))					\
+       break;								\
+ 									\
+   if (DECL && TREE_CODE (DECL) == FUNCTION_DECL)			\
+     type = SECT_EXEC, mode = "x";					\
+   else if (DECL && DECL_READONLY_SECTION (DECL, RELOC))			\
+     type = SECT_RO, mode = "";						\
+   else									\
+     type = SECT_RW, mode = "w";						\
+ 									\
+   if (s == 0)								\
+     {									\
+       s = (struct section_info *) xmalloc (sizeof (struct section_info)); \
+       s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME));		\
+       strcpy (s->name, NAME);						\
+       s->type = type;							\
+       s->next = sections;						\
+       sections = s;							\
+       fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode);		\
+       /* Functions may have been compiled at various levels of		\
+          optimization so we can't use `same_size' here.  Instead,	\
+          have the linker pick one.  */					\
+       if ((DECL) && DECL_ONE_ONLY (DECL))				\
+         fprintf (STREAM, "\t.linkonce %s\n",				\
+ 	         TREE_CODE (DECL) == FUNCTION_DECL			\
+ 	         ? "discard" : "same_size");				\
+     }									\
+   else									\
+     {									\
+       fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode);		\
+     }									\
+ } while (0)
+ 
+ /* Write the extra assembler code needed to declare a function
+    properly.  If we are generating SDB debugging information, this
+    will happen automatically, so we only need to handle other cases.  */
+ #undef ASM_DECLARE_FUNCTION_NAME
+ #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)			\
+   do									\
+     {									\
+       if (i386_pe_dllexport_name_p (NAME))				\
+ 	{								\
+ 	  drectve_section ();						\
+ 	  fprintf ((FILE), "\t.ascii \" -export:%s\"\n", 		\
+ 		   I386_PE_STRIP_ENCODING (NAME));			\
+ 	  function_section (DECL);					\
+ 	}								\
+       if (write_symbols != SDB_DEBUG)					\
+ 	i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL));	\
+       ASM_OUTPUT_LABEL (FILE, NAME);					\
+     }									\
+   while (0)
+ 
+ /* Add an external function to the list of functions to be declared at
+    the end of the file.  */
+ #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)				\
+   do									\
+     {									\
+       if (TREE_CODE (DECL) == FUNCTION_DECL)				\
+ 	i386_pe_record_external_function (NAME);			\
+     }									\
+   while (0)
+ 
+ /* Declare the type properly for any external libcall.  */
+ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
+   i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)
+ 
+ /* Output function declarations at the end of the file.  */
+ #define ASM_FILE_END(FILE) \
+   i386_pe_asm_file_end (FILE)
+ 
+ #undef ASM_COMMENT_START
+ #define ASM_COMMENT_START " #"
+ 
+ /* DWARF2 Unwinding doesn't work with exception handling yet. */
+ #define DWARF2_UNWIND_INFO 0
+ 
+ /* Don't assume anything about the header files. */
+ #define NO_IMPLICIT_EXTERN_C
+ 
+ #define SUBTARGET_PROLOGUE						\
+   if (profile_flag 							\
+       && strcmp (IDENTIFIER_POINTER (DECL_NAME (current_function_decl)),\
+ 		 "main") == 0)						\
+      {									\
+       rtx xops[1];							\
+       xops[0] = gen_rtx_MEM (FUNCTION_MODE,				\
+ 			 gen_rtx (SYMBOL_REF, Pmode, "_monstartup"));	\
+       if (do_rtl)							\
+ 	emit_call_insn (gen_rtx (CALL, VOIDmode, xops[0], const0_rtx));	\
+       else								\
+ 	output_asm_insn (AS1 (call,%P1), xops);			\
+      }
+ 
+ /* External function declarations.  */
+ 
+ #ifndef PROTO
+ #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
+ #define PROTO(ARGS) ARGS
+ #else
+ #define PROTO(ARGS) ()
+ #endif
+ #endif
+ 
+ #ifdef BUFSIZ		/* stdio.h has been included, ok to use FILE * */
+ #define STDIO_PROTO(ARGS) PROTO(ARGS)
+ #else
+ #define STDIO_PROTO(ARGS) ()
+ #endif
+ 
+ extern void i386_pe_record_external_function PROTO((char *));
+ extern void i386_pe_declare_function_type STDIO_PROTO((FILE *, char *, int));
+ extern void i386_pe_asm_file_end STDIO_PROTO((FILE *));
+ 
+ /* For Win32 ABI compatibility */
+ #undef DEFAULT_PCC_STRUCT_RETURN
+ #define DEFAULT_PCC_STRUCT_RETURN 0
+ 
+ /* No data type wants to be aligned rounder than this.  */
+ #undef	BIGGEST_ALIGNMENT
+ #define BIGGEST_ALIGNMENT 128
+ 
+ /* A bitfield declared as `int' forces `int' alignment for the struct.  */
+ #undef PCC_BITFIELDS_TYPE_MATTERS
+ #define PCC_BITFIELDS_TYPE_MATTERS 0
+ 
Index: config/i386/cygwin32.asm
===================================================================
RCS file: cygwin32.asm
diff -N cygwin32.asm
*** config/i386/cygwin32.asm	Wed Nov 11 18:07:57 1998
--- config/i386/cygwin32.asm	Mon Dec 31 20:00:00 1979
***************
*** 1,32 ****
- /* stuff needed for libgcc1 on win32. */
- 
- #ifdef L_chkstk
- 
- 	.global ___chkstk
- 	.global	__alloca
- ___chkstk:
- __alloca:
- 	pushl  %ecx		/* save temp */
- 	movl   %esp,%ecx	/* get sp */
- 	addl   $0x8,%ecx	/* and point to return addr */
- 
- probe: 	cmpl   $0x1000,%eax	/* > 4k ?*/
- 	jb    done		
- 
- 	subl   $0x1000,%ecx  		/* yes, move pointer down 4k*/
- 	orl    $0x0,(%ecx)   		/* probe there */
- 	subl   $0x1000,%eax  	 	/* decrement count */
- 	jmp    probe           	 	/* and do it again */
- 
- done: 	subl   %eax,%ecx	   
- 	orl    $0x0,(%ecx)	/* less that 4k, just peek here */
- 
- 	movl   %esp,%eax
- 	movl   %ecx,%esp	/* decrement stack */
- 
- 	movl   (%eax),%ecx	/* recover saved temp */
- 	movl   4(%eax),%eax	/* get return address */
- 	jmp    *%eax	
- 
- 
- #endif
--- 0 ----
Index: config/i386/cygwin32.h
===================================================================
RCS file: cygwin32.h
diff -N cygwin32.h
*** config/i386/cygwin32.h	Wed Nov 11 18:07:57 1998
--- config/i386/cygwin32.h	Mon Dec 31 20:00:00 1979
***************
*** 1,504 ****
- /* Operating system specific defines to be used when targeting GCC for
-    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 Free Software Foundation, Inc.
- 
- This file is part of GNU CC.
- 
- GNU CC is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
- 
- GNU CC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- 
- You should have received a copy of the GNU General Public License
- 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
- 
- #define DBX_DEBUGGING_INFO 
- #define SDB_DEBUGGING_INFO 
- #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
- 
- #include "i386/gas.h"
- #include "dbxcoff.h"
- 
- /* Augment TARGET_SWITCHES with the cygwin/no-cygwin options. */
- #define MASK_WIN32 0x40000000 /* Use -lming32 interface */
- #define MASK_CYGWIN  0x20000000 /* Use -lcygwin interface */
- #define MASK_WINDOWS 0x10000000 /* Use windows interface */
- #define MASK_DLL     0x08000000 /* Use dll interface    */
- #define MASK_NOP_FUN_DLLIMPORT 0x20000 /* Ignore dllimport for functions */
- 
- #define TARGET_WIN32             (target_flags & MASK_WIN32)
- #define TARGET_CYGWIN            (target_flags & MASK_CYGWIN)
- #define TARGET_WINDOWS           (target_flags & MASK_WINDOWS)
- #define TARGET_DLL               (target_flags & MASK_DLL)
- #define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT)
- 
- #undef  SUBTARGET_SWITCHES
- #define SUBTARGET_SWITCHES \
- { "no-cygwin",                       MASK_WIN32 }, \
- { "cygwin",                          MASK_CYGWIN },  \
- { "windows",                         MASK_WINDOWS }, \
- { "dll",                             MASK_DLL },     \
- { "nop-fun-dllimport",               MASK_NOP_FUN_DLLIMPORT }, \
- { "no-nop-fun-dllimport",            MASK_NOP_FUN_DLLIMPORT },
- 
- 
- /* Support the __declspec keyword by turning them into attributes.
-    We currently only support: dllimport and dllexport.
-    Note that the current way we do this may result in a collision with
-    predefined attributes later on.  This can be solved by using one attribute,
-    say __declspec__, and passing args to it.  The problem with that approach
-    is that args are not accumulated: each new appearance would clobber any
-    existing args.  */
- 
- #ifdef CPP_PREDEFINES
- #undef CPP_PREDEFINES
- #endif
- 
- #define CPP_PREDEFINES "-Di386 -D_WIN32 \
-   -DWINNT  -D_X86_=1 -D__STDC__=1\
-   -D__stdcall=__attribute__((__stdcall__)) \
-   -D__cdecl=__attribute__((__cdecl__)) \
-   -D__declspec(x)=__attribute__((x)) \
-   -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
- 
- /* Normally, -lgcc is not needed since everything in it is in the DLL, but we
-    want to allow things to be added to it when installing new versions of
-    GCC without making a new CYGWIN.DLL, so we leave it.  Profiling is handled
-    by calling the init function from the prologue. */
- 
- #undef STARTFILE_SPEC
- #define STARTFILE_SPEC "%{mdll: %{!mno-cygwin:dllcrt0%O%s} \
-                                 %{mno-cygwin:dllcrt1%O%s}} \
-                         %{!mdll: %{!mno-cygwin:crt0%O%s} \
-                                  %{mno-cygwin:crt1%O%s} %{pg:gcrt0%O%s}}"
- 
- #undef CPP_SPEC
- #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
-   %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__} \
-   %{mno-cygwin:-iwithprefixbefore include/mingw32 -D__MINGW32__=0.2}"
- 
- /* 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
-    'libcygwin.a'.  For Windows applications, include more libraries, but
-    always include kernel32.  We'd like to specific subsystem windows to
-    ld, but that doesn't work just yet.  */
- 
- #undef LIB_SPEC
- #define LIB_SPEC "%{pg:-lgmon} \
-                   %{!mno-cygwin:-lcygwin} \
-                   %{mno-cygwin:-lmingw32 -lmoldname -lcrtdll} \
-                   %{mwindows:-luser32 -lgdi32 -lcomdlg32} \
- 		  -lkernel32 -ladvapi32 -lshell32"
- 
- #define LINK_SPEC "%{mwindows:--subsystem windows} \
-                    %{mdll:--dll -e _DllMainCRTStartup@12}"
- 
- 
- #define SIZE_TYPE "unsigned int"
- #define PTRDIFF_TYPE "int"
- #define WCHAR_UNSIGNED 1
- #define WCHAR_TYPE_SIZE 16
- #define WCHAR_TYPE "short unsigned int"
- 
- #define HAVE_ATEXIT 1
- 
- 
- /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop).  */
- #define HANDLE_PRAGMA_PACK_PUSH_POP 1
- 
- /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
-    is a valid machine specific attribute for DECL.
-    The attributes in ATTRIBUTES have previously been assigned to DECL.  */
- extern int i386_pe_valid_decl_attribute_p ();
- 
- #undef VALID_MACHINE_DECL_ATTRIBUTE
- #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
-   i386_pe_valid_decl_attribute_p (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
- 
- /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
-    is a valid machine specific attribute for TYPE.
-    The attributes in ATTRIBUTES have previously been assigned to TYPE.  */
- 
- #undef VALID_MACHINE_TYPE_ATTRIBUTE
- #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
-   i386_pe_valid_type_attribute_p (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)
- extern int i386_pe_valid_type_attribute_p ();
- 
- extern union tree_node *i386_pe_merge_decl_attributes ();
- #define MERGE_MACHINE_DECL_ATTRIBUTES(OLD, NEW) \
-   i386_pe_merge_decl_attributes ((OLD), (NEW))
- 
- /* Used to implement dllexport overriding dllimport semantics.  It's also used
-    to handle vtables - the first pass won't do anything because
-    DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0.
-    It's also used to handle dllimport override semantics.  */
- #if 0
- #define REDO_SECTION_INFO_P(DECL) \
-   ((DECL_MACHINE_ATTRIBUTES (DECL) != NULL_TREE) \
-    || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL)))
- #else
- #define REDO_SECTION_INFO_P(DECL) 1
- #endif
- 
- 
- #undef EXTRA_SECTIONS
- #define EXTRA_SECTIONS in_ctor, in_dtor, in_drectve
- 
- #undef EXTRA_SECTION_FUNCTIONS
- #define EXTRA_SECTION_FUNCTIONS					\
-   CTOR_SECTION_FUNCTION						\
-   DTOR_SECTION_FUNCTION						\
-   DRECTVE_SECTION_FUNCTION					\
-   SWITCH_TO_SECTION_FUNCTION
- 
- #define CTOR_SECTION_FUNCTION					\
- void								\
- ctor_section ()							\
- {								\
-   if (in_section != in_ctor)					\
-     {								\
-       fprintf (asm_out_file, "\t.section .ctor\n");		\
-       in_section = in_ctor;					\
-     }								\
- }
- 
- #define DTOR_SECTION_FUNCTION					\
- void								\
- dtor_section ()							\
- {								\
-   if (in_section != in_dtor)					\
-     {								\
-       fprintf (asm_out_file, "\t.section .dtor\n");		\
-       in_section = in_dtor;					\
-     }								\
- }
- 
- #define DRECTVE_SECTION_FUNCTION \
- void									\
- drectve_section ()							\
- {									\
-   if (in_section != in_drectve)						\
-     {									\
-       fprintf (asm_out_file, "%s\n", "\t.section .drectve\n");		\
-       in_section = in_drectve;						\
-     }									\
- }
- 
- /* Switch to SECTION (an `enum in_section').
- 
-    ??? This facility should be provided by GCC proper.
-    The problem is that we want to temporarily switch sections in
-    ASM_DECLARE_OBJECT_NAME and then switch back to the original section
-    afterwards.  */
- #define SWITCH_TO_SECTION_FUNCTION 				\
- void 								\
- switch_to_section (section, decl) 				\
-      enum in_section section; 					\
-      tree decl; 						\
- { 								\
-   switch (section) 						\
-     { 								\
-       case in_text: text_section (); break; 			\
-       case in_data: data_section (); break; 			\
-       case in_named: named_section (decl, NULL, 0); break; 	\
-       case in_ctor: ctor_section (); break; 			\
-       case in_dtor: dtor_section (); break; 			\
-       case in_drectve: drectve_section (); break; 		\
-       default: abort (); break; 				\
-     } 								\
- }
- 
- #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)	\
-   do {						\
-     ctor_section ();				\
-     fprintf (FILE, "%s\t", ASM_LONG);		\
-     assemble_name (FILE, NAME);			\
-     fprintf (FILE, "\n");			\
-   } while (0)
- 
- #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)       	\
-   do {						\
-     dtor_section ();                   		\
-     fprintf (FILE, "%s\t", ASM_LONG);		\
-     assemble_name (FILE, NAME);			\
-     fprintf (FILE, "\n");			\
-   } while (0)
- 
- /* 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 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.
- 
-    In addition, we must mark dll symbols specially. Definitions of 
-    dllexport'd objects install some info in the .drectve section.  
-    References to dllimport'd objects are fetched indirectly via
-    _imp__.  If both are declared, dllexport overrides.  This is also 
-    needed to implement one-only vtables: they go into their own
-    section and we need to set DECL_SECTION_NAME so we do that here.
-    Note that we can be called twice on the same decl.  */
- 
- extern void i386_pe_encode_section_info ();
- 
- #ifdef ENCODE_SECTION_INFO
- #undef ENCODE_SECTION_INFO
- #endif
- #define ENCODE_SECTION_INFO(DECL) i386_pe_encode_section_info (DECL)
- 
- /* Utility used only in this file.  */
- #define I386_PE_STRIP_ENCODING(SYM_NAME) \
-   ((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0))
- 
- /* This macro gets just the user-specified name
-    out of the string in a SYMBOL_REF.  Discard
-    trailing @[NUM] encoded by ENCODE_SECTION_INFO.  */
- #undef  STRIP_NAME_ENCODING
- #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME)				\
- do {									\
-   char *_p;								\
-   char *_name = I386_PE_STRIP_ENCODING (SYMBOL_NAME);			\
-   for (_p = _name; *_p && *_p != '@'; ++_p)				\
-     ;									\
-   if (*_p == '@')							\
-     {									\
-       int _len = _p - _name;						\
-       (VAR) = (char *) alloca (_len + 1);				\
-       strncpy ((VAR), _name, _len);					\
-       (VAR)[_len] = '\0';						\
-     }									\
-   else									\
-     (VAR) = _name;							\
- } while (0)
-       
- 
- /* Output a reference to a label.  */
- #undef ASM_OUTPUT_LABELREF
- #define ASM_OUTPUT_LABELREF(STREAM, NAME)  		\
-   fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, 		\
-            I386_PE_STRIP_ENCODING (NAME))		\
- 
- /* Output a common block.  */
- #undef ASM_OUTPUT_COMMON
- #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED)	\
- do {							\
-   if (i386_pe_dllexport_name_p (NAME))			\
-     {							\
-       drectve_section ();				\
-       fprintf ((STREAM), "\t.ascii \" -export:%s\"\n",	\
-                I386_PE_STRIP_ENCODING (NAME));		\
-     }							\
-   if (! i386_pe_dllimport_name_p (NAME))		\
-     {							\
-       fprintf ((STREAM), "\t.comm\t"); 			\
-       assemble_name ((STREAM), (NAME));			\
-       fprintf ((STREAM), ", %d\t%s %d\n",		\
- 	       (ROUNDED), ASM_COMMENT_START, (SIZE));	\
-     }							\
- } while (0)
- 
- /* Output the label for an initialized variable.  */
- #undef ASM_DECLARE_OBJECT_NAME
- #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) 	\
- do {							\
-   if (i386_pe_dllexport_name_p (NAME))			\
-     {							\
-       enum in_section save_section = in_section;	\
-       drectve_section ();				\
-       fprintf ((STREAM), "\t.ascii \" -export:%s\"\n",	\
-                I386_PE_STRIP_ENCODING (NAME));		\
-       switch_to_section (save_section, (DECL));		\
-     }							\
-   ASM_OUTPUT_LABEL ((STREAM), (NAME));			\
- } while (0)
- 
- 
- /* Emit code to check the stack when allocating more that 4000
-    bytes in one go. */
- 
- #define CHECK_STACK_LIMIT 4000
- 
- /* By default, target has a 80387, uses IEEE compatible arithmetic,
-    and returns float values in the 387 and needs stack probes */
- #undef TARGET_DEFAULT
- 
- #define TARGET_DEFAULT \
-    (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE) 
- 
- /* This is how to output an assembler line
-    that says to advance the location counter
-    to a multiple of 2**LOG bytes.  */
- 
- #undef ASM_OUTPUT_ALIGN
- #define ASM_OUTPUT_ALIGN(FILE,LOG)	\
-     if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
- 
- /* Define this macro if in some cases global symbols from one translation
-    unit may not be bound to undefined symbols in another translation unit
-    without user intervention.  For instance, under Microsoft Windows
-    symbols must be explicitly imported from shared libraries (DLLs).  */
- #define MULTIPLE_SYMBOL_SPACES
- 
- #define UNIQUE_SECTION_P(DECL) DECL_ONE_ONLY (DECL)
- extern void i386_pe_unique_section ();
- #define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC)
- 
- #define SUPPORTS_ONE_ONLY 1
- 
- /* A C statement to output something to the assembler file to switch to section
-    NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
-    NULL_TREE.  Some target formats do not support arbitrary sections.  Do not
-    define this macro in such cases.  */
- #undef ASM_OUTPUT_SECTION_NAME
- #define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC)		\
- do {									\
-   static struct section_info						\
-     {									\
-       struct section_info *next;					\
-       char *name;							\
-       enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type;		\
-     } *sections;							\
-   struct section_info *s;						\
-   char *mode;								\
-   enum sect_enum type;							\
- 									\
-   for (s = sections; s; s = s->next)					\
-     if (!strcmp (NAME, s->name))					\
-       break;								\
- 									\
-   if (DECL && TREE_CODE (DECL) == FUNCTION_DECL)			\
-     type = SECT_EXEC, mode = "x";					\
-   else if (DECL && DECL_READONLY_SECTION (DECL, RELOC))			\
-     type = SECT_RO, mode = "";						\
-   else									\
-     type = SECT_RW, mode = "w";						\
- 									\
-   if (s == 0)								\
-     {									\
-       s = (struct section_info *) xmalloc (sizeof (struct section_info)); \
-       s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME));		\
-       strcpy (s->name, NAME);						\
-       s->type = type;							\
-       s->next = sections;						\
-       sections = s;							\
-       fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode);		\
-       /* Functions may have been compiled at various levels of		\
-          optimization so we can't use `same_size' here.  Instead,	\
-          have the linker pick one.  */					\
-       if ((DECL) && DECL_ONE_ONLY (DECL))				\
-         fprintf (STREAM, "\t.linkonce %s\n",				\
- 	         TREE_CODE (DECL) == FUNCTION_DECL			\
- 	         ? "discard" : "same_size");				\
-     }									\
-   else									\
-     {									\
-       fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode);		\
-     }									\
- } while (0)
- 
- /* Write the extra assembler code needed to declare a function
-    properly.  If we are generating SDB debugging information, this
-    will happen automatically, so we only need to handle other cases.  */
- #undef ASM_DECLARE_FUNCTION_NAME
- #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)			\
-   do									\
-     {									\
-       if (i386_pe_dllexport_name_p (NAME))				\
- 	{								\
- 	  drectve_section ();						\
- 	  fprintf ((FILE), "\t.ascii \" -export:%s\"\n", 		\
- 		   I386_PE_STRIP_ENCODING (NAME));			\
- 	  function_section (DECL);					\
- 	}								\
-       if (write_symbols != SDB_DEBUG)					\
- 	i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL));	\
-       ASM_OUTPUT_LABEL (FILE, NAME);					\
-     }									\
-   while (0)
- 
- /* Add an external function to the list of functions to be declared at
-    the end of the file.  */
- #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)				\
-   do									\
-     {									\
-       if (TREE_CODE (DECL) == FUNCTION_DECL)				\
- 	i386_pe_record_external_function (NAME);			\
-     }									\
-   while (0)
- 
- /* Declare the type properly for any external libcall.  */
- #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
-   i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)
- 
- /* Output function declarations at the end of the file.  */
- #define ASM_FILE_END(FILE) \
-   i386_pe_asm_file_end (FILE)
- 
- #undef ASM_COMMENT_START
- #define ASM_COMMENT_START " #"
- 
- /* DWARF2 Unwinding doesn't work with exception handling yet. */
- #define DWARF2_UNWIND_INFO 0
- 
- /* Don't assume anything about the header files. */
- #define NO_IMPLICIT_EXTERN_C
- 
- #define SUBTARGET_PROLOGUE						\
-   if (profile_flag 							\
-       && strcmp (IDENTIFIER_POINTER (DECL_NAME (current_function_decl)),\
- 		 "main") == 0)						\
-      {									\
-       rtx xops[1];							\
-       xops[0] = gen_rtx_MEM (FUNCTION_MODE,				\
- 			 gen_rtx (SYMBOL_REF, Pmode, "_monstartup"));	\
-       if (do_rtl)							\
- 	emit_call_insn (gen_rtx (CALL, VOIDmode, xops[0], const0_rtx));	\
-       else								\
- 	output_asm_insn (AS1 (call,%P1), xops);			\
-      }
- 
- /* External function declarations.  */
- 
- #ifndef PROTO
- #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
- #define PROTO(ARGS) ARGS
- #else
- #define PROTO(ARGS) ()
- #endif
- #endif
- 
- #ifdef BUFSIZ		/* stdio.h has been included, ok to use FILE * */
- #define STDIO_PROTO(ARGS) PROTO(ARGS)
- #else
- #define STDIO_PROTO(ARGS) ()
- #endif
- 
- extern void i386_pe_record_external_function PROTO((char *));
- extern void i386_pe_declare_function_type STDIO_PROTO((FILE *, char *, int));
- extern void i386_pe_asm_file_end STDIO_PROTO((FILE *));
- 
- /* For Win32 ABI compatibility */
- #undef DEFAULT_PCC_STRUCT_RETURN
- #define DEFAULT_PCC_STRUCT_RETURN 0
- 
- /* No data type wants to be aligned rounder than this.  */
- #undef	BIGGEST_ALIGNMENT
- #define BIGGEST_ALIGNMENT 128
- 
- /* A bitfield declared as `int' forces `int' alignment for the struct.  */
- #undef PCC_BITFIELDS_TYPE_MATTERS
- #define PCC_BITFIELDS_TYPE_MATTERS 0
- 
--- 0 ----
Index: config/i386/mingw32.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/i386/mingw32.h,v
retrieving revision 1.13
diff -c -3 -p -r1.13 mingw32.h
*** config/i386/mingw32.h	1998/11/11 05:52:15	1.13
--- config/i386/mingw32.h	1998/11/12 02:07:38
*************** along with GNU CC; see the file COPYING.
*** 21,30 ****
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA. */
  
! /* Most of this is the same as for Cygwin32, except for changing some
     specs.  */
  
! #include "i386/cygwin32.h"
  
  /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The
     only difference between the two should be __MSVCRT__ needed to 
--- 21,30 ----
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA. */
  
! /* Most of this is the same as for cygwin, except for changing some
     specs.  */
  
! #include "i386/cygwin.h"
  
  /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The
     only difference between the two should be __MSVCRT__ needed to 
Index: config/i386/t-cygwin
===================================================================
RCS file: t-cygwin
diff -N t-cygwin
*** config/i386/t-cygwin	Mon Dec 31 20:00:00 1979
--- config/i386/t-cygwin	Wed Nov 11 18:07:38 1998
***************
*** 0 ****
--- 1,16 ----
+ LIBGCC1 = libgcc1-asm.a
+ CROSS_LIBGCC1 = libgcc1-asm.a
+ LIB1ASMSRC = i386/cygwin.asm
+ LIB1ASMFUNCS = _chkstk
+ 
+ # cygwin always has a limits.h, but, depending upon how we are doing
+ # the build, it may not be installed yet.
+ LIMITS_H_TEST = true
+ 
+ # If we are building next to winsup, this will let us find the real
+ # limits.h when building libgcc2.  Otherwise, winsup must be installed
+ # first.
+ LIBGCC2_INCLUDES = -I$(srcdir)/../winsup/include
+ 
+ winnt.o: $(srcdir)/config/i386/winnt.c
+ 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/winnt.c
Index: config/i386/t-cygwin32
===================================================================
RCS file: t-cygwin32
diff -N t-cygwin32
*** config/i386/t-cygwin32	Wed Nov 11 18:07:57 1998
--- config/i386/t-cygwin32	Mon Dec 31 20:00:00 1979
***************
*** 1,16 ****
- LIBGCC1 = libgcc1-asm.a
- CROSS_LIBGCC1 = libgcc1-asm.a
- LIB1ASMSRC = i386/cygwin32.asm
- LIB1ASMFUNCS = _chkstk
- 
- # cygwin32 always has a limits.h, but, depending upon how we are doing
- # the build, it may not be installed yet.
- LIMITS_H_TEST = true
- 
- # If we are building next to winsup, this will let us find the real
- # limits.h when building libgcc2.  Otherwise, winsup must be installed
- # first.
- LIBGCC2_INCLUDES = -I$(srcdir)/../winsup/include
- 
- winnt.o: $(srcdir)/config/i386/winnt.c
- 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/winnt.c
--- 0 ----
Index: config/i386/win32.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/i386/win32.h,v
retrieving revision 1.14
diff -c -3 -p -r1.14 win32.h
*** config/i386/win32.h	1998/11/11 05:52:19	1.14
--- config/i386/win32.h	1998/11/12 02:07:38
*************** Boston, MA 02111-1307, USA. */
*** 71,77 ****
  #undef CPP_SPEC
  #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
    %{!mcygwin:-iwithprefixbefore include/mingw32 -D__MINGW32__}    \
!   %{mcygwin:-D__CYGWIN32__}"
  
  /* 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
--- 71,77 ----
  #undef CPP_SPEC
  #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
    %{!mcygwin:-iwithprefixbefore include/mingw32 -D__MINGW32__}    \
!   %{mcygwin:-D__CYGWIN32__ -D__CYGWIN__}"
  
  /* 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
Index: config/i386/winnt.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/i386/winnt.c,v
retrieving revision 1.20
diff -c -3 -p -r1.20 winnt.c
*** config/i386/winnt.c	1998/11/11 05:52:19	1.20
--- config/i386/winnt.c	1998/11/12 02:07:39
*************** i386_pe_unique_section (decl, reloc)
*** 493,499 ****
  }
  
  /* The Microsoft linker requires that every function be marked as
!    DT_FCN.  When using gas on cygwin32, we must emit appropriate .type
     directives.  */
  
  #include "gsyms.h"
--- 493,499 ----
  }
  
  /* The Microsoft linker requires that every function be marked as
!    DT_FCN.  When using gas on cygwin, we must emit appropriate .type
     directives.  */
  
  #include "gsyms.h"
Index: config/i386/x-cygwin
===================================================================
RCS file: x-cygwin
diff -N x-cygwin
*** config/i386/x-cygwin	Mon Dec 31 20:00:00 1979
--- config/i386/x-cygwin	Wed Nov 11 18:07:39 1998
***************
*** 0 ****
--- 1,4 ----
+ # Don't run fixproto
+ STMP_FIXPROTO =
+ # prefix.c wants to poke around the Registry
+ CLIB = -ladvapi32
Index: config/i386/x-cygwin32
===================================================================
RCS file: x-cygwin32
diff -N x-cygwin32
*** config/i386/x-cygwin32	Wed Nov 11 18:07:57 1998
--- config/i386/x-cygwin32	Mon Dec 31 20:00:00 1979
***************
*** 1,4 ****
- # Don't run fixproto
- STMP_FIXPROTO =
- # prefix.c wants to poke around the Registry
- CLIB = -ladvapi32
--- 0 ----
Index: config/i386/xm-cygwin.h
===================================================================
RCS file: xm-cygwin.h
diff -N xm-cygwin.h
*** config/i386/xm-cygwin.h	Mon Dec 31 20:00:00 1979
--- config/i386/xm-cygwin.h	Wed Nov 11 18:07:39 1998
***************
*** 0 ****
--- 1,57 ----
+ /* Configuration for GNU C-compiler for hosting on Windows NT.
+    using a unix style C library.
+    Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ 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 EXECUTABLE_SUFFIX ".exe"
+ #define NO_SYS_SIGLIST 1
+ #define HAVE_BCOPY 1
+ #define HAVE_BZERO 1
+ #define HAVE_BCMP 1
+ #define HAVE_RINDEX 1
+ #define HAVE_INDEX 1
+ 
+ /* Even though we support "/", allow "\" since everybody tests both.  */
+ #define DIR_SEPARATOR '\\'
+ 
+ /* If we allow both '/' and '\' as dir separators, then
+    allow both unix and win32 PATH syntax */
+ #undef GET_ENV_PATH_LIST
+ #define GET_ENV_PATH_LIST(VAR,NAME)					\
+ do {									\
+   char *_epath;								\
+   char *_win32epath;							\
+   _epath = _win32epath = getenv (NAME);					\
+   /* if we have a posix path list, convert to win32 path list */	\
+   if (_epath != NULL && *_epath != 0					\
+       && cygwin_posix_path_list_p (_epath))				\
+     {									\
+       _win32epath = (char *) xmalloc					\
+ 	(cygwin_posix_to_win32_path_list_buf_size (_epath));		\
+       cygwin_posix_to_win32_path_list (_epath, _win32epath);		\
+     }									\
+   (VAR) = _win32epath;							\
+ } while (0)
+ 
+ #define PATH_SEPARATOR ';'
+ 
+ /* This is needed so that protoize will compile.  */
+ #ifndef POSIX
+ #define POSIX
+ #endif
Index: config/i386/xm-cygwin32.h
===================================================================
RCS file: xm-cygwin32.h
diff -N xm-cygwin32.h
*** config/i386/xm-cygwin32.h	Wed Nov 11 18:07:57 1998
--- config/i386/xm-cygwin32.h	Mon Dec 31 20:00:00 1979
***************
*** 1,57 ****
- /* Configuration for GNU C-compiler for hosting on Windows NT.
-    using a unix style C library.
-    Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- 
- This file is part of GNU CC.
- 
- GNU CC is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
- 
- GNU CC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- 
- You should have received a copy of the GNU General Public License
- 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 EXECUTABLE_SUFFIX ".exe"
- #define NO_SYS_SIGLIST 1
- #define HAVE_BCOPY 1
- #define HAVE_BZERO 1
- #define HAVE_BCMP 1
- #define HAVE_RINDEX 1
- #define HAVE_INDEX 1
- 
- /* Even though we support "/", allow "\" since everybody tests both.  */
- #define DIR_SEPARATOR '\\'
- 
- /* If we allow both '/' and '\' as dir separators, then
-    allow both unix and win32 PATH syntax */
- #undef GET_ENV_PATH_LIST
- #define GET_ENV_PATH_LIST(VAR,NAME)					\
- do {									\
-   char *_epath;								\
-   char *_win32epath;							\
-   _epath = _win32epath = getenv (NAME);					\
-   /* if we have a posix path list, convert to win32 path list */	\
-   if (_epath != NULL && *_epath != 0					\
-       && cygwin32_posix_path_list_p (_epath))				\
-     {									\
-       _win32epath = (char *) xmalloc					\
- 	(cygwin32_posix_to_win32_path_list_buf_size (_epath));		\
-       cygwin32_posix_to_win32_path_list (_epath, _win32epath);		\
-     }									\
-   (VAR) = _win32epath;							\
- } while (0)
- 
- #define PATH_SEPARATOR ';'
- 
- /* This is needed so that protoize will compile.  */
- #ifndef POSIX
- #define POSIX
- #endif
--- 0 ----
cvs server: Diffing config/i860
cvs server: Diffing config/rs6000
Index: config/rs6000/cygwin.h
===================================================================
RCS file: cygwin.h
diff -N cygwin.h
*** config/rs6000/cygwin.h	Mon Dec 31 20:00:00 1979
--- config/rs6000/cygwin.h	Wed Nov 11 18:07:40 1998
***************
*** 0 ****
--- 1,67 ----
+ /* Operating system specific defines to be used when targeting GCC for
+    hosting on Windows NT 3.x, using the Cygnus API 
+ 
+    This is different to the winnt.h file, since that is used
+    to build GCC for use with a windows style library and tool
+    set, winnt.h uses the Microsoft tools to do that.
+ 
+    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ 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. */
+ 
+ 
+ /* Ugly hack */
+ #include "rs6000/win-nt.h"
+ 
+ 
+ #ifdef CPP_PREDEFINES
+ #undef CPP_PREDEFINES
+ #endif
+ 
+ #define	CPP_PREDEFINES "-D_WIN32 -DWINNT -D__CYGWIN__ -D__CYGWIN32__ -DPOSIX \
+   -D_POWER -D_ARCH_PPC -D__PPC__ -Asystem(winnt) -Acpu(powerpc) -Amachine(powerpc)"
+ 
+ #undef CPP_SPEC
+ #define CPP_SPEC "-remap %{posix: -D_POSIX_SOURCE} %(cpp_cpu)"
+ 
+ /* 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
+    'libcygwin.a'.  For Windows applications, include more libraries, but
+    always include kernel32.  We'd like to specific subsystem windows to
+    ld, but that doesn't work just yet.  */
+ 
+ #undef LIB_SPEC
+ #define LIB_SPEC "-lcygwin %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32"
+ 
+ #undef	LINK_SPEC
+ #define	LINK_SPEC "%{v:-V}"
+ 
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC "crti%O%s crt0%O%s"
+ 
+ #undef	ENDFILE_SPEC
+ #define	ENDFILE_SPEC "crtn%O%s"
+ 
+ #define PTRDIFF_TYPE "int"
+ #define WCHAR_UNSIGNED 1
+ #define WCHAR_TYPE_SIZE 16
+ #define WCHAR_TYPE "short unsigned int"
+ 
+ #define DBX_DEBUGGING_INFO 
+ #undef SDB_DEBUGGING_INFO 
+ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
Index: config/rs6000/cygwin32.h
===================================================================
RCS file: cygwin32.h
diff -N cygwin32.h
*** config/rs6000/cygwin32.h	Wed Nov 11 18:07:57 1998
--- config/rs6000/cygwin32.h	Mon Dec 31 20:00:00 1979
***************
*** 1,67 ****
- /* Operating system specific defines to be used when targeting GCC for
-    hosting on Windows NT 3.x, using the Cygnus API 
- 
-    This is different to the winnt.h file, since that is used
-    to build GCC for use with a windows style library and tool
-    set, winnt.h uses the Microsoft tools to do that.
- 
-    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- 
- This file is part of GNU CC.
- 
- GNU CC is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
- 
- GNU CC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- 
- You should have received a copy of the GNU General Public License
- 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. */
- 
- 
- /* Ugly hack */
- #include "rs6000/win-nt.h"
- 
- 
- #ifdef CPP_PREDEFINES
- #undef CPP_PREDEFINES
- #endif
- 
- #define	CPP_PREDEFINES "-D_WIN32 -DWINNT -D__CYGWIN32__ -DPOSIX \
-   -D_POWER -D_ARCH_PPC -D__PPC__ -Asystem(winnt) -Acpu(powerpc) -Amachine(powerpc)"
- 
- #undef CPP_SPEC
- #define CPP_SPEC "-remap %{posix: -D_POSIX_SOURCE} %(cpp_cpu)"
- 
- /* 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
-    'libcygwin.a'.  For Windows applications, include more libraries, but
-    always include kernel32.  We'd like to specific subsystem windows to
-    ld, but that doesn't work just yet.  */
- 
- #undef LIB_SPEC
- #define LIB_SPEC "-lcygwin %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32"
- 
- #undef	LINK_SPEC
- #define	LINK_SPEC "%{v:-V}"
- 
- #undef STARTFILE_SPEC
- #define STARTFILE_SPEC "crti%O%s crt0%O%s"
- 
- #undef	ENDFILE_SPEC
- #define	ENDFILE_SPEC "crtn%O%s"
- 
- #define PTRDIFF_TYPE "int"
- #define WCHAR_UNSIGNED 1
- #define WCHAR_TYPE_SIZE 16
- #define WCHAR_TYPE "short unsigned int"
- 
- #define DBX_DEBUGGING_INFO 
- #undef SDB_DEBUGGING_INFO 
- #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
--- 0 ----
Index: config/rs6000/x-cygwin
===================================================================
RCS file: x-cygwin
diff -N x-cygwin
*** config/rs6000/x-cygwin	Mon Dec 31 20:00:00 1979
--- config/rs6000/x-cygwin	Wed Nov 11 18:07:40 1998
***************
*** 0 ****
--- 1,4 ----
+ # Don't run fixproto
+ STMP_FIXPROTO =
+ # Don't need collect2
+ USE_COLLECT2 =
Index: config/rs6000/x-cygwin32
===================================================================
RCS file: x-cygwin32
diff -N x-cygwin32
*** config/rs6000/x-cygwin32	Wed Nov 11 18:07:57 1998
--- config/rs6000/x-cygwin32	Mon Dec 31 20:00:00 1979
***************
*** 1,4 ****
- # Don't run fixproto
- STMP_FIXPROTO =
- # Don't need collect2
- USE_COLLECT2 =
--- 0 ----
Index: config/rs6000/xm-cygwin.h
===================================================================
RCS file: xm-cygwin.h
diff -N xm-cygwin.h
*** config/rs6000/xm-cygwin.h	Mon Dec 31 20:00:00 1979
--- config/rs6000/xm-cygwin.h	Wed Nov 11 18:07:40 1998
***************
*** 0 ****
--- 1 ----
+ #define EXECUTABLE_SUFFIX ".exe"
Index: config/rs6000/xm-cygwin32.h
===================================================================
RCS file: xm-cygwin32.h
diff -N xm-cygwin32.h
*** config/rs6000/xm-cygwin32.h	Wed Nov 11 18:07:57 1998
--- config/rs6000/xm-cygwin32.h	Mon Dec 31 20:00:00 1979
***************
*** 1 ****
- #define EXECUTABLE_SUFFIX ".exe"
--- 0 ----
cvs server: Diffing config/sh
cvs server: Diffing config/sparc
cvs server: Diffing config/spur
cvs server: Diffing config/tahoe










More information about the Gcc-patches mailing list