From a3bbce5b6895a927b60ba92e384e9682afb9d8c3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 17:37:40 +0000 Subject: [PATCH] Update. 2001-04-22 Ulrich Drepper * posix/getconf.c: Fix names of XBS5 LFS test variables. Add missing configuration variables from XPG6. * posix/tst-getconf.c: New file. * posix/Makefile (generated): Add tst-getconf.out. (tests): Add ($objpfx)tst-getconf.out. Add rule to run tst-getconf.sh. * sysdeps/generic/bits/confname.h: Add missing _PC_ and _SC_ values from XPG6. * sysdeps/posix/fpathconf.c: Add handling of _PC_ALLOC_SIZE_MIN and _PC_SYMLINK_MAX. * sysdeps/posix/pathconf.c: Likewise. * sysdeps/posix/sysconf.c: Correct spelling of _SC_MULTI_PROCESS and _SC_SYMLOOP_MAX. --- ChangeLog | 16 ++ bits/confname.h | 27 ++- linuxthreads/ChangeLog | 5 + .../sysdeps/unix/sysv/linux/bits/posix_opt.h | 3 +- .../sysdeps/unix/sysv/linux/i386/bits/posix_opt.h | 5 +- posix/Makefile | 7 +- posix/getconf.c | 195 +++++++++++------ posix/tst-getconf.sh | 233 +++++++++++++++++++++ sysdeps/generic/bits/confname.h | 27 ++- sysdeps/posix/fpathconf.c | 17 ++ sysdeps/posix/pathconf.c | 17 ++ sysdeps/posix/sysconf.c | 8 +- 12 files changed, 479 insertions(+), 81 deletions(-) create mode 100644 posix/tst-getconf.sh diff --git a/ChangeLog b/ChangeLog index dd2d5db..e71c4a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2001-04-22 Ulrich Drepper + + * posix/getconf.c: Fix names of XBS5 LFS test variables. + Add missing configuration variables from XPG6. + * posix/tst-getconf.c: New file. + * posix/Makefile (generated): Add tst-getconf.out. + (tests): Add ($objpfx)tst-getconf.out. + Add rule to run tst-getconf.sh. + * sysdeps/generic/bits/confname.h: Add missing _PC_ and _SC_ values + from XPG6. + * sysdeps/posix/fpathconf.c: Add handling of _PC_ALLOC_SIZE_MIN and + _PC_SYMLINK_MAX. + * sysdeps/posix/pathconf.c: Likewise. + * sysdeps/posix/sysconf.c: Correct spelling of _SC_MULTI_PROCESS + and _SC_SYMLOOP_MAX. + 2001-04-22 Philip Blundell * sysdeps/arm/fpu/feenablxcpt.c: New file. diff --git a/bits/confname.h b/bits/confname.h index 56dc021..7c785e8 100644 --- a/bits/confname.h +++ b/bits/confname.h @@ -58,8 +58,12 @@ enum #define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE _PC_REC_MIN_XFER_SIZE, #define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN + _PC_REC_XFER_ALIGN, #define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN + _PC_ALLOC_SIZE_MIN, +#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN + _PC_SYMLINK_MAX +#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX }; /* Values for the argument to `sysconf'. */ @@ -384,8 +388,8 @@ enum #define _SC_FILE_SYSTEM _SC_FILE_SYSTEM _SC_MONOTONIC_CLOCK, #define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTIPLE_PROCESS, -#define _SC_MULTIPLE_PROCESS _SC_MULTIPLE_PROCESS + _SC_MULTI_PROCESS, +#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS _SC_SINGLE_PROCESS, #define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS _SC_NETWORKING, @@ -430,8 +434,8 @@ enum #define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE _SC_2_PBS_TRACK, #define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP, -#define _SC_SYMLOOP _SC_SYMLOOP + _SC_SYMLOOP_MAX, +#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX _SC_STREAMS, #define _SC_STREAMS _SC_STREAMS _SC_2_PBS_CHECKPOINT, @@ -443,8 +447,19 @@ enum #define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG _SC_V6_LP64_OFF64, #define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG + _SC_V6_LPBIG_OFFBIG, #define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG + + _SC_HOST_NAME_MAX, +#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX + _SC_TRACE, +#define _SC_TRACE _SC_TRACE + _SC_TRACE_EVENT_FILTER, +#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER + _SC_TRACE_INHERIT, +#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT + _SC_TRACE_LOG +#define _SC_TRACE_LOG _SC_TRACE_LOG }; #if (defined __USE_POSIX2 || defined __USE_UNIX98 \ diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 4596333..0e9c9fb 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,8 @@ +2001-04-22 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO. + * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. + 2001-04-21 Andreas Jaeger * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h index 83c5152..54640bb 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h @@ -1,5 +1,5 @@ /* Define POSIX options for Linux. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -96,6 +96,7 @@ /* We support asynchronous I/O. */ #define _POSIX_ASYNCHRONOUS_IO 1 +#define _POSIX_ASYNC_IO 1 /* Alternative name for Unix98. */ #define _LFS_ASYNCHRONOUS_IO 1 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 e290c63..1789607 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h @@ -1,5 +1,5 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Define POSIX options for Linux/ix86. + Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -96,6 +96,7 @@ /* We support asynchronous I/O. */ #define _POSIX_ASYNCHRONOUS_IO 1 +#define _POSIX_ASYNC_IO 1 /* Alternative name for Unix98. */ #define _LFS_ASYNCHRONOUS_IO 1 diff --git a/posix/Makefile b/posix/Makefile index 1104609..f61c3a2 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -83,7 +83,7 @@ before-compile := testcases.h ptestcases.h # So they get cleaned up. generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \ annexc annexc.out wordexp-tst.out bug-regex2-mem \ - bug-regex2.mtrace + bug-regex2.mtrace tst-getconf.out include ../Rules @@ -140,7 +140,7 @@ endif # XXX Please note that for now we ignore the result of this test. tests: $(objpfx)annexc.out ifeq (no,$(cross-compiling)) -tests:$(objpfx)bug-regex2-mem +tests:$(objpfx)bug-regex2-mem $(objpfx)tst-getconf.out endif $(objpfx)annexc.out: $(objpfx)annexc @@ -154,3 +154,6 @@ bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace $(objpfx)bug-regex2-mem: $(objpfx)bug-regex2.out $(common-objpfx)malloc/mtrace $(objpfx)bug-regex2.mtrace > $@ + +$(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf + $(SHELL) -e $< $(common-objpfx) $(elf-objpfx) $(rtld-installed-name) diff --git a/posix/getconf.c b/posix/getconf.c index 903ad02..9458e1e 100644 --- a/posix/getconf.c +++ b/posix/getconf.c @@ -365,6 +365,9 @@ static const struct conf vars[] = #ifdef _SC_TIMERS { "_POSIX_TIMERS", _SC_TIMERS, SYSCONF }, #endif +#ifdef _SC_TIMER_MAX + { "TIMER_MAX", _SC_TIMER_MAX, SYSCONF }, +#endif #ifdef _SC_TZNAME_MAX { "_POSIX_TZNAME_MAX", _SC_TZNAME_MAX, SYSCONF }, #endif @@ -473,7 +476,7 @@ static const struct conf vars[] = { "POSIX2_FORT_RUN", _SC_2_FORT_RUN, SYSCONF }, #endif #ifdef _SC_LINE_MAX - { "POSIX2_LINE_MAX", _SC_LINE_MAX, SYSCONF }, + { "_POSIX2_LINE_MAX", _SC_LINE_MAX, SYSCONF }, #endif #ifdef _SC_2_LOCALEDEF { "POSIX2_LOCALEDEF", _SC_2_LOCALEDEF, SYSCONF }, @@ -527,7 +530,7 @@ static const struct conf vars[] = /* Programming environments. */ #ifdef _SC_XBS5_ILP32_OFF32 - { "XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32, SYSCONF }, + { "_XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32, SYSCONF }, #endif #ifdef _CS_XBS5_ILP32_OFF32_CFLAGS { "XBS5_ILP32_OFF32_CFLAGS", _CS_XBS5_ILP32_OFF32_CFLAGS, CONFSTR }, @@ -543,7 +546,7 @@ static const struct conf vars[] = #endif #ifdef _SC_XBS5_ILP32_OFFBIG - { "XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG, SYSCONF }, + { "_XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG, SYSCONF }, #endif #ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS { "XBS5_ILP32_OFFBIG_CFLAGS", _CS_XBS5_ILP32_OFFBIG_CFLAGS, CONFSTR }, @@ -559,7 +562,7 @@ static const struct conf vars[] = #endif #ifdef _SC_XBS5_LP64_OFF64 - { "XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64, SYSCONF }, + { "_XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64, SYSCONF }, #endif #ifdef _CS_XBS5_LP64_OFF64_CFLAGS { "XBS5_LP64_OFF64_CFLAGS", _CS_XBS5_LP64_OFF64_CFLAGS, CONFSTR }, @@ -575,7 +578,7 @@ static const struct conf vars[] = #endif #ifdef _SC_XBS5_LPBIG_OFFBIG - { "XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG, SYSCONF }, + { "_XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG, SYSCONF }, #endif #ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS { "XBS5_LPBIG_OFFBIG_CFLAGS", _CS_XBS5_LPBIG_OFFBIG_CFLAGS, CONFSTR }, @@ -650,135 +653,207 @@ static const struct conf vars[] = #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS { "POSIX_V6_LPBIG_OFFBIG_LIBS", _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, CONFSTR }, #endif -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAG - { "POSIX_V6_LPBIG_OFFBIG_LINTFLAG", _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAG, CONFSTR }, +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS + { "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, CONFSTR }, #endif #ifdef _SC_ADVISORY_INFO - { "ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF }, + { "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF }, #endif #ifdef _SC_BARRIERS - { "BARRIERS", _SC_BARRIERS, SYSCONF }, + { "_POSIX_BARRIERS", _SC_BARRIERS, SYSCONF }, #endif #ifdef _SC_BASE - { "BASE", _SC_BASE, SYSCONF }, + { "_POSIX_BASE", _SC_BASE, SYSCONF }, #endif #ifdef _SC_C_LANG_SUPPORT - { "C_LANG_SUPPORT", _SC_C_LANG_SUPPORT, SYSCONF }, + { "_POSIX_C_LANG_SUPPORT", _SC_C_LANG_SUPPORT, SYSCONF }, #endif #ifdef _SC_C_LANG_SUPPORT_R - { "C_LANG_SUPPORT_R", _SC_C_LANG_SUPPORT_R, SYSCONF }, + { "_POSIX_C_LANG_SUPPORT_R", _SC_C_LANG_SUPPORT_R, SYSCONF }, #endif #ifdef _SC_CLOCK_SELECTION - { "CLOCK_SELECTION", _SC_CLOCK_SELECTION, SYSCONF }, + { "_POSIX_CLOCK_SELECTION", _SC_CLOCK_SELECTION, SYSCONF }, #endif #ifdef _SC_CPUTIME - { "CPUTIME", _SC_CPUTIME, SYSCONF }, + { "_POSIX_CPUTIME", _SC_CPUTIME, SYSCONF }, #endif #ifdef _SC_THREAD_CPUTIME - { "THREAD_CPUTIME", _SC_THREAD_CPUTIME, SYSCONF }, + { "_POSIX_THREAD_CPUTIME", _SC_THREAD_CPUTIME, SYSCONF }, #endif #ifdef _SC_DEVICE_SPECIFIC - { "DEVICE_SPECIFIC", _SC_DEVICE_SPECIFIC, SYSCONF }, + { "_POSIX_DEVICE_SPECIFIC", _SC_DEVICE_SPECIFIC, SYSCONF }, #endif #ifdef _SC_DEVICE_SPECIFIC_R - { "DEVICE_SPECIFIC_R", _SC_DEVICE_SPECIFIC_R, SYSCONF }, + { "_POSIX_DEVICE_SPECIFIC_R", _SC_DEVICE_SPECIFIC_R, SYSCONF }, #endif #ifdef _SC_FD_MGMT - { "FD_MGMT", _SC_FD_MGMT, SYSCONF }, + { "_POSIX_FD_MGMT", _SC_FD_MGMT, SYSCONF }, #endif #ifdef _SC_FIFO - { "FIFO", _SC_FIFO, SYSCONF }, + { "_POSIX_FIFO", _SC_FIFO, SYSCONF }, #endif #ifdef _SC_PIPE - { "PIPE", _SC_PIPE, SYSCONF }, + { "_POSIX_PIPE", _SC_PIPE, SYSCONF }, #endif #ifdef _SC_FILE_ATTRIBUTES - { "FILE_ATTRIBUTES", _SC_FILE_ATTRIBUTES, SYSCONF }, + { "_POSIX_FILE_ATTRIBUTES", _SC_FILE_ATTRIBUTES, SYSCONF }, #endif #ifdef _SC_FILE_LOCKING - { "FILE_LOCKING", _SC_FILE_LOCKING, SYSCONF }, + { "_POSIX_FILE_LOCKING", _SC_FILE_LOCKING, SYSCONF }, #endif #ifdef _SC_FILE_SYSTEM - { "FILE_SYSTEM", _SC_FILE_SYSTEM, SYSCONF }, + { "_POSIX_FILE_SYSTEM", _SC_FILE_SYSTEM, SYSCONF }, #endif #ifdef _SC_MONOTONIC_CLOCK - { "MONOTONIC_CLOCK", _SC_MONOTONIC_CLOCK, SYSCONF }, + { "_POSIX_MONOTONIC_CLOCK", _SC_MONOTONIC_CLOCK, SYSCONF }, #endif -#ifdef _SC_MULTIPLE_PROCESS - { "MULTIPLE_PROCESS", _SC_MULTIPLE_PROCESS, SYSCONF }, +#ifdef _SC_MULTI_PROCESS + { "_POSIX_MULTI_PROCESS", _SC_MULTI_PROCESS, SYSCONF }, #endif #ifdef _SC_SINGLE_PROCESS - { "SINGLE_PROCESS", _SC_SINGLE_PROCESS, SYSCONF }, + { "_POSIX_SINGLE_PROCESS", _SC_SINGLE_PROCESS, SYSCONF }, #endif #ifdef _SC_NETWORKING - { "NETWORKING", _SC_NETWORKING, SYSCONF }, + { "_POSIX_NETWORKING", _SC_NETWORKING, SYSCONF }, #endif #ifdef _SC_READER_WRITER_LOCKS - { "READER_WRITER_LOCKS", _SC_READER_WRITER_LOCKS, SYSCONF }, + { "_POSIX_READER_WRITER_LOCKS", _SC_READER_WRITER_LOCKS, SYSCONF }, #endif #ifdef _SC_SPIN_LOCKS - { "SPIN_LOCKS", _SC_SPIN_LOCKS, SYSCONF }, -#endif -#ifdef _SC_REXEXP - { "REGEXP", _SC_REXEXP, SYSCONF }, + { "_POSIX_SPIN_LOCKS", _SC_SPIN_LOCKS, SYSCONF }, #endif -#ifdef _SC_REXEXP - { "REGEXP", _SC_REXEXP, SYSCONF }, +#ifdef _SC_REGEXP + { "_POSIX_REGEXP", _SC_REGEXP, SYSCONF }, #endif -#ifdef _SC_REXEX_VERSION - { "REGEX_VERSION", _SC_REXEX_VERSION, SYSCONF }, +#ifdef _SC_REGEX_VERSION + { "_REGEX_VERSION", _SC_REGEX_VERSION, SYSCONF }, #endif #ifdef _SC_SHELL - { "SHELL", _SC_SHELL, SYSCONF }, + { "_POSIX_SHELL", _SC_SHELL, SYSCONF }, #endif #ifdef _SC_SIGNALS - { "SIGNALS", _SC_SIGNALS, SYSCONF }, + { "_POSIX_SIGNALS", _SC_SIGNALS, SYSCONF }, #endif #ifdef _SC_SPAWN - { "SPAWN", _SC_SPAWN, SYSCONF }, + { "_POSIX_SPAWN", _SC_SPAWN, SYSCONF }, #endif #ifdef _SC_SPORADIC_SERVER - { "SPORADIC_SERVER", _SC_SPORADIC_SERVER, SYSCONF }, + { "_POSIX_SPORADIC_SERVER", _SC_SPORADIC_SERVER, SYSCONF }, #endif #ifdef _SC_THREAD_SPORADIC_SERVER - { "THREAD_SPORADIC_SERVER", _SC_THREAD_SPORADIC_SERVER, SYSCONF }, + { "_POSIX_THREAD_SPORADIC_SERVER", _SC_THREAD_SPORADIC_SERVER, SYSCONF }, #endif #ifdef _SC_SYSTEM_DATABASE - { "SYSTEM_DATABASE", _SC_SYSTEM_DATABASE, SYSCONF }, + { "_POSIX_SYSTEM_DATABASE", _SC_SYSTEM_DATABASE, SYSCONF }, #endif #ifdef _SC_SYSTEM_DATABASE_R - { "SYSTEM_DATABASE_R", _SC_SYSTEM_DATABASE_R, SYSCONF }, + { "_POSIX_SYSTEM_DATABASE_R", _SC_SYSTEM_DATABASE_R, SYSCONF }, #endif #ifdef _SC_TIMEOUTS - { "TIMEOUTS", _SC_TIMEOUTS, SYSCONF }, + { "_POSIX_TIMEOUTS", _SC_TIMEOUTS, SYSCONF }, #endif #ifdef _SC_TYPED_MEMORY_OBJECTS - { "TYPED_MEMORY_OBJECTS", _SC_TYPED_MEMORY_OBJECTS, SYSCONF }, + { "_POSIX_TYPED_MEMORY_OBJECTS", _SC_TYPED_MEMORY_OBJECTS, SYSCONF }, #endif #ifdef _SC_USER_GROUPS - { "USER_GROUPS", _SC_USER_GROUPS, SYSCONF }, + { "_POSIX_USER_GROUPS", _SC_USER_GROUPS, SYSCONF }, #endif #ifdef _SC_USER_GROUPS_R - { "USER_GROUPS_R", _SC_USER_GROUPS_R, SYSCONF }, + { "_POSIX_USER_GROUPS_R", _SC_USER_GROUPS_R, SYSCONF }, +#endif +#ifdef _SC_2_PBS + { "POSIX2_PBS", _SC_2_PBS, SYSCONF }, +#endif +#ifdef _SC_2_PBS_ACCOUNTING + { "POSIX2_PBS_ACCOUNTING", _SC_2_PBS_ACCOUNTING, SYSCONF }, +#endif +#ifdef _SC_2_PBS_LOCATE + { "POSIX2_PBS_LOCATE", _SC_2_PBS_LOCATE, SYSCONF }, +#endif +#ifdef _SC_2_PBS_TRACK + { "POSIX2_PBS_TRACK", _SC_2_PBS_TRACK, SYSCONF }, +#endif +#ifdef _SC_2_PBS_MESSAGE + { "POSIX2_PBS_MESSAGE", _SC_2_PBS_MESSAGE, SYSCONF }, +#endif +#ifdef _SC_SYMLOOP_MAX + { "SYMLOOP_MAX", _SC_SYMLOOP_MAX, SYSCONF }, +#endif +#ifdef _SC_STREAM_MAX + { "STREAM_MAX", _SC_STREAM_MAX, SYSCONF }, +#endif +#ifdef _SC_AIO_LISTIO_MAX + { "AIO_LISTIO_MAX", _SC_AIO_LISTIO_MAX, SYSCONF }, +#endif +#ifdef _SC_AIO_MAX + { "AIO_MAX", _SC_AIO_MAX, SYSCONF }, +#endif +#ifdef _SC_AIO_PRIO_DELTA_MAX + { "AIO_PRIO_DELTA_MAX", _SC_AIO_PRIO_DELTA_MAX, SYSCONF }, +#endif +#ifdef _SC_DELAYTIMER_MAX + { "DELAYTIMER_MAX", _SC_DELAYTIMER_MAX, SYSCONF }, +#endif +#ifdef _SC_HOST_NAME_MAX + { "HOST_NAME_MAX", _SC_HOST_NAME_MAX, SYSCONF }, +#endif +#ifdef _SC_LOGIN_NAME_MAX + { "LOGIN_NAME_MAX", _SC_LOGIN_NAME_MAX, SYSCONF }, +#endif +#ifdef _SC_MQ_OPEN_MAX + { "MQ_OPEN_MAX", _SC_MQ_OPEN_MAX, SYSCONF }, +#endif +#ifdef _SC_MQ_PRIO_MAX + { "MQ_PRIO_MAX", _SC_MQ_PRIO_MAX, SYSCONF }, +#endif +#ifdef _SC_DEVICE_IO + { "_POSIX_DEVICE_IO", _SC_DEVICE_IO, SYSCONF }, +#endif +#ifdef _SC_TRACE + { "_POSIX_TRACE", _SC_TRACE, SYSCONF }, +#endif +#ifdef _SC_TRACE_EVENT_FILTER + { "_POSIX_TRACE_EVENT_FILTER", _SC_TRACE_EVENT_FILTER, SYSCONF }, +#endif +#ifdef _SC_TRACE_INHERIT + { "_POSIX_TRACE_INHERIT", _SC_TRACE_INHERIT, SYSCONF }, +#endif +#ifdef _SC_TRACE_LOG + { "_POSIX_TRACE_LOG", _SC_TRACE_LOG, SYSCONF }, +#endif +#ifdef _SC_RTSIG_MAX + { "RTSIG_MAX", _SC_RTSIG_MAX, SYSCONF }, +#endif +#ifdef _SC_SEM_NSEMS_MAX + { "SEM_NSEMS_MAX", _SC_SEM_NSEMS_MAX, SYSCONF }, +#endif +#ifdef _SC_SEM_VALUE_MAX + { "SEM_VALUE_MAX", _SC_SEM_VALUE_MAX, SYSCONF }, +#endif +#ifdef _SC_SIGQUEUE_MAX + { "SIGQUEUE_MAX", _SC_SIGQUEUE_MAX, SYSCONF }, +#endif +#ifdef _PC_FILESIZEBITS + { "FILESIZEBITS", _PC_FILESIZEBITS, PATHCONF }, #endif -#ifdef _SC_PBS - { "PBS", _SC_PBS, SYSCONF }, +#ifdef _PC_ALLOC_SIZE_MIN + { "POSIX_ALLOC_SIZE_MIN", _PC_ALLOC_SIZE_MIN, PATHCONF }, #endif -#ifdef _SC_PBS_ACCOUNTING - { "PBS_ACCOUNT", _SC_PBS_ACCOUNTING, SYSCONF }, +#ifdef _PC_REC_INCR_XFER_SIZE + { "POSIX_REC_INCR_XFER_SIZE", _PC_REC_INCR_XFER_SIZE, PATHCONF }, #endif -#ifdef _SC_PBS_LOCATE - { "PBS_LOCATE", _SC_PBS_LOCATE, SYSCONF }, +#ifdef _PC_REC_MAX_XFER_SIZE + { "POSIX_REC_MAX_XFER_SIZE", _PC_REC_MAX_XFER_SIZE, PATHCONF }, #endif -#ifdef _SC_PBS_TRACK - { "PBS_TRACK", _SC_PBS_TRACK, SYSCONF }, +#ifdef _PC_REC_MIN_XFER_SIZE + { "POSIX_REC_MIN_XFER_SIZE", _PC_REC_MIN_XFER_SIZE, PATHCONF }, #endif -#ifdef _SC_PBS_MESSAGE - { "PBS_MESSAGE", _SC_PBS_MESSAGE, SYSCONF }, +#ifdef _PC_REC_XFER_ALIGN + { "POSIX_REC_XFER_ALIGN", _PC_REC_XFER_ALIGN, PATHCONF }, #endif -#ifdef _SC_SYMLOOP - { "SYMLOOP", _SC_SYMLOOP, SYSCONF }, +#ifdef _PC_SYMLINK_MAX + { "SYMLINK_MAX", _PC_SYMLINK_MAX, PATHCONF }, #endif { NULL, 0, SYSCONF } diff --git a/posix/tst-getconf.sh b/posix/tst-getconf.sh new file mode 100644 index 0000000..e8f27b3 --- /dev/null +++ b/posix/tst-getconf.sh @@ -0,0 +1,233 @@ +#! /bin/sh + +common_objpfx=$1; shift +elf_objpfx=$1; shift +rtld_installed_name=$1; shift +logfile=$common_objpfx/posix/tst-getconf.out + +# Since we use `sort' we must make sure to use the same locale everywhere. +LC_ALL=C +export LC_ALL +LANG=C +export LANG + +rm -f $logfile +result=0 +while read name; do + echo -n "getconf $name: " >> $logfile + ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ + ${common_objpfx}posix/getconf "$name" 2>> $logfile >> $logfile + if test $? -ne 0; then + echo "*** $name FAILED" >> $logfile + result=1 + fi +done <> $logfile + ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ + ${common_objpfx}posix/getconf "$name" / 2>> $logfile >> $logfile + if test $? -ne 0; then + echo "*** $name FAILED" >> $logfile + result=1 + fi +done <