In article <bcb072f5.0409160224.6716fa1d@posting.google.com >,
dspfun@hotmail.com (markus) writes:[color=blue]
>
> I have a question that deals with the standard c library VS (Unix)
> system calls.
>
> The question is: which header files (and functions) are part of the C
> library and which header files (and function calls) are part of the
> (Unix) system calls.[/color]
The headers and functions defined by the C standard as part of the C
library are part of the C library.
Unix headers and functions, including system calls, are specified by
the Unix standard - which is currently any of the "Austin Group"
standards: POSIX, SUS, and ISO/IEC 9945, which have been combined
into one document.[1]
However, these two documents overlap, because the Unix standard
includes much of the C standard. Note, though, that the Unix
standard defers to the C standard where they overlap, and claims that
any discrepancies are errors in the Unix standard.
So you should treat any headers and functions defined in the C
standard (of whatever version is appropriate for your purposes) as
part of C, because they are. For other headers and functions, check
the Unix standard: if they appear there, then they're part of Unix;
otherwise, they're implementation-defined.
[color=blue]
> The cause of my confusion is that for example stdio.h is considered
> both as a header file of the C library, as well as a header file of
> the (Unix) system calls?[/color]
That's because the Unix standard explicitly includes the C library.
The front matter to the Unix standard explains this in more detail.
In general, one standard can incorporate another; they needn't be
mutually exclusive.
1.
http://www.opengroup.org/onlinepubs/009695399/
--
Michael Wojcik
michael.wojcik@microfocus.com
Push up the bottom with your finger, it will puffy and makes stand up.
-- instructions for "swan" from an origami kit