_posix_pipe_buf?

This is a discussion on _posix_pipe_buf? within the Linux Programming forums, part of the Platform Specific Boards category; Hello gang, I have a C assignment for school where in the specifications it says that a particular char array ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    21

    _posix_pipe_buf?

    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:
    Code:
    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
    Code:
    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?

    ~arker

    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.

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    Here you can find it, it seems to be in the file limits.h.

    http://www.opengroup.org/onlinepubs/.../limits.h.html

    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.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    21
    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.

    ~arker

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21