location of header file definitions

This is a discussion on location of header file definitions within the C Programming forums, part of the General Programming Boards category; I am trying to modify the getpid() system call definition file for an assignment, however I am having trouble locating ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    96

    location of header file definitions

    I am trying to modify the getpid() system call definition file for an assignment, however I am having trouble locating where this file is. Could someone be able to tell me where the location of the headers are (always wondered that) and where I can find the actual definitions in the kernel. Thanks!

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,598
    Search the Web for "man getpid".
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    399
    Try
    Code:
    locate unistd.h

  4. #4
    Registered User
    Join Date
    Nov 2007
    Posts
    96
    I ran the "locate unistd.h" command but all I am able to find after running that is the function declarations. what should I run with "locate" to find the definitions file?

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    399
    You'll have to download your systems C lib, which most likely is GLIBC: Index of /gnu/glibc

    cd into the main source code dir, and use:
    Code:
    find ./ -iname getpid.c

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 04:02 AM
  2. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21