🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1722

Gnu C compiler's stddef.h and stdio.h don't mix (with fix)

#1722
From: Arthur David Olson
Date: Tue, 27 Sep 1988 22:56
30 lines
1432 bytes
(We're running SunOS 4.0 on a Sun 3/110.)

Description:
	If you include Gnu's "stddef.h" file and Sun's "stdio.h" file,
	you get a warning.

Repeat-By:
	Script started on Tue Sep 27 17:04:28 1988
	daisy$ cat try.c
	#include <stdio.h>
	#include <stddef.h>
	daisy$ /usr/local/gcc -S -v try.c
	gcc version 1.28
	 /usr/local/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dmc68000 -Dsun -Dunix -Dmc68020 -D__HAVE_FPU__-Dmc68020 try.c /tmp/cca07602.cpp
	GNU CPP version 1.28
>>>>	/usr/local/lib/gcc-include/stddef.h:14: warning: NULL redefined
	 /usr/local/lib/gcc-cc1 /tmp/cca07602.cpp -quiet -dumpbase try.c -version -o try.s
	GNU C version 1.28 (68k, MIT syntax) compiled by GNU C version 1.28.
	daisy$ exit

	script done on Tue Sep 27 17:04:49 1988

Fix:
	Add a "/usr/local/lib/gcc-include/stdio.h" with contents along these
	lines:
		#include "/usr/include/stdio.h"
		#undef NULL
		#define NULL ((void *)0)
-- 
	ado@ncifcrf.gov			ADO is a trademark of Ampex.
Technical Details
Message-ID: <8809272256.AA07622@elsie.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!apple!rutgers!tut.cis.ohio-state.edu!NCIFCRF.GOV!elsie!ado

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!apple!rutgers!tut.cis.ohio-state.edu!NCIFCRF.GOV!elsie!ado
From: elsie!ado@NCIFCRF.GOV (Arthur David Olson)
Newsgroups: gnu.gcc.bug
Subject: Gnu C compiler's stddef.h and stdio.h don't mix (with fix)
Message-ID: <8809272256.AA07622@elsie.UUCP>
Date: 27 Sep 88 22:56:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 29