drawing to the root window (hack hack)

Guy Harris auspex!guy at uunet.uu.net
Tue May 9 19:06:42 AEST 1989


>By the way, O_* are defined in <sys/file.h>.  (Actually in
><sys/fcntlcom.h>, but that's included by <sys/file.h> [SunOS 4.0*].)

They are properly defined by including <fcntl.h> (note that the 4.0 "open"
and "fcntl" man pages indicate this - it's true of pre-4.0 releases as
well); Berkeley screwed up by documenting <sys/file.h> as the place from
which to get them:

	1) they first appeared in System III, and the documentation there
	   said to get them from <fcntl.h>, so there was prior art;

	2) POSIX says to get them from <fcntl.h>;

	3) getting them from <fcntl.h> works on 4.[23]BSD as well;
	   getting them from <sys/file.h> will probably *not* work on S3
	   or S5.

O_NDELAY is defined in SunOS 4.0 *only* by including <fcntl.h>, since
there are two flavors of no-delay mode, and thus two versions of <fcntl.h>
- the 4BSD-environment one ("/usr/include/fcntl.h") defines it one way,
and the S5-environment one ("/usr/5include/fcntl.h") defines it another
way.



More information about the Comp.sys.sun mailing list