For example, take open(2), which has the following synopsis:
#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int open(const char *pathname, int flags); int open(const char *pathname, int flags, mode_t mode); int creat(const char *pathname, mode_t mode);
Should I include all those header files or is any one of those fine? In the former case, how do I know which header files contain which functions, macros and typedefs?