From owner-cvs-all Thu Oct 8 21:12:23 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA13031 for cvs-all-outgoing; Thu, 8 Oct 1998 21:12:23 -0700 (PDT) (envelope-from owner-cvs-all) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA12867; Thu, 8 Oct 1998 21:11:30 -0700 (PDT) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id VAA27179; Thu, 8 Oct 1998 21:11:19 -0700 (PDT) (envelope-from jdp) Message-Id: <199810090411.VAA27179@austin.polstra.com> To: jkh@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libutil libutil.h In-Reply-To: <199810082310.QAA08944@freefall.freebsd.org> References: <199810082310.QAA08944@freefall.freebsd.org> Organization: Polstra & Co., Seattle, WA Cc: committers@FreeBSD.ORG Date: Thu, 08 Oct 1998 21:11:19 -0700 From: John Polstra Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In article <199810082310.QAA08944@freefall.freebsd.org>, Jordan K. Hubbard wrote: > jkh 1998/10/08 16:10:42 PDT > > Modified files: > lib/libutil libutil.h > Log: > remove stdio.h include; I forgot Bruce's cardinal rule that header files > shouldn't include other ones This broke make world: ===> libexec/getty cc -O -pipe -I/usr/obj/elf/usr/src/tmp/usr/include -c /usr/src/libexec/getty/main.c In file included from /usr/src/libexec/getty/main.c:58: /usr/obj/elf/usr/src/tmp/usr/include/libutil.h:60: parse error before `*' *** Error code 1 This back-out seems counter-productive to me. You get the namespace pollution no matter what. If you're using libutil.h then stdio.h has to be included one way or another to avoid compilation errors. It's better to make that automatic than to require the programmer to remember it. As it is now, the programmer has to remember the magic FreeBSD-specific header file dependencies and ordering rules, but he still gets exactly the same namespace pollution. This has not eliminated any problem, but it has reduced portability and made the programmer's job more difficult. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth