From owner-cvs-gnu Sat Sep 20 11:22:26 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA20214 for cvs-gnu-outgoing; Sat, 20 Sep 1997 11:22:26 -0700 (PDT) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA19862; Sat, 20 Sep 1997 11:16:47 -0700 (PDT) Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id UAA17810; Sat, 20 Sep 1997 20:15:41 +0200 (MET DST) Date: Sat, 20 Sep 1997 20:15:41 +0200 (MET DST) Message-Id: <199709201815.UAA17810@bitbox.follo.net> From: Eivind Eklund To: Mike Smith CC: jonny@coppe.ufrj.br, phk@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG In-reply-to: Mike Smith's message of Fri, 19 Sep 1997 11:44:57 +0930 Subject: Re: cvs commit: src/gnu/usr.bin/as/config atof-ieee.c src/gnu/usr.bin/ld/rtld rtld.c src/gnu/usr.bin/man/man man.c References: <199709190205.XAA04697@gaia.coppe.ufrj.br> <199709190214.LAA03946@word.smith.net.au> Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > #define quoting(Poul-Henning Kamp) > > // Many places in the code NULL is used in integer context, where > > // plain 0 should be used. This happens to work because we #define > > // NULL to 0, but is stylistically wrong and can cause problems > > // for people trying to port bits of code to other environments. > > > > Is there any problem in defining NULL to ((void *)0) ? > > > > Sorry if I'm forgetting something stupid... > > Only that this list is inhabited by countless C lawyers. 8) > > The standard defines NULL quite explicitly. Deviating from the > standard is Bad. 0 -> NULL, but NULL !-> 0. ((void*)0) is a correct definition of NULL. The other correct definition is 0. I think the tree should be made compile and lint cleanly with both definitions; I might look into it some day, but don't volunteer my time right now. (I have other FreeBSD I've promised to do with a much higher priority.) Eivind.