From owner-freebsd-hackers Mon Oct 6 12:09:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA20312 for hackers-outgoing; Mon, 6 Oct 1997 12:09:17 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from relay6.UU.NET (relay6.UU.NET [192.48.96.16]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA20307 for ; Mon, 6 Oct 1997 12:09:13 -0700 (PDT) (envelope-from cj@accom.com) Received: from uucp2.UU.NET by relay6.UU.NET with SMTP (peer crosschecked as: uucp2.UU.NET [192.48.96.40]) id QQdkcy22579; Mon, 6 Oct 1997 15:09:25 -0400 (EDT) Received: from accom.UUCP by uucp2.UU.NET with UUCP/RMAIL ; Mon, 6 Oct 1997 15:09:11 -0400 Received: from accom (accom [192.20.200.100]) by fugue (8.6.9/8.6.9) with ESMTP id MAA25982; Mon, 6 Oct 1997 12:05:54 -0700 Received: from flea (flea [192.20.202.127]) by accom (8.6.9/8.6.9) with SMTP id MAA17341; Mon, 6 Oct 1997 12:05:52 -0700 Message-ID: <343936C3.794BDF32@accom.com> Date: Mon, 06 Oct 1997 12:06:43 -0700 From: Colin Jensen X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.1.0-RELEASE i386) MIME-Version: 1.0 To: Terry Lambert CC: freebsd-hackers@FreeBSD.ORG Subject: Re: Minor error (?) in regex.h References: <199710052341.QAA24216@usr05.primenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > The stuff in /usr/include isn't meant to be standalone - it's a > > hysterically religious thing. > > Having to do with relative compilation times based on how the C > preprocessor works. If you mean that the preprocessor must read the file multiple times, that's not a good reason. The GNU preprocessor is smart enough to notice if a header file is wrapped with #ifndef IDENT and will avoid reading the header file the second time it is included if IDENT is defined. > The problem with making the cpp "know" the file to be included is > already in scope is truly religious history: you can't be sure > that some idiot trying to program C++ in C didn't define something, > #include a file which ##'ed the something as a prefix/suffix, then > redefined the thing, and included the same file again (think of > "template classes for C" and you will get the -- nauseating -- picture). I beleive GNU's cpp will handle this correctly: Since a C Template file will not be wrapped with an #ifndef, it will be read multiple times as the programmer intended. - Colin "Beleiver in Emacs and Stand-alone include files" Jensen