This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
sysconf returns wrong value (?)
- From: Sebastien DECUGIS <Sebastien dot Decugis at Ext dot Bull dot Net>
- To: libc-alpha at sources dot redhat dot com
- Date: Wed, 26 May 2004 11:02:38 +0200
- Subject: sysconf returns wrong value (?)
- Organization: Bull S.A.
Hi,
I'm not sure whether this list is the right place for this, but I have
encountered an issue with sysconf():
#include <unistd.h>
{
printf("Clock Selection option : %li\n",
sysconf(_SC_CLOCK_SELECTION));
printf("Timers option : %li\n",
sysconf(_SC_TIMERS));
printf("Thread Process-shared Synchronization option: %li\n",
sysconf(_SC_THREAD_PROCESS_SHARED));
}
This outputs (on fedora core2):
Clock Selection option : 200112
Timers option : 1
Thread Process-shared Synchronization option: 1
The POSIX standards states that the values returned by sysconf calls can
only be -1 (unsupported) or 200112L. Is the "1" return value normal? In
this case, can I assume that when the value is not -1, this means the
option is fully supported in the way POSIX (I mean IEEE Std 1003.1, 2004
Edition) specifies?
Thank you,
Best regards.
--
Sébastien DECUGIS
Bull S.A.
NPTL Tests & Trace project
http://nptl.bullopensource.org/phpBB/