Date: Wed, 8 Jan 1997 05:12:30 -0500 (EST) From: Peter Dufault <dufault@hda.com> To: bde@zeta.org.au (Bruce Evans) Cc: hackers@freebsd.org Subject: Re: #include file xref philosophy Message-ID: <199701081012.FAA03591@hda.hda.com> In-Reply-To: <199701080136.MAA12519@godzilla.zeta.org.au> from Bruce Evans at "Jan 8, 97 12:36:31 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> >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 <sys/types.h> to be > included before including any other POSIX header. How about "POSIX.1 sometimes requires that <sys/types.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701081012.FAA03591>