View Full Version : strange header files in C


system_eyes
hello friends., while i was checking some programs, i have found those header files
<stdio.h>
<sys/types.h>
<sys/socket.h>
<netinet/in.h>
<netdb.h>
and i have never heard of them


then i have checked some c refrences such as http://www.dinkumware.com/

but also i couldn;t find those header files

i wonder if those files are system dependant or what ??

alaa
>then i have checked some c refrences such as
>http://www.dinkumware.com/
>but also i couldn;t find those header files

strange, what version of the internet are you using, maybe you should update it.

http://www.dinkumware.com/manuals/reader.aspx?b=c/&h=stdio.html

the other header part of the GNU Standard C library and they are usualy covered by the POSIX standard or by some RFC
sys/types.h and sys/socket.h are standard POSIX headers.

the rest are RFC headers, don't know if they're guaranteed to exist on other Unix systems.
you should try

man -S3 -K netdb.h
man -S3 -K netinet/in.h

and you can laways query your package management system to see where these files came from (in mandrake you would do urpmf netdb.h).

cheers,
Alaa

system_eyes
thanks alaa,
you were really helpful, but i wonder what is posix???!!
and where can i find a refrence for them
thanks again

joe_lite
posix is a the standard that allunix based systems adhere to and it define(among other things) the standard c calls that is portable among versions and implementations of UNIX
bye

Joe

uniball
POSIX: Portable Operating System Extensions
The posix standard requires a set of tools to be on the system with unified command line arguments, A special header files/structs/functions to be present to ensure the portability of apps. on all posix compliant systems
search google for the standard, I remember i had a copy but i donno where it is.

hicham
Can be found online at:
http://www.opengroup.org/onlinepubs/007904975/toc.htm

Hicham

system_eyes
thanks people ;)