Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!MAILER%ALASKA.BITNET@CUNYVM.CUNY.EDU From: MAILER%ALASKA.BITNET@CUNYVM.CUNY.EDU Newsgroups: comp.lang.c Subject: Undelivered mail Message-ID: <12287@brl-adm.ARPA> Date: 12 Mar 88 10:35:04 GMT Sender: news@brl-adm.ARPA Lines: 41 Subject: Re: Header problems [Non-Deliverable: User does not exist or has never logged on] Reply-To: Info-C@BRL.ARPA Received: From UWAVM(MAILER) by ALASKA with Jnet id 7209 for SXJVK@ALASKA; Sat, 12 Mar 88 01:20 AST Received: by UWAVM (Mailer X1.25) id 4882; Sat, 12 Mar 88 02:18:05 PST Date: Thu, 10 Mar 88 18:04:34 GMT Reply-To: Info-C@BRL.ARPA Sender: Info-C List From: Chris Torek Subject: Re: Header problems Comments: To: info-c@BRL-SMOKE.arpa To: Vic Kapella [This makes three.] In article <121@polygen.UUCP> pablo@polygen.uucp (Pablo Halpern) writes: >For compilers that don't support (void *), you must have >a compiler-specific definition of NULL: No. > #define NULL 0 /* If sizeof(int) == sizeof(char *) */ > or > #define NULL 0L /* if sizeof(long) == sizeof(char *) */ Either is technically legal. The former suffices, is not machine dependent, and is correct. >Since the above #defines are necessarily machine (and compiler) specific, The definition of NULL (as 0, or if you have a dpANS-conformant compiler, as (void *)0) is not machine dependent. What *is* machine dependent is whether uncasted 0 in unprototyped function calls appears to work. Using uncasted 0L appears to work (but is nonetheless wrong) on IBM PCs using large model compilers. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris