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

D

Doug Freyburger

markus said:
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?

A good place to start looking is under /usr/include for C files
that give their numbers. I just looked at
/usr/include/sys/syscalls.h on an AIX box I happened to be logged on
to and the map of numbers to names was given there.
The same question goes for determening available C library functions
on any Unix/Linux machine?

Too dependent on the system for me to give a good answer. Start
with the man pages, and library binaries under /usr/lib.
 
F

Flash Gordon

On 22 Sep 2004 10:47:56 -0700
markus wrote:


Too dependent on the system for me to give a good answer. Start
with the man pages, and library binaries under /usr/lib.

No it isn't. If it is a conforming hosted C implementation, which I
think you will find the majority of C implementations on Linux & Unix
tend to be (obviously those predating the C standard and some since then
don't) then it supports ALL of the standard C library.

So to determine whether they are all available just check the
documentation to confirm it claims to be a conforming implementation and
if it isn't update to something that is.
 
D

Dances With Crows

["Followup-To:" header set to comp.os.linux.misc.]
Too dependent on the system for me to give a good answer. Start with
the man pages, and library binaries under /usr/lib.
No it isn't. If it is a conforming hosted C implementation, which I
think you will find the majority of C implementations on Linux & Unix
tend to be (obviously those predating the C standard and some since
then don't) then it supports ALL of the standard C library.[/QUOTE]

The OP's question was a bit vague, but I think he meant, "How can I find
out which library functions with C bindings are available on any
Unix-like OS?", not "How can I find out which standard C library
functions are available?". The stuff in glibc/libc/whatever your
standard C library is called is a relatively small subset of the useful
C functions that are available. But Flash is right; the standard C
library should behave very similarly across different Unix-like OSes.

So, look in /usr/share/man/man3 and /usr/X11R6/man/man3 for starters.
Add other directories depending on your MANPATH. That won't tell you
everything, of course; on a Linux system, GTK+ and Qt functions don't
have man pages. Even some X11 functions don't have man pages--none of
the XTest functions seem to have them, for example. Oh well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top