Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > How to determine available system calls on a Unix/Linux system

Reply
Thread Tools

How to determine available system calls on a Unix/Linux system

 
 
markus
Guest
Posts: n/a
 
      09-20-2004
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
 
Reply With Quote
 
 
 
 
Richard Bos
Guest
Posts: n/a
 
      09-20-2004
(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
 
Reply With Quote
 
 
 
 
P.T. Breuer
Guest
Posts: n/a
 
      09-20-2004
Richard Bos <> wrote:
> (markus) wrote:
> > The question I have is: How do you determine which system calls are
> > available on any Unix/Linux machine?


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.

> > 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.


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
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      09-20-2004
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 () ()
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


 
Reply With Quote
 
Dan Espen
Guest
Posts: n/a
 
      09-20-2004
(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.
 
Reply With Quote
 
SM Ryan
Guest
Posts: n/a
 
      09-20-2004
(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 you 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.
 
Reply With Quote
 
Zian Smith
Guest
Posts: n/a
 
      09-20-2004
(markus) wrote in message news:<. 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...
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      09-20-2004
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
 
Reply With Quote
 
P.T. Breuer
Guest
Posts: n/a
 
      09-20-2004
Default User <> wrote:
> 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.


There you are!

Peter
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      09-20-2004
P.T. Breuer wrote:

> Default User <> wrote:
> > 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.

>
> There you are!


Quite a non-sequitur. Do you deny that we (comp.lang.c) handle many
questions and problems each day? Do I need to post examples and make
you look foolish?




Brian Rodenborn
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Are system calls sometimes costlier than library calls? Richard Tobin C Programming 24 11-11-2007 08:52 AM
How can I determine the cause of dropped Vonage calls? cjtwantstoknow@yahoo.com VOIP 0 08-30-2005 05:38 PM
MoVoIP - FREE MOBILE Inetrnet Phone Calls - FREE Internet Phone Calls ubifone VOIP 0 07-29-2005 04:31 PM
nuby: determine method passed and determine the receiver that received the method Peņa, Botp Ruby 1 01-24-2004 07:51 PM



Advertisments