public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: egcs@cygnus.com
Subject: A small libio patch
Date: Mon, 17 Nov 1997 13:49:00 -0000	[thread overview]
Message-ID: <m0xXWIq-0004ecC@ocean.lucon.org> (raw)

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

                 reply	other threads:[~1997-11-17 13:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0xXWIq-0004ecC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).