Boost logo

Boost :

From: Iain Hanson (Iain.Hanson_at_[hidden])
Date: 2005-04-05 13:40:12


On Mon, 2005-04-04 at 20:51 -0400, Beman Dawes wrote:
> "Jonathan Wakely" <cow_at_[hidden]> wrote in message
> news:20050404134320.GA88664_at_compsoc.man.ac.uk...
>
[snip]

> This is the first time I've ever used the POSIX config mechanisms, so I may
> have it wrong. I'll check... Hum... I find the POSIX docs for sysconf()
> pretty impeneratable regarding the return value. I can see why I took >=0 to
> be needed, but I could also read it in a way that >0 would be OK.
>
> Any POSIX experts out there?
>
Not a posix expert but the linux man page seems fairly clear:

<quote>
 For options, typically, there is a constant _POSIX_FOO that may be
 defined in <unistd.h>. If it is undefined, one should ask at run-
time. If it is defined to -1, then the option is not supported. If
it is defined to 0, then relevant functions and headers exist, but one
has to ask at runtime what degree of support is available. If it is
defined to a value other than -1 or 0, then the option is supported.
Usually the value (such as 200112L) indicates the year and month of
the POSIX revision describing the option. Glibc uses the value 1 to
indicate support as long as the POSIX revision has not been published
yet. The sysconf() argument will be _SC_FOO. For a list of options,
see posixoptions(7).
</quote>

/ikh




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk