This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Interix, batch II.


Attached is a further set of patches needed to allow egcs to build on
Interix (i386).  These patches are all specific to Interix and will
have no effect on other systems.

NOTE.... This patch should be applied and then a file should be renamed!
  config/i386/interix.h -> config/i386/i386-interix.h

This is because the Microsoft compilers use a different search procedure
than Unix, and were picking up the wrong include file (in the presence
of identically named files in different directories).

Donn
-- 

===================================================
Donn Terry                  mailto:donn@interix.com
Softway Systems, Inc.        http://www.interix.com
2850 McClelland Dr, Ste. 1800   Ft.Collins CO 80525
Tel: +1-970-204-9900           Fax: +1-970-204-9951
===================================================
Attached is a further set of patches needed to allow egcs to build on
Interix (i386).  These patches are all specific to Interix and will
have no effect on other systems.

NOTE.... This patch should be applied and then a file should be renamed!
  config/i386/interix.h -> config/i386/i386-interix.h

This is because the Microsoft compilers use a different search procedure
than Unix, and were picking up the wrong include file (in the presence
of identically named files in different directories).


ChangeLog for gcc:

Fri Feb 12 22:27:02 1999  Donn Terry (donn@interix.com)
	* config/i386/t-interix: use mostly system headers unchanged.
	  Use system assert.h
	* fixinc.interix: ditto (make almost no-op).
	* config/x-interix.h: build with _ALL_SOURCE
	* config/xm-interix.h: ONLY_INT_FIELDS only when bootstrapping.
	* config/i386/xm-i386-interix.h: new file
	* config/i386: rename interix.h->i386-interix.h
	* gcc/configure:  Use the new files.

----------------
diff -urP egcs.source.old/gcc/config/i386/interix.h egcs.source/gcc/config/i386/interix.h
--- egcs.source.old/gcc/config/i386/interix.h	Sun Jan 31 08:14:46 1999
+++ egcs.source/gcc/config/i386/interix.h	Fri Feb  5 13:03:04 1999
@@ -157,10 +157,10 @@
       register unsigned char *_limited_str = (unsigned char *) (STR);	\
       register unsigned ch;						\
       fprintf ((FILE), "\t%s\t\"", STRING_ASM_OP);			\
-      for (; ch = *_limited_str; _limited_str++)			\
+      for (; (ch = *_limited_str); _limited_str++)			\
         {								\
-	  register int escape;						\
-	  switch (escape = ESCAPES[ch])					\
+	  register int escape = ESCAPES[ch];				\
+	  switch (escape)						\
 	    {								\
 	    case 0:							\
 	      putc (ch, (FILE));					\
diff -urP egcs.source.old/gcc/config/i386/t-interix egcs.source/gcc/config/i386/t-interix
--- egcs.source.old/gcc/config/i386/t-interix	Sun Jan 31 08:14:48 1999
+++ egcs.source/gcc/config/i386/t-interix	Fri Feb  5 13:03:05 1999
@@ -8,3 +8,9 @@
 interix.o: $(srcdir)/config/i386/interix.c
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/interix.c
 
+# System headers will track gcc's needs.
+# Even LANG_EXTRA_HEADERS may be temporary.
+USER_H=$(LANG_EXTRA_HEADERS)
+
+# We don't want this one either.
+INSTALL_ASSERT_H=
diff -urP egcs.source.old/gcc/config/i386/xm-i386-interix.h egcs.source/gcc/config/i386/xm-i386-interix.h
--- egcs.source.old/gcc/config/i386/xm-i386-interix.h	Wed Dec 31 17:00:00 1969
+++ egcs.source/gcc/config/i386/xm-i386-interix.h	Fri Feb  5 13:41:45 1999
@@ -0,0 +1,33 @@
+/* Configuration for GNU compiler
+   for an Intel i386 or later processor running Windows NT 3.x.
+   Copyright (C) 1994 Free Software Foundation, Inc.
+   Contributed by Douglas B. Rupp (drupp@cs.washington.edu)
+
+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.  */
+
+#include <i386/xm-i386.h>
+
+#define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG
+#ifdef __GNUC__
+#   define HOST_WIDEST_INT long long
+#else
+#   define HOST_WIDEST_INT __int64
+#endif
+#define HOST_WIDEST_INT_PRINT_DEC "%lld"
+#define HOST_WIDEST_INT_PRINT_UNSIGNED "%llu"
+#define HOST_WIDEST_INT_PRINT_HEX "0x%llx"
diff -urP egcs.source.old/gcc/config/x-interix egcs.source/gcc/config/x-interix
--- egcs.source.old/gcc/config/x-interix	Sun Jan 31 08:15:24 1999
+++ egcs.source/gcc/config/x-interix	Fri Feb  5 13:03:05 1999
@@ -16,7 +16,8 @@
 SHELL = sh
 
 # Existing CC/GCC may not define -D__INTERIX, so need this here.
-X_CFLAGS= -D__INTERIX
+# Since we want to configure with _ALL_SOURCE, we need to build that way too
+X_CFLAGS= -D__INTERIX -D_ALL_SOURCE
 
 LIBGCC2_INCLUDES = -idirafter $${INTERIX_ROOT}/usr/include
 # Headers come from a funny place
diff -urP egcs.source.old/gcc/config/xm-interix.h egcs.source/gcc/config/xm-interix.h
--- egcs.source.old/gcc/config/xm-interix.h	Sun Jan 31 08:15:24 1999
+++ egcs.source/gcc/config/xm-interix.h	Fri Feb  5 13:03:05 1999
@@ -26,7 +26,9 @@
 #endif
 
 #ifndef ONLY_INT_FIELDS
+#ifndef __GNUC__
 #define ONLY_INT_FIELDS 1
+#endif
 #endif
 
 #ifndef USE_PROTOTYPES

diff -urP egcs.source.old/gcc/configure.in egcs.source/gcc/configure.in
--- egcs.source.old/gcc/configure.in.prev	Fri Feb 12 17:50:34 1999
+++ egcs.source/gcc/configure.in	Fri Feb 12 17:51:30 1999
@@ -1516,8 +1516,8 @@
 changequote(,)dnl
 	i[34567]86-*-interix*)
 changequote([,])dnl
-		tm_file=i386/interix.h
-		xm_file="${xm_file} xm-interix.h"
+		tm_file=i386/i386-interix.h
+		xm_file="i386/xm-i386-interix.h xm-interix.h"
 		xm_defines="USG NO_SYS_SIGLIST"
 		tmake_file="i386/t-interix"
 		extra_objs=interix.o
diff -urP egcs.source.old/gcc/fixinc.interix egcs.source/gcc/fixinc.interix
--- egcs.source.old/gcc/fixinc.interix	Sun Jan 31 08:15:54 1999
+++ egcs.source/gcc/fixinc.interix	Fri Feb  5 13:03:05 1999
@@ -1,4 +1,6 @@
 #!/bin/sh
+rm -f include/stddef.h
+exit
 #
 #   fixinc.interix  --  Install modified versions of Interix system include
 #   files.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]