Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!unisec!erc From: erc@unisec.usi.com (Ed Carp) Newsgroups: comp.lang.c Subject: Re: uustatus - realtime uustat for HDB uucp (w/findpath) Summary: #define NULL ... Keywords: NULL zero 0 C Microsoft Message-ID: <1191@unisec.usi.com> Date: 30 Jan 89 18:25:09 GMT References: <1167@unisec.usi.com> <5312@turnkey.TCC.COM> <1989Jan30.013936.11995@gpu.utcs.toronto.edu> Organization: UniSecure Systems, Inc., Austin, TX Lines: 14 In article <1989Jan30.013936.11995@gpu.utcs.toronto.edu>, woods@gpu.utcs.toronto.edu (Greg Woods) writes: > > The reason your compiler gives you a warning message, is because NULL > has been erroneously defined as something other than just plain zero. I > most definitely will not go into the reasons why, but it should suffice > to say that "#define NULL 0" is the only correct definition. [Anyone > The reason why is because some idiot used "#define NULL (char)0" in the XENIX 2.1.3 SCO system (AMONG OTHERS!) NULL is, be definition, 0 and shouldn't be cast to ANYTHING! Like EOF shouldn't be cast to ANYTHING; it should just be -1 [or (-1), if you prefer]. Change your stdio.h file; please don't hack people's code -- you may be in for a surprise as to how much work that will actually take!