This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sysconf returns wrong value (?)


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]