sysconf returns wrong value (?)

Sebastien DECUGIS Sebastien.Decugis@Ext.Bull.Net
Wed May 26 11:44:00 GMT 2004


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/



More information about the Libc-alpha mailing list