public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* A small libio patch
@ 1997-11-17 13:49 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 1997-11-17 13:49 UTC (permalink / raw)
  To: egcs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-11-17 13:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-17 13:49 A small libio patch H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).