From owner-freebsd-hackers Wed Jan 8 02:17:10 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id CAA25160 for hackers-outgoing; Wed, 8 Jan 1997 02:17:10 -0800 (PST) Received: from hda.hda.com (ip31-max1-fitch.ziplink.net [199.232.245.31]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id CAA25146 for ; Wed, 8 Jan 1997 02:17:06 -0800 (PST) Received: (from dufault@localhost) by hda.hda.com (8.6.12/8.6.12) id FAA03591; Wed, 8 Jan 1997 05:12:31 -0500 From: Peter Dufault Message-Id: <199701081012.FAA03591@hda.hda.com> Subject: Re: #include file xref philosophy In-Reply-To: <199701080136.MAA12519@godzilla.zeta.org.au> from Bruce Evans at "Jan 8, 97 12:36:31 pm" To: bde@zeta.org.au (Bruce Evans) Date: Wed, 8 Jan 1997 05:12:30 -0500 (EST) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >Is there any reason for not following the posix line and having > >include files resolve all their own dependencies? I'm talking about > > That's not the ANSI C line. POSIX.1 requires to be > included before including any other POSIX header. How about "POSIX.1 sometimes requires that be included before including some POSIX headers". They sprinkle size_t all over the place so that old programs don't break. Annex C has a summary of what types are defined in each header: mqueue.h mqd_t semaphore.h sem_t signal.h sig_atomic_t sigset_t siginfo_t stddef.h ptrdiff_t size_t wchar_t stdio.h fpos_t size_t FILE stdlib.h div_t ldiv_t size_t wchar_t string.h size_t times.h clock_t sys/types.h dev_t ino_t nlink_t pid_t ssize_t gid_t mode_t off_t size_t uid_t termios.h cc_t speed_t tcflag_t time.h clockid_t size_t time_t clock_t timer_t So size_t is defined by stddef.h, stdio.h, stdlib.h, string.h, sys/types.h, and time.h while off_t is only in sys/types.h. (This is P1003.1b-1993) -- Peter Dufault (dufault@hda.com) Realtime Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936