delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/05/17/10:17:44

Message-ID: <39229864.55ABC60E@softhome.net>
Date: Wed, 17 May 2000 16:02:29 +0300
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.72 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: GCC Patches <gcc-patches AT gcc DOT gnu DOT org>
CC: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Minor system.h patch
Reply-To: djgpp-workers AT delorie DOT com

This kills warnings under DJGPP about 'offsetof' redefinition.
Current system.h defines its own offsetof macro only if it hasn't
been defined previously. But before that, it #includes just <stdio.h>,
and according to ANSI, offsetof lives in <stddef.h>. 

This patch includes <stddef.h> (if configure script has found it)
before offsetof and NULL fallback definitions.

2000-05-17 Laurynas Biveinis <lauras AT softhome DOT net>

	* system.h: #include <stddef.h> if HAVE_STDDEF_H defined.

--- cvs/gcc/gcc/system.h	Fri May 12 20:11:48 2000
+++ gcc/gcc/system.h	Wed May 17 15:48:00 2000
@@ -45,6 +45,10 @@ Boston, MA 02111-1307, USA.  */
 
 #include <stdio.h>
 
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
 /* Define a generic NULL if one hasn't already been defined.  */
 #ifndef NULL
 #define NULL 0

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019