Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
Should I include any or all of the headers listed in the synopsis of a man page?

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?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You should include all of them. The POSIX specification will tell you what's in each (for instance, this is the POSIX specification for fcntl.h), or at least what's guaranteed to be in each.

over 4 years ago · Santiago Trujillo Report

0

You should include all these header files. The headers mentioned in the synopsis are all supposed to be included.

over 4 years ago · Santiago Trujillo Report

0

AFAIK, you should include all those header files. Why do you need to know which header file contains macros, functions or typedefs, if you eventually include all of them?

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!