pread() function declaration is not in <unistd.h>

R

Robert Gamble

According tohttp://www.opengroup.org/pubs/online/7908799/xsh/pread.html
,

pread() function should be declared in <unistd.h>.

But when I preprocessed following case:

#include <unistd.h>
int main() { }

I didn't see pread() declared there.

Anyone knows why ?

First off, pread() is not a Standard C function, nor is unistd.h a
Standard header, they are part of POSIX, a standard whose details are
more appropriately discussed a group like comp.unix.programmer. As
for why the function declaration is not visible, check your man pages,
you probably need to define some macro(s) before #including the header
such as:

#define _XOPEN_SOURCE 500
#include <unistd.h>
int main() { }

Robert Gamble
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top