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

Discussion in 'C Programming' started by markus, Sep 20, 2004.

  1. markus

    markus Guest

    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
    markus, Sep 20, 2004
    #1
    1. Advertising

  2. markus

    Richard Bos Guest

    (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
    Richard Bos, Sep 20, 2004
    #2
    1. Advertising

  3. markus

    P.T. Breuer Guest

    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
    P.T. Breuer, Sep 20, 2004
    #3
  4. markus

    CBFalconer Guest

    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!
    CBFalconer, Sep 20, 2004
    #4
  5. markus

    Dan Espen Guest

    (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.
    Dan Espen, Sep 20, 2004
    #5
  6. markus

    SM Ryan Guest

    (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.
    SM Ryan, Sep 20, 2004
    #6
  7. markus

    Zian Smith Guest

    (markus) wrote in message news:<>...
    > 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...
    Zian Smith, Sep 20, 2004
    #7
  8. markus

    Default User Guest

    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
    Default User, Sep 20, 2004
    #8
  9. markus

    P.T. Breuer Guest

    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
    P.T. Breuer, Sep 20, 2004
    #9
  10. markus

    Default User Guest

    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
    Default User, Sep 20, 2004
    #10
  11. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    In comp.os.linux.misc Default User <> suggested:
    > 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?


    Mh, looks like both have made their points and seem to have a
    quite different opinion about clc. Nothing unusual, or anything
    that would make it reasonable to begin insulting each other,
    while wasting bandwidth. Probably the only thing a large thread
    would change are this weeks stats of colm/cua and clc (if there
    is such a thing).;)

    Thx for reading

    --
    Michael Heiming (GPG-Key ID: 0xEDD27B94)
    mail: echo | perl -pe 'y/a-z/n-za-m/'
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBTzB+AkPEju3Se5QRAnp4AKCMpv33rr3JD6yK0l2jGDs0FHV1qACgsxTE
    8P+pDbYLOjC+WlXKNZELMU0=
    =QbXo
    -----END PGP SIGNATURE-----
    Michael Heiming, Sep 20, 2004
    #11
  12. markus

    P.T. Breuer Guest

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


    :) !!!!

    Yay! They haven't changed!

    It's like stepping into a time warp, except I daresay a whole new load
    of lusers questons about library functions are nowadays consigned to the
    bin of null. Threading anyone? Reentrancy?

    Yo ho ho.

    Peter
    P.T. Breuer, Sep 20, 2004
    #12
  13. markus

    Bill Marcum Guest

    ["Followup-To:" header set to comp.unix.admin.]
    On Mon, 20 Sep 2004 11:53:52 GMT, P.T. Breuer
    <3m.es> 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.
    >

    If you avoid going to comp.lang.c, you probably only see articles which
    are crossposted to that group, and anything crossposted is almost
    certain to be considered off-topic.

    --
    System Events
    =-=-=-=-=-=-=
    Sep 16 03:31:11 don kernel: lp0 on fire
    Bill Marcum, Sep 20, 2004
    #13
  14. markus

    Default User Guest

    P.T. Breuer wrote:


    > It's like stepping into a time warp, except I daresay a whole new load
    > of lusers questons about library functions are nowadays consigned to
    > the bin of null. Threading anyone? Reentrancy?



    You continue to dodge the question. Obviously, you've realized that
    your lies are exposed.




    Brian Rodenborn
    Default User, Sep 20, 2004
    #14
  15. markus

    P.T. Breuer Guest

    Default User <> wrote:
    > P.T. Breuer wrote:


    > > It's like stepping into a time warp, except I daresay a whole new load
    > > of lusers questons about library functions are nowadays consigned to
    > > the bin of null. Threading anyone? Reentrancy?


    > You continue to dodge the question. Obviously, you've realized that
    > your lies are exposed.


    Ooooh, yes! It's just as I recalled!

    May I go back to arguing on the kernel list now? I really would like to
    tell you all about my problems parsing gnu C extensions, but I have an
    urgent appointment with a paper clip.

    Peter
    P.T. Breuer, Sep 20, 2004
    #15
  16. markus

    P.T. Breuer Guest

    Bill Marcum <> wrote:
    > On Mon, 20 Sep 2004 11:53:52 GMT, P.T. Breuer <3m.es> wrote:
    > If you avoid going to comp.lang.c, you probably only see articles which
    > are crossposted to that group, and anything crossposted is almost
    > certain to be considered off-topic.


    Hypothetically exactly so. Of course, to all intents and purposes, and
    a close approximation that a microbe would say !whew! to, I NEVER see
    articles posted to that group, crossposted or not.

    Peter
    P.T. Breuer, Sep 20, 2004
    #16
  17. markus

    Default User Guest

    P.T. Breuer wrote:

    > May I go back to arguing on the kernel list now? I really would like
    > to tell you all about my problems parsing gnu C extensions, but I
    > have an urgent appointment with a paper clip.



    Be my guest.
    Default User, Sep 21, 2004
    #17
  18. On Mon, 20 Sep 2004 22:35:33 GMT, in comp.lang.c , 3m.es
    (P.T. Breuer) wrote:

    >Bill Marcum <> wrote:
    >> On Mon, 20 Sep 2004 11:53:52 GMT, P.T. Breuer <3m.es> wrote:
    >> If you avoid going to comp.lang.c, you probably only see articles which
    >> are crossposted to that group, and anything crossposted is almost
    >> certain to be considered off-topic.

    >
    >Hypothetically exactly so. Of course, to all intents and purposes, and
    >a close approximation that a microbe would say !whew! to, I NEVER see
    >articles posted to that group, crossposted or not.


    It would seem, from the brief exchange I've observed, that you ought to
    crawl back under your rock about now, to avoid having your mind polluted
    further. Thanks for playing.
    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
    Mark McIntyre, Sep 21, 2004
    #18
  19. markus

    P.T. Breuer Guest

    Mark McIntyre <> wrote:
    > On Mon, 20 Sep 2004 22:35:33 GMT, in comp.lang.c , 3m.es
    > (P.T. Breuer) wrote:


    > >Bill Marcum <> wrote:
    > >> On Mon, 20 Sep 2004 11:53:52 GMT, P.T. Breuer <3m.es> wrote:
    > >> If you avoid going to comp.lang.c, you probably only see articles which
    > >> are crossposted to that group, and anything crossposted is almost
    > >> certain to be considered off-topic.

    > >
    > >Hypothetically exactly so. Of course, to all intents and purposes, and
    > >a close approximation that a microbe would say !whew! to, I NEVER see
    > >articles posted to that group, crossposted or not.


    > It would seem, from the brief exchange I've observed, that you ought to
    > crawl back under your rock about now, to avoid having your mind polluted
    > further. Thanks for playing.


    No hay problema - I'm glad to have had my prejudices confirmed! Stay in
    the groove, please do!

    Peter
    P.T. Breuer, Sep 21, 2004
    #19
  20. In article <3m.es>,
    P.T. Breuer <3m.es> wrote:
    >Mark McIntyre <> wrote:
    >> On Mon, 20 Sep 2004 22:35:33 GMT, in comp.lang.c , 3m.es
    >> (P.T. Breuer) wrote:

    >
    >> >Bill Marcum <> wrote:
    >> >> On Mon, 20 Sep 2004 11:53:52 GMT, P.T. Breuer <3m.es> wrote:
    >> >> If you avoid going to comp.lang.c, you probably only see articles which
    >> >> are crossposted to that group, and anything crossposted is almost
    >> >> certain to be considered off-topic.
    >> >
    >> >Hypothetically exactly so. Of course, to all intents and purposes, and
    >> >a close approximation that a microbe would say !whew! to, I NEVER see
    >> >articles posted to that group, crossposted or not.

    >
    >> It would seem, from the brief exchange I've observed, that you ought to
    >> crawl back under your rock about now, to avoid having your mind polluted
    >> further. Thanks for playing.

    >
    >No hay problema - I'm glad to have had my prejudices confirmed! Stay in
    >the groove, please do!
    >
    >Peter


    You are absolutely right, of course. Now, I'm not saying that problems
    don't get solved in this NG, from time to time, although I find it boring
    when they do. I much prefer the incessant "OT - that's OT!" postings.

    However, the thing is, I can't possibly imagine anything that you could
    post to this group, that wouldn't fail at least one of the conditions
    below:
    1) OT (and we all know what this means by now)
    2) Answer findable in some (available online) FAQ or document.
    3) Has to do with algorithms. Note that algorithm questions are
    generally held to be OT, but there is some leeway here. I think
    we would all agree that "How do I do FFTs (in C)?" is OT, but how
    about "How do I traverse a string (in C)?"

    Note that #2 is a biggie. I'll bet 99.39% of all the advice given here is
    available in FAQs and other documents. But it is often easier to just give
    the advice, rather than do the technically correct thing - which is to
    point the poster at the FAQ/document.
    Kenny McCormack, Sep 22, 2004
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    12
    Views:
    1,604
    Dave Thompson
    Jan 10, 2005
  2. sathya
    Replies:
    0
    Views:
    304
    sathya
    Jan 3, 2006
  3. Replies:
    18
    Views:
    594
    Dave Thompson
    Jan 10, 2005
  4. Richard Tobin
    Replies:
    24
    Views:
    758
  5. Fritz Wuehler

    What good C compilers are available for Linux/UNIX?

    Fritz Wuehler, May 17, 2011, in forum: C Programming
    Replies:
    13
    Views:
    1,221
    Angel
    May 19, 2011
Loading...

Share This Page