Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Ralf Friedl
Tue, 17 Nov 1992 14:27
GCC 2.3.1 on 4.3bsd-net2
Author: Ralf Friedl
Date: Tue, 17 Nov 1992 14:27
Date: Tue, 17 Nov 1992 14:27
147 lines
5480 bytes
5480 bytes
I'm using a sytem based on 4.3bsd-net2, running on i386.
I made the following changes to compile gcc 2.3.1:
The file limitx.h, defines the symbol _LIMITS_H_, and includes
syslimits.h. syslimits.h includes the system's limits.h. But the
system's limits.h checks the symbol _LIMITS_H_, and is therefor not
included. A fix is to define _LIMITS_H_ after including syslimits.h.
This affects all systems that use _LIMITS_H_ in limits.h. This change
is not included in the following diffs.
In gstddef.h, gstdarg.h and gvarargs.h,
#include <ansi.h>
must be chaned to
#include <machine/ansi.h>
The definition of size_t, ptrdiff_t and wchar_t in gstddef.h must be
changed. To make sure that the types of the builtin function
declarations and those in the header files are the same, the file
machine/ansi.h can be changed so that it uses the compiler defined
types if compiled with GCC 2 :
>From machine/ansi.h:
#if __GNUC__ >= 2
#define _PTRDIFF_T_ __PTRDIFF_TYPE__ /* ptr1 - ptr2 */
#define _SIZE_T_ __SIZE_TYPE__ /* sizeof() */
#define _WCHAR_T_ __WCHAR_TYPE__ /* wchar_t */
#else
#define _PTRDIFF_T_ int /* ptr1 - ptr2 */
#define _SIZE_T_ unsigned int /* sizeof() */
#define _WCHAR_T_ unsigned short /* wchar_t */
#endif
The generated symbols need underscores.
diff -ur /usr/src/oldgnu/gcc-2.3.1/config/i386bsd.h /usr/src/gnu/gcc-2.3.1/config/i386bsd.h
--- /usr/src/oldgnu/gcc-2.3.1/config/i386bsd.h Thu Oct 29 00:01:32 1992
+++ /usr/src/gnu/gcc-2.3.1/config/i386bsd.h Sun Nov 8 01:04:20 1992
@@ -1,4 +1,6 @@
/* Configuration for an i386 running 386BSD as the target machine. */
+#define YES_UNDERSCORES
+
#include "i386mach.h"
#undef CPP_PREDEFINES
@@ -6,3 +8,5 @@
/* Specify extra dir to search for include files. */
#undef SYSTEM_INCLUDE_DIR
+
+#undef SIZE_TYPE
diff -ur /usr/src/oldgnu/gcc-2.3.1/gstdarg.h /usr/src/gnu/gcc-2.3.1/gstdarg.h
--- /usr/src/oldgnu/gcc-2.3.1/gstdarg.h Fri Oct 30 10:42:31 1992
+++ /usr/src/gnu/gcc-2.3.1/gstdarg.h Sat Nov 7 19:59:10 1992
@@ -108,7 +108,7 @@
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____)
-#include <ansi.h>
+#include <machine/ansi.h>
#endif
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which remain
diff -ur /usr/src/oldgnu/gcc-2.3.1/gstddef.h /usr/src/gnu/gcc-2.3.1/gstddef.h
--- /usr/src/oldgnu/gcc-2.3.1/gstddef.h Thu Oct 29 22:14:12 1992
+++ /usr/src/gnu/gcc-2.3.1/gstddef.h Sat Nov 7 19:05:27 1992
@@ -13,32 +13,36 @@
#define _ANSI_STDDEF_H
#endif
-#ifndef __sys_stdtypes_h
-/* This avoids lossage on SunOS but only if stdtypes.h comes first.
- There's no way to win with the other order! Sun lossage. */
-
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____)
-#include <ansi.h>
-#endif
+#include <machine/ansi.h>
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
defined if the corresponding type is *not* defined. */
-#ifdef _ANSI_H_
-#ifndef _SIZE_T_
+#ifdef _SIZE_T_
+typedef _SIZE_T_ size_t;
+#undef _SIZE_T_
+#endif
#define _SIZE_T
+
+#ifdef _PTRDIFF_T_
+typedef _PTRDIFF_T_ ptrdiff_t;
+#undef _PTRDIFF_T_
#endif
-#ifndef _PTRDIFF_T_
#define _PTRDIFF_T
+
+#ifdef _WCHAR_T_
+typedef _WCHAR_T_ wchar_t;
+#undef _WCHAR_T_
#endif
-#ifndef _WCHAR_T_
#define _WCHAR_T
-#endif
-#undef _SIZE_T_
-#undef _PTRDIFF_T_
-#undef _WCHAR_T_
-#endif /* _ANSI_H_ */
+
+#endif /* defined (__BSD_NET2__) || defined (____386BSD____) */
+
+#ifndef __sys_stdtypes_h
+/* This avoids lossage on SunOS but only if stdtypes.h comes first.
+ There's no way to win with the other order! Sun lossage. */
/* In case nobody has defined these types, but we aren't running under
GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
@@ -166,11 +170,13 @@
are already defined. We need not worry about the case of wanting just
one of these types, not on 4.3bsd-net2, because only the GNU libc
header files do that. */
+/* These are undef'd already
#ifdef _ANSI_H_
#undef _PTRDIFF_T_
#undef _SIZE_T_
#undef _WCHAR_T_
#endif
+*/
#endif /* __sys_stdtypes_h */
diff -ur /usr/src/oldgnu/gcc-2.3.1/gvarargs.h /usr/src/gnu/gcc-2.3.1/gvarargs.h
--- /usr/src/oldgnu/gcc-2.3.1/gvarargs.h Fri Oct 30 10:33:19 1992
+++ /usr/src/gnu/gcc-2.3.1/gvarargs.h Fri Nov 6 23:31:27 1992
@@ -122,7 +122,7 @@
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____)
-#include <ansi.h>
+#include <machine/ansi.h>
#endif
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which remain
----
Ralf Friedl
friedl@informatik.uni-kl.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads