Date: Tue, 1 Jun 1999 19:02:58 +0100 From: Nik Clayton <nik@nothing-going-on.demon.co.uk> To: hackers@freebsd.org Subject: Review: Having aio.h include sys/time.h Message-ID: <19990601190257.C73490@catkin.nothing-going-on.org>
next in thread | raw e-mail | index | archive | help
Hi folks, docs/11589 says that programs that include aio.h also need to include sys/time.h. I've had a chat with Terry Lambert, who wrote the aio_read.2 manual page, who says <snip> > And here is a section from the aio.h manual page (from the > Single UNIX Specification): > > Inclusion of the <aio.h> header may make visible symbols > defined in the headers <fcntl.h>, <signal.h>, <sys/types.h> > and <time.h>. > > Basically, this means that the aio.h header is *defined* as > including sys/types.h (because of off_t and size_t), and is > defined as either including the other headers as well (bad) > or as forward declaring some types as opaque: <snip> > Since the Single UNIX Specification make no note of a header > other than aio.h, I'm afraid that the answer is that the aio.h > must include these headers, or directly define the respective > types itself. > > While I dislike promiscuous headers, I believe it is better to > be able to compile and run standards compliant UNIX code. So I want to apply the following very trivial patch; Index: aio.h =================================================================== RCS file: /home/ncvs/src/sys/sys/aio.h,v retrieving revision 1.9 diff -u -r1.9 aio.h --- aio.h 1999/01/17 22:33:08 1.9 +++ aio.h 1999/06/01 17:57:36 @@ -19,6 +19,7 @@ #ifndef _SYS_AIO_H_ #define _SYS_AIO_H_ +#include <sys/time.h> #include <sys/types.h> #include <sys/signal.h> Any objections? I know nothing about the aio* stuff at all, which is why I'm checking first. N -- The trial continues tomorrow. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990601190257.C73490>