Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!nosc!crash!pnet01!cwr From: cwr@pnet01.cts.com (Will Rose) Newsgroups: comp.os.minix Subject: NULL macro Message-ID: <710@crash.cts.com> Date: 15 Nov 89 07:36:06 GMT Sender: root@crash.cts.com Organization: People-Net [pnet01], El Cajon CA Lines: 27 Rex Jaesche, who was (is?) a member of the ANSI C standards committe, discussed this macro extensively in the Sep/Oct 88 C Users Journal. His summary was that ANSI C (in which we *believe*, right?) had three possible definitions for the NULL pointer constant: #define NULL 0 #define NULL 0L #define NULL (void *)0 Most MSDOS C compilers (he goes on to say) conditionally compile NULL into one of the first two definitions; the third case should work in all ANSI-conforming programs, but there are plenty of cases where it won't work in non-ANSI code. To understand why, read his (six page) article. Will ----------------------------------------------------------------------- "If heaven too had passions | Will Rose even heaven would | UUCP: {nosc ucsd hplabs!hp-sdd}!crash!pnet01!cw grow old." - Li Ho. | ARPA: crash!pnet01!cwr@nosc.mil | INET: cwr@pnet01.cts.com UUCP: {nosc ucsd hplabs!hp-sdd}!crash!pnet01!cwr ARPA: crash!pnet01!cwr@nosc.mil INET: cwr@pnet01.cts.com