mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 22:10:13 +00:00
Update.
* posix/Makefile (tests): Add tst-sysconf. * posix/tst-sysconf.c: New file.
This commit is contained in:
parent
60e4523a08
commit
597ce09c76
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
114
posix/tst-sysconf.c
Normal file
114
posix/tst-sysconf.c
Normal file
@ -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"
|
Loading…
Reference in New Issue
Block a user