/usr/src/linux2.4/include/asm-i386/unistd.h, /usr/include/linux/unistd.h and...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



/usr/src/linux2.4/include/asm-i386/unistd.h
/usr/include/linux/unistd.h
/usr/include/unistd.h
There are there files named unistd.h, as listed above, in my box. I am a little confused. Can someone clarify if my understanding is correct? and explain there relationship?


When I write a program such as main.c, I believe I am using the third one "/usr/include/unistd.h"--so it's from glibc package; when I build a compile a linux binary, I believe I am going to use the first one "/usr/src/linux2.4/include/asm-i386/unistd.h"--so it's from kernel source; what is the functionality of the second one, "/usr/include/linux/unistd.h"? I guess it's somehow generated from the first one.

//main.c
#include <unistd.h>
int main(){
 write(0, "test", 4);
}

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux