Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!iuvax!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: NULL is not '\0' Message-ID: <9515@smoke.BRL.MIL> Date: 27 Jan 89 04:01:24 GMT References: <9254@smoke.BRL.MIL> <620@usl.usl.edu> <11049@tiger.oxy.edu> <11375@haddock.ima.isc.com> <8468@dasys1.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <8468@dasys1.UUCP> jpr@dasys1.UUCP (Jean-Pierre Radley) writes: >Well, I just wasted a lot of time with one my programs because of the >following: >On the Tandy 6000, the stdio.h file says: > #define NULL 0 >But I just switched to a Tandy 4000, and the SCO 2.2.4 Xenix stdio.h says: > #define NULL (char *)0 >"... standards, because there are so many ..." Karl's advice was correct. The second definition of NULL you exhibit above is ALMOST correct but not quite. It probably dates from before X3J11 specified clearly what NULL had to be (before that, strictly speaking only the first definition you exhibit was correct, but many implementors didn't appreciate that). What do you mean, "there are so many"? Tandy Xenix implementations are not C "standards" by any stretch of the imagination.