Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!mcsun!hp4nl!targon!gert From: gert@targon.UUCP (Gert Kanis) Newsgroups: comp.os.minix Subject: Re: NULL Summary: Why different definitions Keywords: NULL (void *)0 Message-ID: <1805@targon.UUCP> Date: 26 Jun 91 15:05:58 GMT References: <57132@nigel.ee.udel.edu> Organization: Siemens Nixdorf Informationsystems BV.,SWZ, Vianen, the Netherlands. Lines: 27 In article <57132@nigel.ee.udel.edu> (Christoph van Wuellen) writes: >We had endless discussions on NULL last year, so let me summarize. > >#define NULL 0 is correct, the faulting code is wrong. POINT. > >C.v.W. Well, but still .. why have different definitions ? As, the original poster stated: In article <33822@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) wrote: > >In /usr/include/stdio.h, #define NULL 0 >In /usr/include/*.h (all others), #define NULL ((void *)0) > Whatever is the best choice but why not the same in *all* header files? Or even better define it only once (I suppose historical reasons prohibit that) BTW: (void *)0 would be OK in ANSI-C. -- Gert Kanis, AP SWZ SWP +----------------------+ Siemens Nixdorf Information systems | I do not represent | P.O.box 29, 4130 EA Vianen, Netherlands. | anyone elses opinion.| E-mail: outside Europe: kanis.via@sni-usa.com +----------------------+ Europe: gert@targon.UUCP Alternative: kanis.via@sni.de