This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
A small libio patch
- To: egcs at cygnus dot com
- Subject: A small libio patch
- From: hjl at lucon dot org (H.J. Lu)
- Date: Mon, 17 Nov 1997 10:53:44 -0800 (PST)
Here is a small patch for libio. After egcs is installed, I cannot
use gcc 2.7.2.3 anymore since _G_config.h is not compatible with
older gcc. This patch should fix it.
--
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Mon Nov 17 07:36:58 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* gen-params (__extension__): Use only if gcc version >= 2.8.
(NULL): Add support for gcc version < 2.8.
Index: gen-params
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/gen-params,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 gen-params
--- gen-params 1997/11/01 02:21:10 1.1.1.4
+++ gen-params 1997/11/17 18:39:40
@@ -382,8 +382,10 @@
typedef unsigned int ${macro_prefix}uint32_t __attribute__((__mode__(__SI__)));
typedef int ${macro_prefix}int64_t __attribute__((__mode__(__DI__)));
typedef unsigned int ${macro_prefix}uint64_t __attribute__((__mode__(__DI__)));
+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 8
__extension__ typedef long long ${macro_prefix}llong;
__extension__ typedef unsigned long long ${macro_prefix}ullong;
+#endif
#else
typedef $int16_t ${macro_prefix}int16_t;
typedef $uint16_t ${macro_prefix}uint16_t;
@@ -714,8 +716,16 @@
# Override bogus definitions of NULL in system headers.
cat <<EOF
#undef NULL
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
#define __need_NULL
#include <stddef.h>
+#else
+# if !defined(__cplusplus)
+# define NULL ((void*)0)
+# else
+# define NULL (0)
+# endif
+#endif
EOF
rm -f dummy.C dummy.o dummy.c dummy.out TMP core a.out