This may be a ridiculous question, but it seems like a reasonable one to me… I often open up source files and see various system header files included and wonder what each of them are. I know what the likes of stdio.h and sys\types.h are for, but there are others that I’m not too sure about. Is there someplace that gives a list of standard header files and a description of their purpose (and details given per OS, language standard)? Maybe this list would also include definitions included in said header files, macros, etc. Something organised by topic would be helpful, too.
This may be a ridiculous question, but it seems like a reasonable one to
Share
For language-defined headers, the library section (section 7) of the C standard (PDF) is definitive. There’s a subsection for each header, though
<limits.h>and<float.h>are described in 5.2.4.2.POSIX is here; access is free, but you have to sign up for an account. (I’m actually not 100% sure of the relationship among POSIX, SUS, and IEEE Std 1003.1.)
EDIT :
Mac OSX man pages are available here.
But consider that you might be approaching this from the wrong direction. When writing code, a better approach is typically to (a) decide what you want to do, (b) find a function that will do it, and (c) read the function’s documentation to determine which header you need to
#include. A given header doesn’t necessarily have a coherent meaning.