Mon Apr 29 02:48:26 1996 Ulrich Drepper <drepper@cygnus.com>
authorroland <roland>
Wed, 1 May 1996 13:46:59 +0000 (13:46 +0000)
committerroland <roland>
Wed, 1 May 1996 13:46:59 +0000 (13:46 +0000)
* sysdeps/posix/sysconf.c: Add handling of _SC_REALTIME_SIGNALS,
_SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO,
_SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC,
_SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE,
_SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES,
_SC_SHARED_MEMORY_OBJECTS, and _SC_CHARCLASS_NAME_MAX.
* sysdeps/stub/sysconf.c: Ditto.
* sysdeps/unix/sysv/sysv4/sysconf.c: Ditto.

sysdeps/posix/sysconf.c
sysdeps/stub/sysconf.c
sysdeps/unix/sysv/sysv4/sysconf.c

index 485f9b3..bf3c5b8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -84,12 +84,112 @@ DEFUN(__sysconf, (name), int name)
 #else
       return -1;
 #endif
+
     case _SC_SAVED_IDS:
 #ifdef _POSIX_SAVED_IDS
       return 1;
 #else
       return -1;
 #endif
+
+    case _SC_REALTIME_SIGNALS:
+#ifdef _POSIX_REALTIME_SIGNALS
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_PRIORITY_SCHEDULING:
+#ifdef _POSIX_PRIORITY_SCHEDULING
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_TIMERS:
+#ifdef _POSIX_TIMERS
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_ASYNCHRONOUS_IO:
+#ifdef _POSIX_ASYNCHRONOUS_IO
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_PRIORITIZED_IO:
+#ifdef _POSIX_PRIORITIZED_IO
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_SYNCHRONIZED_IO:
+#ifdef _POSIX_SYNCHRONIZED_IO
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_FSYNC:
+#ifdef _POSIX_FSYNC
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MAPPED_FILES:
+#ifdef _POSIX_MAPPED_FILES
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MEMLOCK:
+#ifdef _POSIX_MEMLOCK
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MEMLOCK_RANGE:
+#ifdef _POSIX_MEMLOCK_RANGE
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MEMORY_PROTECTION:
+#ifdef _POSIX_MEMORY_PROTECTION
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MESSAGE_PASSING:
+#ifdef _POSIX_MESSAGE_PASSING
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_SEMAPHORES:
+#ifdef _POSIX_SEMAPHORES
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_SHARED_MEMORY_OBJECTS:
+#ifdef _POSIX_SHARED_MEMORY_OBJECTS
+      return 1;
+#else
+      return -1;
+#endif
+
     case _SC_VERSION:
       return _POSIX_VERSION;
 
@@ -152,6 +252,12 @@ DEFUN(__sysconf, (name), int name)
       return -1;
 #endif
 
+    case _SC_CHARCLASS_NAME_MAX:
+#ifdef CHARCLASS_NAME_MAX
+      return CHARCLASS_NAME_MAX;
+#else
+      return -1;
+#endif
 
     case _SC_2_VERSION:
       /* This is actually supposed to return the version
index bb4eb87..fc9ee84 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -43,6 +43,20 @@ DEFUN(__sysconf, (name), int name)
     case _SC_OPEN_MAX:
     case _SC_JOB_CONTROL:
     case _SC_SAVED_IDS:
+    case _SC_REALTIME_SIGNALS:
+    case _SC_PRIORITY_SCHEDULING:
+    case _SC_TIMERS:
+    case _SC_ASYNCHRONOUS_IO:
+    case _SC_PRIORITIZED_IO:
+    case _SC_SYNCHRONIZED_IO:
+    case _SC_FSYNC:
+    case _SC_MAPPED_FILES:
+    case _SC_MEMLOCK:
+    case _SC_MEMLOCK_RANGE:
+    case _SC_MEMORY_PROTECTION:
+    case _SC_MESSAGE_PASSING:
+    case _SC_SEMAPHORES:
+    case _SC_SHARED_MEMORY_OBJECTS:
     case _SC_VERSION:
 
     case _SC_BC_BASE_MAX:
@@ -53,6 +67,7 @@ DEFUN(__sysconf, (name), int name)
     case _SC_EXPR_NEST_MAX:
     case _SC_LINE_MAX:
     case _SC_RE_DUP_MAX:
+    case _SC_CHARCLASS_NAME_MAX:
     case _SC_2_VERSION:
     case _SC_2_C_BIND:
     case _SC_2_C_DEV:
index 607cd05..9ed5cbc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -74,12 +74,112 @@ DEFUN(__sysconf, (name), int name)
 #else
       return -1;
 #endif
+
     case _SC_SAVED_IDS:
 #ifdef _POSIX_SAVED_IDS
       return 1;
 #else
       return -1;
 #endif
+
+    case _SC_REALTIME_SIGNALS:
+#ifdef _POSIX_REALTIME_SIGNALS
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_PRIORITY_SCHEDULING:
+#ifdef _POSIX_PRIORITY_SCHEDULING
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_TIMERS:
+#ifdef _POSIX_TIMERS
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_ASYNCHRONOUS_IO:
+#ifdef _POSIX_ASYNCHRONOUS_IO
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_PRIORITIZED_IO:
+#ifdef _POSIX_PRIORITIZED_IO
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_SYNCHRONIZED_IO:
+#ifdef _POSIX_SYNCHRONIZED_IO
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_FSYNC:
+#ifdef _POSIX_FSYNC
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MAPPED_FILES:
+#ifdef _POSIX_MAPPED_FILES
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MEMLOCK:
+#ifdef _POSIX_MEMLOCK
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MEMLOCK_RANGE:
+#ifdef _POSIX_MEMLOCK_RANGE
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MEMORY_PROTECTION:
+#ifdef _POSIX_MEMORY_PROTECTION
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_MESSAGE_PASSING:
+#ifdef _POSIX_MESSAGE_PASSING
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_SEMAPHORES:
+#ifdef _POSIX_SEMAPHORES
+      return 1;
+#else
+      return -1;
+#endif
+
+    case _SC_SHARED_MEMORY_OBJECTS:
+#ifdef _POSIX_SHARED_MEMORY_OBJECTS
+      return 1;
+#else
+      return -1;
+#endif
+
     case _SC_VERSION:
       return _POSIX_VERSION;
 
@@ -142,6 +242,12 @@ DEFUN(__sysconf, (name), int name)
       return -1;
 #endif
 
+    case _SC_CHARCLASS_NAME_MAX:
+#ifdef CHARCLASS_NAME_MAX
+      return CHARCLASS_NAME_MAX;
+#else
+      return -1;
+#endif
 
     case _SC_2_VERSION:
       /* This is actually supposed to return the version