Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!ssc-vax!bcsaic!paula From: paula@bcsaic.UUCP (Paul Allen) Newsgroups: comp.os.minix Subject: Re: NULL Message-ID: <50235@bcsaic.UUCP> Date: 24 Jun 91 16:11:06 GMT References: <33822@usc.edu> Organization: Boeing Computer Services AI Center, Seattle Lines: 39 In article <33822@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes: >*** BUG FIX *** > >In /usr/include/stdio.h, #define NULL 0 >In /usr/include/*.h (all others), #define NULL ((void *)0) > >stdio.h should be updated asap. > >If I'm wrong about this, or if this will break anything, please let me >know. I think you're wrong, but I'm not enough of a wizard to say so with authority. In my archives, I find two articles explaining why NULL is zero. One, posted by Cris Torek back in early 1988, is quite long and has been reposted at least once in response to continuing calls to change the definition of NULL. The other, by Steve Jenkins of Caltech/JPL, is much more concise, just as convincing, and refers interested parties to the FAQ for comp.lang.c. Apparently, the C wizards have been discussing this question for years, and have concluded that the only correct thing to do is to define NULL as the integer consant zero and cast it to an appropriate pointer type when it is used. Does anybody out there have a copy of the comp.lang.c Frequently- Asked-Questions list? If so, would you please post the section dealing with NULL so that we may all benefit from the wisdom of the experts? I'd do it myself, but I must admit I've never been able to muster the patience to wade through c.l.c. :-) Paul Allen -- ------------------------------------------------------------------------ Paul L. Allen | pallen@atc.boeing.com Boeing Advanced Technology Center | ...!uw-beaver!bcsaic!pallen