From: Ulrich Drepper Date: Sat, 27 Nov 2004 22:47:48 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/fedora-glibc-20041130T0624~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=597ce09c76eeff5dc135d9bb87913447d18fb2d8;p=platform%2Fupstream%2Fglibc.git Update. * posix/Makefile (tests): Add tst-sysconf. * posix/tst-sysconf.c: New file. --- diff --git a/ChangeLog b/ChangeLog index c85a1bd..e3b74a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-11-27 Ulrich Drepper + * 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 3c797fe..3a0af11 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,12 @@ +2004-11-27 Ulrich Drepper + + * 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 * 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 23d3546..23baba8 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 883cb38..a9b9f09 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 5a6629b..95728c1 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 c7c1b93..8973bc8 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 8ce09c1..f05bf15 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 -and - Ulrich Drepper - -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 902cbbf..4b2c1db 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,12 @@ +2004-11-27 Ulrich Drepper + + * 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 * 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 b922d37..a32197e 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 7ea6bde..f46b381 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 7ea6bde..f46b381 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 7ea6bde..f46b381 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 faee4bb..bdd3e71 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 0000000..e9ff06a --- /dev/null +++ b/posix/tst-sysconf.c @@ -0,0 +1,114 @@ +#include +#include +#include + +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"