Hi,
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.
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?
Indeed, all of the following 18 standard C headers are part of the
(Unix) system call headers as well.
The full set of 18 Standard C headers:
<assert.h>, <ctype.h>, <errno.h>, <float.h>, <iso646.h>, <limits.h>,
<locale.h>, <math.h>, <setjmp.h>, <signal.h>, <stdarg.h>, <stddef.h>,
<stdio.h>, <stdlib.h>, <string.h>, <time.h>, <wchar.h>, and
<wctype.h>.
The same headerfiles appear at the definition of the system call
headers: http://www.unix.org/version3/apis/headers.html
So, which header files (and functions) are part of the C library and
which headers files (and functions) are part of the system calls?
I know that the C library make use of the system calls.
Best regards 5 3453 ds****@hotmail.com (markus) wrote: I have a question that deals with the standard c library VS (Unix) system calls.
If you do this, you probably want a copy of the Standard. Order from ISO
or ANSI, or in book from from Wiley & Sons:
<http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470845732.html>.
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.
Yup, definitely a job for the Standard.
As a first approximation, you can use the last public draft, found here:
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n869/>.
I know that the C library make use of the system calls.
Correction: you know that it _usually_ does so. Nothing in the Standard
requires this, though.
Richard
Richard Bos <rl*@hoekstra-uitgeverij.nl> wrote: ds****@hotmail.com (markus) wrote:
I have a question that deals with the standard c library VS (Unix) system calls.
If you do this, you probably want a copy of the Standard. Order from ISO or ANSI, or in book from from Wiley & Sons: <http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470845732.html>.
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.
Yup, definitely a job for the Standard.
As a first approximation, you can use the last public draft, found here: <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n869/>.
And the UNIX (SUSv3) standard you can get (for free, registration
required) from http://www.unix.org/version3/online.html
A table of headers, including the C89 and C99 headers, is here: http://www.unix.org/version3/apis/headers.html
Finally, the complete set of functions is listed on http://www.unix.org/version3/apis/t_XXX.html
(replace XXX with the numbers between 1 and 11).
Regards, Jens
--
\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
On Thu, 2004-09-16 at 03:24 -0700, markus wrote: Hi,
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.
That seems like a strange question to me. No header files at all are
part of the UNIX system calls. The system calls are kernel traps, which
must be called through assembly language, and thus have nothing to do
with C to begin with.
There are a few functions in the C library that are system call
wrappers, such as read, write, fork, etc. They _are_ not system calls,
however - they _do_ system calls.
Thus, to answer the question: All header files are part of the C
library. Not necessarily the C standard, however (many, such as
unistd.h, are UNIX extensions).
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?
Why do you think that stdio.h is "a header file of the UNIX system
calls"? Again, since the syscalls have no header files at all, that's
more or less an oxymoron.
The same headerfiles appear at the definition of the system call headers: http://www.unix.org/version3/apis/headers.html
The headers listed there do not have anything at all to do with
syscalls. They only describe which headers are required in a UNIX C
implementation.
Fredrik Tolf
In article <bc**************************@posting.google.com >, ds****@hotmail.com (markus) writes: 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.
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.
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?
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 mi************@microfocus.com
Push up the bottom with your finger, it will puffy and makes stand up.
-- instructions for "swan" from an origami kit
[snips]
On Thu, 16 Sep 2004 17:16:51 +0200, Fredrik Tolf wrote: There are a few functions in the C library that are system call wrappers, such as read, write, fork, etc. They _are_ not system calls,
Nor are they C. :)
Thus, to answer the question: All header files are part of the C library. Not necessarily the C standard, however (many, such as unistd.h, are UNIX extensions).
Then they'd be third-party extension libraries, rather than the C library,
right? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jrefactors |
last post by:
If the C programs have UNIX system calls such as fork(), alarm(),
etc.., we should call it UNIX programs, not traditional C programs?
We couldn't compile the programs with system calls using VC++...
|
by: christopherlmarshall |
last post by:
I have gotten in the habit of using strings to manage character buffers
that I pass in to unix system calls.
For example, suppose I want to create a character buffer to use with
the "write"...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |