about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-11-27 22:47:48 +0000
committerUlrich Drepper <drepper@redhat.com>2004-11-27 22:47:48 +0000
commit597ce09c76eeff5dc135d9bb87913447d18fb2d8 (patch)
tree0df8f356feba006cc521694f04b0f1a8f0561733
parent60e4523a0826bfedc5bc1f8f0f3f7e8d8d67adc5 (diff)
downloadglibc-597ce09c76eeff5dc135d9bb87913447d18fb2d8.tar.gz
glibc-597ce09c76eeff5dc135d9bb87913447d18fb2d8.tar.xz
glibc-597ce09c76eeff5dc135d9bb87913447d18fb2d8.zip
Update.
	* posix/Makefile (tests): Add tst-sysconf.
	* posix/tst-sysconf.c: New file.
-rw-r--r--ChangeLog3
-rw-r--r--linuxthreads/ChangeLog9
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h9
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h9
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h9
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h9
-rw-r--r--localedata/README21
-rw-r--r--nptl/ChangeLog9
-rw-r--r--nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h9
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h9
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h9
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h9
-rw-r--r--posix/Makefile2
-rw-r--r--posix/tst-sysconf.c114
14 files changed, 212 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index c85a1bd044..e3b74a394b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
 
+	* posix/Makefile (tests): Add tst-sysconf.
+	* posix/tst-sysconf.c: New file.
+
 	* posix/getconf.c (vars): Add support for _SC_IPV6 and
 	_SC_RAW_SOCKETS.
 	* sysdeps/posix/sysconf.c (__sysconf): Add support for _SC_IPV6
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 3c797fe7f5..3a0af11862 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,12 @@
+2004-11-27  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
+	_POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
+	_POSIX_THREAD_PRIO_PROTECT): Define.
+	* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
+
 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
index 23d3546ebe..23baba8915 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -93,6 +93,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -150,6 +152,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -163,4 +168,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
index 883cb38ec9..a9b9f098a9 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
@@ -93,6 +93,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -156,6 +158,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -169,4 +174,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
index 5a6629bb4e..95728c106f 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
@@ -93,6 +93,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -156,6 +158,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -169,4 +174,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
index c7c1b9302e..8973bc8fdf 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
@@ -93,6 +93,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -156,6 +158,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -169,4 +174,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/localedata/README b/localedata/README
index 8ce09c16ed..f05bf15ceb 100644
--- a/localedata/README
+++ b/localedata/README
@@ -2,8 +2,8 @@
 				  and
 		    POSIX character set descriptions
 
-Ulrich Drepper			Time-stamp: <2000/07/20 13:08:24 aj>
-drepper@cygnus.com
+Ulrich Drepper			Time-stamp: <2004/11/27 13:06:54 drepper>
+drepper@redhat.com
 
 
 This directory contains the data needed to build the locale data files
@@ -40,22 +40,9 @@ current directory simply use
 How to use these data files is described in the GNU libc manual,
 especially in the section describing the `setlocale' function.
 
+All problems should be reported using
 
-The files contained here were originally from
-
-	ftp://dkuug.dk/i18n/WG15-collection
-
-Keld Jörn Simonsen from the Danish Unix User Group maintains this
-archive on behalf of the POSIX working groups.  When you find some wrong
-data or want to add something please contact
-
-	Keld Jörn Simonsen <keld@dkuug.dk>
-and
-	Ulrich Drepper <drepper@cygnus.com>
-
-Please make sure your corrections are relative to the originally
-distributed files.  Consult the CHECKSUMS file which contains the MD5
-sums for all data files.
+  http://sources.redhat.com/bugzilla/
 
 
 One more note: the `POSIX' locale definition is not meant to be used
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 902cbbfbf9..4b2c1dbf1b 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,12 @@
+2004-11-27  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
+	_POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
+	_POSIX_THREAD_PRIO_PROTECT): Define.
+	* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
+
 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
diff --git a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
index b922d373b6..a32197ee16 100644
--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -90,6 +90,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -147,6 +149,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -160,4 +165,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection so far.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
index 7ea6bdef35..f46b381406 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
@@ -90,6 +90,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -153,6 +155,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -166,4 +171,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection so far.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
index 7ea6bdef35..f46b381406 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
@@ -90,6 +90,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -153,6 +155,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -166,4 +171,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection so far.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
index 7ea6bdef35..f46b381406 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
@@ -90,6 +90,8 @@
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
+/* Support for prioritization is also available.  */
+#define _POSIX_PRIORITIZED_IO	200112L
 
 /* The LFS support in asynchronous I/O is also available.  */
 #define _LFS64_ASYNCHRONOUS_IO	1
@@ -153,6 +155,9 @@
 /* Raw socket support is available.  */
 #define _POSIX_RAW_SOCKETS	200112L
 
+/* We have at least one terminal.  */
+#define _POSIX2_CHAR_TERM	200112L
+
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1
 #define _POSIX_THREAD_SPORADIC_SERVER	-1
@@ -166,4 +171,8 @@
 /* Typed memory objects are not available.  */
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
 
+/* No support for priority inheritance or protection so far.  */
+#define _POSIX_THREAD_PRIO_INHERIT	-1
+#define _POSIX_THREAD_PRIO_PROTECT	-1
+
 #endif /* posix_opt.h */
diff --git a/posix/Makefile b/posix/Makefile
index faee4bbd54..bdd3e71cca 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -83,7 +83,7 @@ tests		:= tstgetopt testfnm runtests runptests	     \
 		   tst-nice tst-nanosleep tst-regex2 \
 		   transbug tst-rxspencer tst-pcre tst-boost \
 		   bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \
-		   tst-getaddrinfo2 bug-glob1 bug-glob2
+		   tst-getaddrinfo2 bug-glob1 bug-glob2 tst-sysconf
 xtests		:= bug-ga2
 ifeq (yes,$(build-shared))
 test-srcs	:= globtest
diff --git a/posix/tst-sysconf.c b/posix/tst-sysconf.c
new file mode 100644
index 0000000000..e9ff06a8da
--- /dev/null
+++ b/posix/tst-sysconf.c
@@ -0,0 +1,114 @@
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+static struct
+{
+  long int _P_val;
+  const char *name;
+  int _SC_val;
+  bool positive;
+  bool posix2;
+} posix_options[] =
+  {
+#define N_(name, pos) { _POSIX_##name, #name, _SC_##name, pos, false }
+#define NP(name) N_ (name, true)
+#define N(name) N_ (name, false)
+#define N2(name) { _POSIX2_##name, #name, _SC_2_##name, false, true }
+    N (ADVISORY_INFO),
+    N (ASYNCHRONOUS_IO),
+    N (BARRIERS),
+    N (CLOCK_SELECTION),
+    N (CPUTIME),
+    N (FSYNC),
+    N (IPV6),
+    NP (JOB_CONTROL),
+    N (MAPPED_FILES),
+    N (MEMLOCK),
+    N (MEMLOCK_RANGE),
+    N (MEMORY_PROTECTION),
+    N (MESSAGE_PASSING),
+    N (MONOTONIC_CLOCK),
+    N (PRIORITIZED_IO),
+    N (PRIORITY_SCHEDULING),
+    N (RAW_SOCKETS),
+    N (READER_WRITER_LOCKS),
+    N (REALTIME_SIGNALS),
+    NP (REGEXP),
+    NP (SAVED_IDS),
+    N (SEMAPHORES),
+    N (SHARED_MEMORY_OBJECTS),
+    NP (SHELL),
+    N (SPAWN),
+    N (SPIN_LOCKS),
+    N (SPORADIC_SERVER),
+    N (SYNCHRONIZED_IO),
+    N (THREAD_ATTR_STACKADDR),
+    N (THREAD_ATTR_STACKSIZE),
+    N (THREAD_CPUTIME),
+    N (THREAD_PRIO_INHERIT),
+    N (THREAD_PRIO_PROTECT),
+    N (THREAD_PRIORITY_SCHEDULING),
+    N (THREAD_PROCESS_SHARED),
+    N (THREAD_SAFE_FUNCTIONS),
+    N (THREAD_SPORADIC_SERVER),
+    N (THREADS),
+    N (TIMEOUTS),
+    N (TIMERS),
+    N (TRACE),
+    N (TRACE_EVENT_FILTER),
+    N (TRACE_INHERIT),
+    N (TRACE_LOG),
+    N (TYPED_MEMORY_OBJECTS),
+    N2 (C_BIND),
+    N2 (C_DEV),
+    N2 (CHAR_TERM)
+  };
+#define nposix_options (sizeof (posix_options) / sizeof (posix_options[0]))
+
+static int
+do_test (void)
+{
+  int result = 0;
+
+  for (int i = 0; i < nposix_options; ++i)
+    {
+      long int scret = sysconf (posix_options[i]._SC_val);
+
+      if (scret == 0)
+	{
+	  printf ("sysconf(_SC_%s%s) returned zero\n",
+		  posix_options[i].posix2 ? "2_" : "", posix_options[i].name);
+	  result = 1;
+	}
+      if (posix_options[i]._P_val != 0 && posix_options[i]._P_val != scret)
+	{
+	  printf ("sysconf(_SC_%s%s) = %ld does not match _POSIX%s_%s = %ld\n",
+		  posix_options[i].posix2 ? "2_" : "", posix_options[i].name,
+		  scret,
+		  posix_options[i].posix2 ? "2" : "", posix_options[i].name,
+		  posix_options[i]._P_val);
+	  result = 1;
+	}
+      else if (posix_options[i].positive && scret < 0)
+	{
+	  printf ("sysconf(_SC_%s%s) must be > 0\n",
+		  posix_options[i].posix2 ? "2_" : "", posix_options[i].name);
+	  result = 1;
+	}
+
+#define STDVER 200112L
+      if (scret > 0 && scret != STDVER && !posix_options[i].positive)
+	{
+	  printf ("sysconf(_SC_%s%s) must be %ldL\n",
+		  posix_options[i].posix2 ? "2_" : "", posix_options[i].name,
+		  STDVER);
+	  result = 1;
+	}
+    }
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"