 |
|
 |
|
|
 |
How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
Hi,
There are more than 1000 defined system calls in the Unix standard
specification, however, a majority of them are optional and the
availability of system calls are dependent on the OS implementation
itself.
The question I have is: How do you determine which system calls are
available on any Unix/Linux machine?
The same question goes for determening available C library functions
on any Unix/Linux machine?
Best regards
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
dspfun@hotmail.com (markus) wrote:
> The question I have is: How do you determine which system calls are
> available on any Unix/Linux machine?
>
> The same question goes for determening available C library functions
> on any Unix/Linux machine?
If the computer has a conforming C implementation, _all_ C library
functions must be available; otherwise it simply isn't a C
implementation.
As for determining what is present, that's OS-specific, hence off-topic
on comp.lang.c.
Richard
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
Richard Bos <rlb@hoekstra-uitgeverij.nl> wrote:
> dspfun@hotmail.com (markus) wrote:
You don't. It's none of your business. It's the C library's business to
interface between you and the system calls.
But if you wanted to, you would read the kernel's syscall
implementation list in the source code.
[vbcol=seagreen]
[vbcol=seagreen]
> If the computer has a conforming C implementation, _all_ C library
> functions must be available; otherwise it simply isn't a C
> implementation.
Well, whther the functions work or not also enters into it. However ...
> As for determining what is present, that's OS-specific, hence off-topic
> on comp.lang.c.
In the last 20 years, I have never seen anything that is on topic on
comp.lang.c, which is why I have avoided going there like the plague
during the last 20 years. If you want language lawyery, it's an
excellent place to hang out and pick nits.
It's sort of like Wittgenstein. Anything you asked him he told you was
some other disciplines kind of problem, not philosophy.
Peter
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
markus wrote:
>
> There are more than 1000 defined system calls in the Unix standard
> specification, however, a majority of them are optional and the
> availability of system calls are dependent on the OS implementation
> itself.
>
> The question I have is: How do you determine which system calls are
> available on any Unix/Linux machine?
>
> The same question goes for determening available C library functions
> on any Unix/Linux machine?
ALL the functions specified in the ISO C standard should be
available on any hosted machine. Anything else is system
dependant and off-topic on c.l.c.
Thus code that uses such non-standard calls should be in an
isolated system dependant module, and discussed only on system
specific newsgroups. Above all they should not be cross-posted to
groups where they are OT.
--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
dspfun@hotmail.com (markus) writes:
> Hi,
>
> There are more than 1000 defined system calls in the Unix standard
> specification, however, a majority of them are optional and the
> availability of system calls are dependent on the OS implementation
> itself.
>
> The question I have is: How do you determine which system calls are
> available on any Unix/Linux machine?
>
> The same question goes for determening available C library functions
> on any Unix/Linux machine?
That is what the "configure" script in most UNIX source code packages
does. If you tell us what you are trying to do, you might get a more
useful answer.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
dspfun@hotmail.com (markus) writes:
> Hi,
>
> There are more than 1000 defined system calls in the Unix standard
> specification, however, a majority of them are optional and the
> availability of system calls are dependent on the OS implementation
> itself.
>
> The question I have is: How do you determine which system calls are
> available on any Unix/Linux machine?
First, all linux implement the same subset of posix (for a given
version), and all MacOSX implement their own same subset. So when you
write a program for a given target (system class), you can count on
the features present.
Otherwise, if you have the API in the /usr/include header, there's a
high probability that they're actually present in the system.
Finally, this is usually done at compilation time with utilities such
as autoconf/automake and the generated configure script.
It's rarely done at run-time. You could scan /usr/include, /usr/lib,
and play with dlopen (if it's available :-).
> The same question goes for determening available C library functions
> on any Unix/Linux machine?
>
> Best regards
--
__Pascal Bourguignon__ http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
dspfun@hotmail.com (markus) wrote:
# Hi,
#
# There are more than 1000 defined system calls in the Unix standard
# specification, however, a majority of them are optional and the
# availability of system calls are dependent on the OS implementation
# itself.
#
# The question I have is: How do you determine which system calls are
# available on any Unix/Linux machine?
Trial and error, unfortunately, is too often the case. On a proper system yo
u should be
able to look at /usr/share/man/man2 and man3 or the section 2 and 3 portion
of xman to
get a rough idea. However many systems anywhere are inadequately documented.
You can also
try nm /usr/lib/libc.so or similar files.
--
SM Ryan http://www.rawbw.com/~wyrmwif/
Mention something out of a Charleton Heston movie, and suddenly
everybody's a theology scholar.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
dspfun@hotmail.com (markus) wrote in message news:<bcb072f5.0409200250.457b60f4@posting.goog
le.com>...
> Hi,
>
> There are more than 1000 defined system calls in the Unix standard
> specification, however, a majority of them are optional and the
> availability of system calls are dependent on the OS implementation
> itself.
>
> The question I have is: How do you determine which system calls are
> available on any Unix/Linux machine?
>
> The same question goes for determening available C library functions
> on any Unix/Linux machine?
>
> Best regards
you can try
apropos '(3)' for library functions
apropos '(2)' for system calls
This should give you a list, at least for those functions that have a
man page in the system I suppose...
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
P.T. Breuer wrote:
> In the last 20 years, I have never seen anything that is on topic on
> comp.lang.c, which is why I have avoided going there like the plague
> during the last 20 years. If you want language lawyery, it's an
> excellent place to hang out and pick nits.
Pure lies. We handle many questions and problems each day, as long as
they fit the topicality of the newsgroup.
Brian Rodenborn
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
 |
Re: How to determine available system calls on a Unix/Linux system |
 |
 |
|
|
09-23-04 02:21 AM
Default User <first.last@boeing.com.invalid> wrote:
> P.T. Breuer wrote:
>
[vbcol=seagreen]
> Pure lies. We handle many questions and problems each day, as long as
> they fit the topicality of the newsgroup.
There you are!
Peter
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 11:49 AM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|