View Full Version : _posix_pipe_buf?

03-09-2003, 10:41 AM
Hello gang,

I have a C assignment for school where in the specifications it says that a particular char array must be declared to a size of _POSIX_PIPE_BUF like this:

char data[_POSIX_PIPE_BUF];

I assume that there is a header file somewhere that defines that macro somewhere, but I cannot find it.

A Google search turned up suggestions of limits.h, but of course, no luck. I even did a

grep _POSIX_PIPE_BUF /usr/include/*

which again, turned up nothing. There is no indication that we need to define that size ourselves in the specs, but I haven't ruled that out.

Any ideas?


Edit: I forgot to mention that I am running on a Linux box, Gentoo to be specific, but the result needs to run on a Solaris 8 box. I only assume that the macro is defined on both breeds.

03-09-2003, 10:52 AM
Here you can find it, it seems to be in the file limits.h.


But note the important note: "Some of the functionality described on this reference page extends the ISO C standard". So it may be possible that your system doesn't support it. And as far as I know, POSIX specific things are not part of the ANSI C standard.

03-09-2003, 10:59 AM
Originally posted by vVv
You should have posted this question to the Linux Programming forum.

I almost did post it there.. Bad judgement on my part.

Thanks for the help, I will define it myself on my own box.