From owner-cvs-gnu Sun Sep 14 06:09:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA09236 for cvs-gnu-outgoing; Sun, 14 Sep 1997 06:09:39 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA09155; Sun, 14 Sep 1997 06:07:48 -0700 (PDT) From: Wolfram Schneider Received: (from wosch@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id GAA21857; Sun, 14 Sep 1997 06:04:28 -0700 (PDT) Date: Sun, 14 Sep 1997 06:04:28 -0700 (PDT) Message-Id: <199709141304.GAA21857@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/libexec/uucp/uuchk uuchk.8 Makefile src/gnu/libexec/uucp/uuconv uuconv.1 Makefile src/gnu/libexec/uucp/uulog uulog.1 Makefile src/gnu/libexec/uucp/uusched uusched.8 Makefile Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wosch 1997/09/14 06:04:27 PDT Modified files: gnu/libexec/uucp/uuchk Makefile gnu/libexec/uucp/uuconv Makefile gnu/libexec/uucp/uulog Makefile gnu/libexec/uucp/uusched Makefile Added files: gnu/libexec/uucp/uuchk uuchk.8 gnu/libexec/uucp/uuconv uuconv.1 gnu/libexec/uucp/uulog uulog.1 gnu/libexec/uucp/uusched uusched.8 Log: Add some UUCP manpages. Revision Changes Path 1.7 +2 -3 src/gnu/libexec/uucp/uuchk/Makefile 1.8 +1 -3 src/gnu/libexec/uucp/uuconv/Makefile 1.4 +1 -3 src/gnu/libexec/uucp/uulog/Makefile 1.11 +2 -1 src/gnu/libexec/uucp/uusched/Makefile From owner-cvs-gnu Sun Sep 14 16:47:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA11686 for cvs-gnu-outgoing; Sun, 14 Sep 1997 16:47:35 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA11626; Sun, 14 Sep 1997 16:46:48 -0700 (PDT) From: Wolfram Schneider Received: (from wosch@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id QAA16873; Sun, 14 Sep 1997 16:43:24 -0700 (PDT) Date: Sun, 14 Sep 1997 16:43:24 -0700 (PDT) Message-Id: <199709142343.QAA16873@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-contrib@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/contrib/groff/eqn neqn.man src/gnu/usr.bin/groff/eqn Makefile Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wosch 1997/09/14 16:43:24 PDT Modified files: gnu/usr.bin/groff/eqn Makefile Added files: contrib/groff/eqn neqn.man Log: Add a simple manpage. Revision Changes Path 1.8 +2 -1 src/gnu/usr.bin/groff/eqn/Makefile From owner-cvs-gnu Sun Sep 14 19:00:32 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA19169 for cvs-gnu-outgoing; Sun, 14 Sep 1997 19:00:32 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA19026; Sun, 14 Sep 1997 18:59:56 -0700 (PDT) From: "Andrey A. Chernov" Received: (from ache@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id SAA19487; Sun, 14 Sep 1997 18:56:31 -0700 (PDT) Date: Sun, 14 Sep 1997 18:56:31 -0700 (PDT) Message-Id: <199709150156.SAA19487@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/usr.bin/groff/eqn Makefile Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk ache 1997/09/14 18:56:30 PDT Modified files: gnu/usr.bin/groff/eqn Makefile Log: Fix neqn building: 1) Move it after Makefile.inc included since it uses DIST_DIR from there 2) Add neqn.sh dependance Revision Changes Path 1.9 +4 -3 src/gnu/usr.bin/groff/eqn/Makefile From owner-cvs-gnu Mon Sep 15 09:13:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA06577 for cvs-gnu-outgoing; Mon, 15 Sep 1997 09:13:09 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA06536; Mon, 15 Sep 1997 09:12:27 -0700 (PDT) From: Wolfram Schneider Received: (from wosch@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id JAA11327; Mon, 15 Sep 1997 09:08:57 -0700 (PDT) Date: Mon, 15 Sep 1997 09:08:57 -0700 (PDT) Message-Id: <199709151608.JAA11327@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-contrib@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/contrib/groff/nroff psroff.man src/gnu/usr.bin/groff/nroff Makefile Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wosch 1997/09/15 09:08:57 PDT Modified files: gnu/usr.bin/groff/nroff Makefile Added files: contrib/groff/nroff psroff.man Log: Add a simple manpage. Revision Changes Path 1.7 +2 -2 src/gnu/usr.bin/groff/nroff/Makefile From owner-cvs-gnu Mon Sep 15 12:23:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA18302 for cvs-gnu-outgoing; Mon, 15 Sep 1997 12:23:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA18185; Mon, 15 Sep 1997 12:22:31 -0700 (PDT) From: Wolfram Schneider Received: (from wosch@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id MAA11860; Mon, 15 Sep 1997 12:19:00 -0700 (PDT) Date: Mon, 15 Sep 1997 12:19:00 -0700 (PDT) Message-Id: <199709151919.MAA11860@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG, cvs-contrib@FreeBSD.ORG Subject: cvs commit: src/gnu/usr.bin/genclass Makefile src/contrib/libg++/libg++/genclass genclass.1 Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wosch 1997/09/15 12:19:00 PDT Modified files: gnu/usr.bin/genclass Makefile Added files: contrib/libg++/libg++/genclass genclass.1 Log: Add a genclass.1 manpage. Revision Changes Path 1.5 +2 -1 src/gnu/usr.bin/genclass/Makefile From owner-cvs-gnu Tue Sep 16 01:37:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA11536 for cvs-gnu-outgoing; Tue, 16 Sep 1997 01:37:55 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA11503; Tue, 16 Sep 1997 01:37:28 -0700 (PDT) From: Joerg Wunsch Received: (from joerg@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id BAA16216; Tue, 16 Sep 1997 01:33:53 -0700 (PDT) Date: Tue, 16 Sep 1997 01:33:53 -0700 (PDT) Message-Id: <199709160833.BAA16216@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/usr.bin/perl/perl util.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk joerg 1997/09/16 01:33:53 PDT Modified files: gnu/usr.bin/perl/perl util.c Log: Sigh, there's always one more buffer overflow. :-( This one hinted to by the recently posted exploit (although not exploited by it). Revision Changes Path 1.3 +12 -5 src/gnu/usr.bin/perl/perl/util.c From owner-cvs-gnu Tue Sep 16 01:38:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA11574 for cvs-gnu-outgoing; Tue, 16 Sep 1997 01:38:39 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA11546; Tue, 16 Sep 1997 01:38:07 -0700 (PDT) From: Joerg Wunsch Received: (from joerg@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id BAA16248; Tue, 16 Sep 1997 01:34:32 -0700 (PDT) Date: Tue, 16 Sep 1997 01:34:32 -0700 (PDT) Message-Id: <199709160834.BAA16248@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/usr.bin/perl/perl util.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk joerg 1997/09/16 01:34:32 PDT Modified files: (Branch: RELENG_2_2) gnu/usr.bin/perl/perl util.c Log: MFC: buffer overflow fix from rev 1.3. Revision Changes Path 1.2.6.1 +12 -5 src/gnu/usr.bin/perl/perl/util.c From owner-cvs-gnu Tue Sep 16 01:39:08 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA11617 for cvs-gnu-outgoing; Tue, 16 Sep 1997 01:39:08 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA11588; Tue, 16 Sep 1997 01:38:50 -0700 (PDT) From: Joerg Wunsch Received: (from joerg@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id BAA16283; Tue, 16 Sep 1997 01:35:15 -0700 (PDT) Date: Tue, 16 Sep 1997 01:35:15 -0700 (PDT) Message-Id: <199709160835.BAA16283@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/usr.bin/perl/perl util.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk joerg 1997/09/16 01:35:15 PDT Modified files: (Branch: RELENG_2_1_0) gnu/usr.bin/perl/perl util.c Log: MFC: buffer overflow fix from rev 1.3. Revision Changes Path 1.2.4.1 +12 -5 src/gnu/usr.bin/perl/perl/util.c From owner-cvs-gnu Thu Sep 18 07:00:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA07290 for cvs-gnu-outgoing; Thu, 18 Sep 1997 07:00:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA07169; Thu, 18 Sep 1997 06:59:45 -0700 (PDT) From: Poul-Henning Kamp Received: (from phk@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id GAA05961; Thu, 18 Sep 1997 06:55:52 -0700 (PDT) Date: Thu, 18 Sep 1997 06:55:52 -0700 (PDT) Message-Id: <199709181355.GAA05961@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: 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 Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk phk 1997/09/18 06:55:52 PDT Modified files: gnu/usr.bin/as/config atof-ieee.c gnu/usr.bin/ld/rtld rtld.c gnu/usr.bin/man/man man.c Log: 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. PR: 2752 Submitted by: Arne Henrik Juul Revision Changes Path 1.8 +2 -2 src/gnu/usr.bin/as/config/atof-ieee.c 1.49 +2 -2 src/gnu/usr.bin/ld/rtld/rtld.c 1.27 +2 -2 src/gnu/usr.bin/man/man/man.c From owner-cvs-gnu Thu Sep 18 19:06:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA28902 for cvs-gnu-outgoing; Thu, 18 Sep 1997 19:06:02 -0700 (PDT) Received: from gaia.coppe.ufrj.br (jonny@cisigw.coppe.ufrj.br [146.164.5.200]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA28896; Thu, 18 Sep 1997 19:05:57 -0700 (PDT) Received: (from jonny@localhost) by gaia.coppe.ufrj.br (8.8.7/8.8.7) id XAA04697; Thu, 18 Sep 1997 23:05:54 -0300 (EST) From: Joao Carlos Mendes Luis Message-Id: <199709190205.XAA04697@gaia.coppe.ufrj.br> 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 In-Reply-To: <199709181355.GAA05961@freefall.freebsd.org> from Poul-Henning Kamp at "Sep 18, 97 06:55:52 am" To: phk@FreeBSD.ORG (Poul-Henning Kamp) Date: Thu, 18 Sep 1997 23:05:54 -0300 (EST) Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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... Jonny -- Joao Carlos Mendes Luis jonny@gta.ufrj.br +55 21 290-4698 jonny@coppe.ufrj.br Universidade Federal do Rio de Janeiro UFRJ/COPPE/CISI PGP fingerprint: 29 C0 50 B9 B6 3E 58 F2 83 5F E3 26 BF 0F EA 67 From owner-cvs-gnu Thu Sep 18 19:17:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA29517 for cvs-gnu-outgoing; Thu, 18 Sep 1997 19:17:28 -0700 (PDT) Received: from word.smith.net.au (ppp20.portal.net.au [202.12.71.120]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA29511; Thu, 18 Sep 1997 19:17:19 -0700 (PDT) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id LAA03946; Fri, 19 Sep 1997 11:44:59 +0930 (CST) Message-Id: <199709190214.LAA03946@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Joao Carlos Mendes Luis cc: phk@freebsd.org (Poul-Henning Kamp), cvs-committers@freebsd.org, cvs-all@freebsd.org, cvs-gnu@freebsd.org 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 In-reply-to: Your message of "Thu, 18 Sep 1997 23:05:54 -0300." <199709190205.XAA04697@gaia.coppe.ufrj.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 19 Sep 1997 11:44:57 +0930 From: Mike Smith 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. mike From owner-cvs-gnu Fri Sep 19 06:42:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA12420 for cvs-gnu-outgoing; Fri, 19 Sep 1997 06:42:38 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA12398; Fri, 19 Sep 1997 06:42:32 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id XAA17971; Fri, 19 Sep 1997 23:40:16 +1000 Date: Fri, 19 Sep 1997 23:40:16 +1000 From: Bruce Evans Message-Id: <199709191340.XAA17971@godzilla.zeta.org.au> To: jonny@coppe.ufrj.br, phk@FreeBSD.ORG 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 Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG 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) ? Yes, it would require fixing all the code that uses NULL in integer context, and would hide the opposite problem of misuse of NULL in non-integer contexts, e.g., void foo(bar) void *bar; { ... } ... foo(NULL); /* no prototype in scope */ `lint -p' should warn that the arg is inconsistent, but can't do so if NULL is ((void *)0). Bruce From owner-cvs-gnu Fri Sep 19 10:27:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA25820 for cvs-gnu-outgoing; Fri, 19 Sep 1997 10:27:36 -0700 (PDT) Received: from precipice.shockwave.com (precipice.shockwave.com [207.105.15.229]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA25813; Fri, 19 Sep 1997 10:27:33 -0700 (PDT) Received: from shockwave.com (localhost [127.0.0.1]) by precipice.shockwave.com (8.8.6/8.7.3) with ESMTP id KAA16309; Fri, 19 Sep 1997 10:25:25 -0700 (PDT) Message-Id: <199709191725.KAA16309@precipice.shockwave.com> To: Bruce Evans cc: jonny@coppe.ufrj.br, phk@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG 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 In-reply-to: Your message of "Fri, 19 Sep 1997 23:40:16 +1000." <199709191340.XAA17971@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 19 Sep 1997 10:25:25 -0700 From: Paul Traina 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) ? > > Yes, it would require fixing all the code that uses NULL in integer > context, and would hide the opposite problem of misuse of NULL in > non-integer contexts, e.g., > > void foo(bar) void *bar; { ... } > ... > foo(NULL); /* no prototype in scope */ > > `lint -p' should warn that the arg is inconsistent, but can't do so if > NULL is ((void *)0). Could you please explain that more clearly? I see a perfectly good implied prototype in scope, and the fact of the matter is that I should not be forced to typecast NULL into a particular pointer type, ever. Null is well defined as a "pointer of some type, with a value of 0" To me, #define NULL (void *)0 is the ultimate protection against the misuse of NULL. Paul From owner-cvs-gnu Fri Sep 19 11:19:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA28533 for cvs-gnu-outgoing; Fri, 19 Sep 1997 11:19:14 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA28525; Fri, 19 Sep 1997 11:19:09 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id EAA25970; Sat, 20 Sep 1997 04:10:45 +1000 Date: Sat, 20 Sep 1997 04:10:45 +1000 From: Bruce Evans Message-Id: <199709191810.EAA25970@godzilla.zeta.org.au> To: bde@zeta.org.au, pst@shockwave.com 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 Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG, jonny@coppe.ufrj.br, phk@FreeBSD.ORG Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> void foo(bar) void *bar; { ... } >> ... >> foo(NULL); /* no prototype in scope */ >> >> `lint -p' should warn that the arg is inconsistent, but can't do so if >> NULL is ((void *)0). > >Could you please explain that more clearly? I see a perfectly good implied >prototype in scope, and the fact of the matter is that I should not be forced 1. There is no prototype in scope - the function is purposely declared old- style so that it does not provide a prototype. 2. The comment is supposed to make this clearer. >to typecast NULL into a particular pointer type, ever. Null is well defined >as a "pointer of some type, with a value of 0" To me, #define NULL (void *)0 >is the ultimate protection against the misuse of NULL. No, NULL is macro which expands to an implementation-defined null pointer constant. A null pointer constant is either an integral constant expression with value 0, or such an expression cast to `void *'. Portable programs must not assume a particular implementation. Even if NULL is a pointer (necessarily of type `void *'), it must be cast to the correct type in function calls. The cast is best done by putting a prototype in scope. Example: void foo(); ... foo((void *)0); /* no prototype in scope */ ... void foo(bar) int *bar; { ... } `lint -p' should warn that the arg is inconsistent, but the FreeBSD version doesn't. It warns for the equivalent `foo((char *)0)'. Bruce From owner-cvs-gnu Sat Sep 20 03:11:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA26075 for cvs-gnu-outgoing; Sat, 20 Sep 1997 03:11:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA24313; Sat, 20 Sep 1997 03:02:58 -0700 (PDT) From: Peter Wemm Received: (from peter@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id CAA24562; Sat, 20 Sep 1997 02:58:51 -0700 (PDT) Date: Sat, 20 Sep 1997 02:58:51 -0700 (PDT) Message-Id: <199709200958.CAA24562@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/lib/libstdc++ _G_config.h Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 1997/09/20 02:58:50 PDT Modified files: gnu/lib/libstdc++ _G_config.h Log: _G_VTABLE_LABLE_PREFIX is different between ELF and a.out ('_vt.' vs '__vt$') Revision Changes Path 1.2 +6 -0 src/gnu/lib/libstdc++/_G_config.h 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. From owner-cvs-gnu Sat Sep 20 23:00:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA15597 for cvs-gnu-outgoing; Sat, 20 Sep 1997 23:00:15 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA15579; Sat, 20 Sep 1997 23:00:04 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id PAA20728; Sun, 21 Sep 1997 15:53:28 +1000 Date: Sun, 21 Sep 1997 15:53:28 +1000 From: Bruce Evans Message-Id: <199709210553.PAA20728@godzilla.zeta.org.au> To: mike@smith.net.au, perhaps@yes.no 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 Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG, jonny@coppe.ufrj.br, phk@FreeBSD.ORG Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >((void*)0) is a correct definition of NULL. The other ^^^^^another >correct definition is 0. Other correct definitions: 0L /* This has a different type than plain 0. * It may be useful for hiding bugs on machines * where sizeof(long) == sizeof(void *) && * sizeof(int) < sizeof(void *), and for finding * bugs on machines where sizeof(long) > * sizeof(void *). */ 0UL /* A weirder type. This may be useful for * finding misuses of NULL in integer context */ (2 + 2 != 4) /* A gratuitously complicated constant integral * expression with value 0. This definition is * not useful. */ (sizeof(char) - (int)1.1) /* A gratuitously complicated not-obviously * constant integral expression with value 0. * This definition is not useful. */ Any of the above cast to `void *'. /* Such definitions are just silly ways of writing * ((void *)0), since they all have the same type * and value. */ Other not-quite correct definitions: 0LL /* Will probably be correct in C9X, since C9X has * long long (blech), and may already be correct * in Gnu C. This may be useful for hiding bugs * on machines where sizeof(long long) == * sizeof(void *) && sizeof(long) < sizeof(void *), * and for finding bugs on machines where * sizeof(long long) > * sizeof(void *). */ Bruce