20 #define _PEDIGREE_COMPILING_SUBSYS 22 #include "pedigree/kernel/processor/types.h" 24 #define _COMPILING_NEWLIB 29 #include <sys/config.h> 35 #define errno (*__errno()) 36 extern int *__errno(
void);
38 long sysconf(
int name)
40 syslog(LOG_NOTICE,
"[%d] sysconf(%d)", getpid(), name);
44 case _SC_AIO_LISTIO_MAX:
46 return AIO_LISTIO_MAX;
58 case _SC_AIO_PRIO_DELTA_MAX:
59 #ifdef AIO_PRIO_DELTA_MAX 60 return AIO_PRIO_DELTA_MAX;
86 case _SC_DELAYTIMER_MAX:
88 return DELAYTIMER_MAX;
93 case _SC_GETGR_R_SIZE_MAX:
94 #ifdef _GETGR_R_SIZE_MAX 95 return _GETGR_R_SIZE_MAX;
100 case _SC_GETPW_R_SIZE_MAX:
101 #ifdef _GETPW_R_SIZE_MAX 102 return _GETPW_R_SIZE_MAX;
107 case _SC_LOGIN_NAME_MAX:
108 #ifdef LOGIN_NAME_MAX 109 return LOGIN_NAME_MAX;
114 case _SC_MQ_OPEN_MAX:
121 case _SC_MQ_PRIO_MAX:
128 case _SC_NGROUPS_MAX:
162 case _SC_SEM_NSEMS_MAX:
164 return SEM_NSEMS_MAX;
169 case _SC_SEM_VALUE_MAX:
171 return SEM_VALUE_MAX;
176 case _SC_SIGQUEUE_MAX:
190 case _SC_THREAD_DESTRUCTOR_ITERATIONS:
191 #ifdef PTHREAD_DESTRUCTOR_ITERATIONS 192 return PTHREAD_DESTRUCTOR_ITERATIONS;
197 case _SC_THREAD_KEYS_MAX:
198 #ifdef PTHREAD_KEYS_MAX 199 return PTHREAD_KEYS_MAX;
204 case _SC_THREAD_STACK_MIN:
205 #ifdef PTHREAD_STACK_MIN 206 return PTHREAD_STACK_MIN;
211 case _SC_THREAD_THREADS_MAX:
212 #ifdef PTHREAD_THREADS_MAX 213 return PTHREAD_THREADS_MAX;
225 case _SC_TTY_NAME_MAX:
239 case _SC_ASYNCHRONOUS_IO:
240 #ifdef _POSIX_ASYNCHRONOUS_IO 253 case _SC_JOB_CONTROL:
254 #ifdef _POSIX_JOB_CONTROL 260 case _SC_MAPPED_FILES:
261 #ifdef _POSIX_MAPPED_FILES 268 #ifdef _POSIX_MEMLOCK 274 case _SC_MEMLOCK_RANGE:
275 #ifdef _POSIX_MEMLOCK_RANGE 276 return _POSIX_MEMLOCK_RANGE;
281 case _SC_MEMORY_PROTECTION:
282 #ifdef _POSIX_MEMORY_PROTECTION 288 case _SC_MESSAGE_PASSING:
289 #ifdef _POSIX_MESSAGE_PASSING 295 case _SC_PRIORITIZED_IO:
296 #ifdef _POSIX_PRIORITIZED_IO 302 case _SC_PRIORITY_SCHEDULING:
303 #ifdef _POSIX_PRIORITY_SCHEDULING 309 case _SC_REALTIME_SIGNALS:
310 #ifdef _POSIX_REALTIME_SIGNALS 317 #ifdef _POSIX_SAVED_IDS 324 #ifdef _POSIX_SEMAPHORES 330 case _SC_SHARED_MEMORY_OBJECTS:
331 #ifdef _POSIX_SHARED_MEMORY_OBJECTS 337 case _SC_SYNCHRONIZED_IO:
338 #ifdef _POSIX_SYNCHRONIZED_IO 352 #ifdef _POSIX_THREADS 358 case _SC_THREAD_ATTR_STACKADDR:
359 #ifdef _POSIX_THREAD_ATTR_STACKADDR 365 case _SC_THREAD_ATTR_STACKSIZE:
366 #ifdef _POSIX_THREAD_ATTR_STACKSIZE 372 case _SC_THREAD_PRIORITY_SCHEDULING:
373 #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING 379 case _SC_THREAD_PRIO_INHERIT:
380 #ifdef _POSIX_THREAD_PRIO_INHERIT 386 case _SC_THREAD_PRIO_PROTECT:
387 #ifdef _POSIX_THREAD_PRIO_PROTECT 393 case _SC_THREAD_PROCESS_SHARED:
394 #ifdef _POSIX_THREAD_PROCESS_SHARED 400 case _SC_THREAD_SAFE_FUNCTIONS:
401 #ifdef _POSIX_THREAD_SAFE_FUNCTIONS 408 #ifdef _POSIX_VERSION 409 return _POSIX_VERSION;