Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!think!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: What real non-UNIX 'C' compilers implement... Message-ID: <29156@sun.uucp> Date: Fri, 25-Sep-87 16:41:05 EDT Article-I.D.: sun.29156 Posted: Fri Sep 25 16:41:05 1987 Date-Received: Sun, 27-Sep-87 07:03:42 EDT References: <672@sugar.UUCP> <3545@venera.isi.edu> <721@sugar.UUCP> <814@sugar.UUCP> Sender: news@sun.uucp Lines: 32 > Except that the O/S *manuals* follow the SVID. *Which* OS manuals follow the SVID? AT&T's certainly don't; in the S5R3 documentation, "read" is in section 2, and "fread" is in section 3S (same as it ever was). Frankly, *I*'d like to see the distinction between section 2 and section 3 erased completely, so that you don't know which library routines consist of a little glue and a "trap" call and which don't. Note that people *already* can't determine what is a "system call" based merely on which manual section it's in. If you think, for example, that "sigvec", on systems that support it, consists merely of a little glue and a "trap" call just because it's in section 2, think again; on Suns, it's actually a non-trivial piece of C code maintaining its own signal vector. This is probably true of "signal" on a lot of machines as well. > And except that it confuses people. "Hey, peter, how come they have read > and fread?" "Well, fread is a library routine." What "confuses people" here is not that this is somehow intrinsically confusing, but that "Well, 'fread' is a library routine" is a lousy explanation. The difference is not "'fread' is a library routine" (in fact, they're *both* library routines on most implementations, one just happens to be relatively trivial - at least on UNIX systems), but "'fread' deals with standard I/O streams and 'read' deals with UNIX file descriptors"; this explanation may not make sense to somebody not familiar with standard I/O streams and UNIX file descriptors, but it's not clear any *other* explanation of this will make sense if you're not familiar with those objects. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com