N
Nate Eldredge
Chad said:According the the FreeBSD 6.3 man pages, read(2) is part of the C
Standard Library.
m-net% man 2 read
READ(2) FreeBSD System Calls Manual
READ(2)
NAME
read, readv, pread, preadv -- read input
LIBRARY
Standard C Library (libc, -lc)
Can someone enlighten me on this.
Different senses of the word "standard". And note the difference
between "standard C library" and "C Standard".
Every system has its own "standard library", consisting of a collection
of functions that are normally available to every C program *on that
system*. Here "standard" is used as an adjective in the sense of
"normal, common, generally used". The ISO C Standard, a document which
specifies a set of agreed-upon requirements for C implementations,
describes a number of functions which every system's standard library
should include. read(2) is not one of them.
Thus, although read(2) happens to be a function in FreeBSD's standard
library (and in fact that of every other Unix system, and many others),
the ISO Standard doesn't require it, and therefore it can't be
considered a part of the C language itself (IMHO).