delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/28/07:27:36

From: sl AT psycode DOT com DOT NOSPAM (Gili)
Newsgroups: comp.os.msdos.djgpp
Subject: GCC 2.8.1 and NULL
Date: 27 Jun 1998 07:57:43 GMT
Organization: The World's Usenet -- http://www.Supernews.com
Message-ID: <bWLoegW7sFse-pn2-Fd2thRzLcDIB@localhost>
Reply-To: sl AT psycode DOT com DOT NOSPAM
NNTP-Posting-Host: 205.205.118.178
Mime-Version: 1.0
Lines: 14
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

	Since GCC 2.8.1 (and perhaps a bit earlier) the authors have begun 
using "#define NULL __null".. One problem arises:

If #include <stdio.h> occures anywhere throughout my code (and since 
it is a very common library, it obviously does) I get the following 
message telling me that stdio.h tried to redefine NULL (which was 
previously defined as __null).. The only way I found around this is to
stick an "#ifndef ... #endif" block before "#define NULL 0" command in
<stdio.h>.. But what I'm wondering is, is this conflict suppose to 
exist? Is something wrong with my configuration? What's going on? :)

Gili

- Raw text -


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