mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 02:40:08 +00:00
Update.
* posix/getconf.c: Add support for many more POSIX options. * sysdeps/posix/sysconf.c: Likewise. * sysdeps/generic/bits/confname.h: Add many more POSIX options. * sysdeps/mach/hurd/bits/posix_opt.h: Add _POSIX_REGEXP and _POSIX_SHELL. * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. * sysdeps/unix/sysv/linux/i386/bits/time.h: Rename __CLOCK_HIGHRES to CLOCK_PROCESS_CPUTIME_ID. Add define CLOCK_MONOTONIC and CLOCK_THREAD_CPUTIME_ID. * sysdeps/unix/i386/clock_getcpuclockid.c: Set *clock_id to CLOCK_PROCESS_CPUTIME_ID. * sysdeps/unix/i386/i586/clock_getres.c: Change for renaming of __CLOCK_HIGHRES to CLOCK_PROCESS_CPUTIME_ID. Handle CLOCK_THREAD_CPUTIME_ID and CLOCK_MONOTONIC the same. * sysdeps/unix/i386/i586/clock_gettime.c: Likewise.
This commit is contained in:
parent
aa780baba8
commit
b3ae0650bc
@ -23,3 +23,5 @@ linuxthreads
|
||||
|
||||
libc.prj .libc.prcs_aux
|
||||
libc.proj .snprj
|
||||
|
||||
TODO.html
|
||||
|
16
ChangeLog
16
ChangeLog
@ -1,5 +1,21 @@
|
||||
2000-04-12 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* posix/getconf.c: Add support for many more POSIX options.
|
||||
* sysdeps/posix/sysconf.c: Likewise.
|
||||
* sysdeps/generic/bits/confname.h: Add many more POSIX options.
|
||||
* sysdeps/mach/hurd/bits/posix_opt.h: Add _POSIX_REGEXP and
|
||||
_POSIX_SHELL.
|
||||
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/bits/time.h: Rename __CLOCK_HIGHRES to
|
||||
CLOCK_PROCESS_CPUTIME_ID. Add define CLOCK_MONOTONIC and
|
||||
CLOCK_THREAD_CPUTIME_ID.
|
||||
* sysdeps/unix/i386/clock_getcpuclockid.c: Set *clock_id to
|
||||
CLOCK_PROCESS_CPUTIME_ID.
|
||||
* sysdeps/unix/i386/i586/clock_getres.c: Change for renaming of
|
||||
__CLOCK_HIGHRES to CLOCK_PROCESS_CPUTIME_ID. Handle
|
||||
CLOCK_THREAD_CPUTIME_ID and CLOCK_MONOTONIC the same.
|
||||
* sysdeps/unix/i386/i586/clock_gettime.c: Likewise.
|
||||
|
||||
* malloc/Makefile (tests): Add tst-calloc.
|
||||
* malloc/tst-calloc.c: New file.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
|
||||
Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1995-1998, 2000 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
|
||||
@ -335,8 +335,93 @@ enum
|
||||
#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
|
||||
_SC_XOPEN_REALTIME,
|
||||
#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
|
||||
_SC_XOPEN_REALTIME_THREADS
|
||||
_SC_XOPEN_REALTIME_THREADS,
|
||||
#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
|
||||
|
||||
_SC_ADVISORY_INFO,
|
||||
#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
|
||||
_SC_BARRIERS,
|
||||
#define _SC_BARRIERS _SC_BARRIERS
|
||||
_SC_BASE,
|
||||
#define _SC_BASE _SC_BASE
|
||||
_SC_C_LANG_SUPPORT,
|
||||
#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
|
||||
_SC_C_LANG_SUPPORT_R,
|
||||
#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
|
||||
_SC_CLOCK_SELECTION,
|
||||
#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
|
||||
_SC_CPUTIME,
|
||||
#define _SC_CPUTIME _SC_CPUTIME
|
||||
_SC_THREAD_CPUTIME,
|
||||
#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
|
||||
_SC_DEVICE_IO,
|
||||
#define _SC_DEVICE_IO _SC_DEVICE_IO
|
||||
_SC_DEVICE_SPECIFIC,
|
||||
#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
|
||||
_SC_DEVICE_SPECIFIC_R,
|
||||
#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
|
||||
_SC_FD_MGMT,
|
||||
#define _SC_FD_MGMT _SC_FD_MGMT
|
||||
_SC_FIFO,
|
||||
#define _SC_FIFO _SC_FIFO
|
||||
_SC_PIPE,
|
||||
#define _SC_PIPE _SC_PIPE
|
||||
_SC_FILE_ATTRIBUTES,
|
||||
#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
|
||||
_SC_FILE_LOCKING,
|
||||
#define _SC_FILE_LOCKING _SC_FILE_LOCKING
|
||||
_SC_FILE_SYSTEM,
|
||||
#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_SINGLE_PROCESS,
|
||||
#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
|
||||
_SC_NETWORKING,
|
||||
#define _SC_NETWORKING _SC_NETWORKING
|
||||
_SC_READER_WRITER_LOCKS,
|
||||
#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
|
||||
_SC_SPIN_LOCKS,
|
||||
#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
|
||||
_SC_REGEXP,
|
||||
#define _SC_REGEXP _SC_REGEXP
|
||||
_SC_REGEX_VERSION,
|
||||
#define _SC_REGEX_VERSION _SC_REGEX_VERSION
|
||||
_SC_SHELL,
|
||||
#define _SC_SHELL _SC_SHELL
|
||||
_SC_SIGNALS,
|
||||
#define _SC_SIGNALS _SC_SIGNALS
|
||||
_SC_SPAWN,
|
||||
#define _SC_SPAWN _SC_SPAWN
|
||||
_SC_SPORADIC_SERVER,
|
||||
#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
|
||||
_SC_THREAD_SPORADIC_SERVER,
|
||||
#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
|
||||
_SC_SYSTEM_DATABASE,
|
||||
#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
|
||||
_SC_SYSTEM_DATABASE_R,
|
||||
#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
|
||||
_SC_TIMEOUTS,
|
||||
#define _SC_TIMEOUTS _SC_TIMEOUTS
|
||||
_SC_TYPED_MEMORY_OBJECTS,
|
||||
#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
|
||||
_SC_USER_GROUPS,
|
||||
#define _SC_USER_GROUPS _SC_USER_GROUPS
|
||||
_SC_USER_GROUPS_R,
|
||||
#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
|
||||
_SC_PBS,
|
||||
#define _SC_PBS _SC_PBS
|
||||
_SC_PBS_ACCOUNTING,
|
||||
#define _SC_PBS_ACCOUNTING _SC_PBS_ACCOUNTING
|
||||
_SC_PBS_LOCATE,
|
||||
#define _SC_PBS_LOCATE _SC_PBS_LOCATE
|
||||
_SC_PBS_MESSAGE,
|
||||
#define _SC_PBS_MESSAGE _SC_PBS_MESSAGE
|
||||
_SC_PBS_TRACK,
|
||||
#define _SC_PBS_TRACK _SC_PBS_TRACK
|
||||
_SC_SYMLOOP,
|
||||
#define _SC_SYMLOOP _SC_SYMLOOP
|
||||
};
|
||||
|
||||
#if (defined __USE_POSIX2 || defined __USE_UNIX98 \
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-04-12 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
|
||||
macros.
|
||||
* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
|
||||
|
||||
2000-04-11 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
|
||||
|
@ -110,4 +110,16 @@
|
||||
/* POSIX shared memory objects are implemented. */
|
||||
#define _POSIX_SHARED_MEMORY_OBJECTS 1
|
||||
|
||||
/* GNU libc provides regular expression handling. */
|
||||
#define _POSIX_REGEXP 1
|
||||
|
||||
/* Reader/Writer locks are available. */
|
||||
#define _POSIX_READER_WRITER_LOCKS 200912L
|
||||
|
||||
/* We have a POSIX shell. */
|
||||
#define _POSIX_SHELL 1
|
||||
|
||||
/* We support the Timeouts option. */
|
||||
#define _POSIX_TIMEOUTS 200912L
|
||||
|
||||
#endif /* posix_opt.h */
|
||||
|
134
linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
Normal file
134
linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
Normal file
@ -0,0 +1,134 @@
|
||||
/* Define POSIX options for Linux.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000 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
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _POSIX_OPT_H
|
||||
#define _POSIX_OPT_H 1
|
||||
|
||||
/* Job control is supported. */
|
||||
#define _POSIX_JOB_CONTROL 1
|
||||
|
||||
/* Processes have a saved set-user-ID and a saved set-group-ID. */
|
||||
#define _POSIX_SAVED_IDS 1
|
||||
|
||||
/* Priority scheduling is supported. */
|
||||
#define _POSIX_PRIORITY_SCHEDULING 1
|
||||
|
||||
/* Synchronizing file data is supported. */
|
||||
#define _POSIX_SYNCHRONIZED_IO 1
|
||||
|
||||
/* The fsync function is present. */
|
||||
#define _POSIX_FSYNC 1
|
||||
|
||||
/* Mapping of files to memory is supported. */
|
||||
#define _POSIX_MAPPED_FILES 1
|
||||
|
||||
/* Locking of all memory is supported. */
|
||||
#define _POSIX_MEMLOCK 1
|
||||
|
||||
/* Locking of ranges of memory is supported. */
|
||||
#define _POSIX_MEMLOCK_RANGE 1
|
||||
|
||||
/* Setting of memory protections is supported. */
|
||||
#define _POSIX_MEMORY_PROTECTION 1
|
||||
|
||||
/* Implementation supports `poll' function. */
|
||||
#define _POSIX_POLL 1
|
||||
|
||||
/* Implementation supports `select' and `pselect' functions. */
|
||||
#define _POSIX_SELECT 1
|
||||
|
||||
/* Only root can change owner of file. */
|
||||
#define _POSIX_CHOWN_RESTRICTED 1
|
||||
|
||||
/* `c_cc' member of 'struct termios' structure can be disabled by
|
||||
using the value _POSIX_VDISABLE. */
|
||||
#define _POSIX_VDISABLE '\0'
|
||||
|
||||
/* Filenames are not silently truncated. */
|
||||
#define _POSIX_NO_TRUNC 1
|
||||
|
||||
/* X/Open realtime support is available. */
|
||||
#define _XOPEN_REALTIME 1
|
||||
|
||||
/* X/Open realtime thread support is available. */
|
||||
#define _XOPEN_REALTIME_THREADS 1
|
||||
|
||||
/* XPG4.2 shared memory is supported. */
|
||||
#define _XOPEN_SHM 1
|
||||
|
||||
/* Tell we have POSIX threads. */
|
||||
#define _POSIX_THREADS 1
|
||||
|
||||
/* We have the reentrant functions described in POSIX. */
|
||||
#define _POSIX_REENTRANT_FUNCTIONS 1
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS 1
|
||||
|
||||
/* We provide priority scheduling for threads. */
|
||||
#define _POSIX_THREAD_PRIORITY_SCHEDULING 1
|
||||
|
||||
/* We support user-defined stack sizes. */
|
||||
#define _POSIX_THREAD_ATTR_STACKSIZE 1
|
||||
|
||||
/* We support user-defined stacks. */
|
||||
#define _POSIX_THREAD_ATTR_STACKADDR 1
|
||||
|
||||
/* We support POSIX.1b semaphores, but only the non-shared form for now. */
|
||||
/*#define _POSIX_SEMAPHORES 1 XXX We are not quite there now. */
|
||||
|
||||
/* Real-time signals are supported. */
|
||||
#define _POSIX_REALTIME_SIGNALS 1
|
||||
|
||||
/* We support asynchronous I/O. */
|
||||
#define _POSIX_ASYNCHRONOUS_IO 1
|
||||
/* Alternative name for Unix98. */
|
||||
#define _LFS_ASYNCHRONOUS_IO 1
|
||||
|
||||
/* The LFS support in asynchronous I/O is also available. */
|
||||
#define _LFS64_ASYNCHRONOUS_IO 1
|
||||
|
||||
/* The rest of the LFS is also available. */
|
||||
#define _LFS_LARGEFILE 1
|
||||
#define _LFS64_LARGEFILE 1
|
||||
#define _LFS64_STDIO 1
|
||||
|
||||
/* POSIX shared memory objects are implemented. */
|
||||
#define _POSIX_SHARED_MEMORY_OBJECTS 1
|
||||
|
||||
/* CPU-time clocks supported. */
|
||||
#define _POSIX_CPUTIME 200912L
|
||||
|
||||
/* We support the clock also in threads. */
|
||||
#define _POSIX_THREAD_CPUTIME 200912L
|
||||
|
||||
/* Monotonic clock is supported. */
|
||||
#define _POSIX_MONOTONIC_CLOCK 200912L
|
||||
|
||||
/* GNU libc provides regular expression handling. */
|
||||
#define _POSIX_REGEXP 1
|
||||
|
||||
/* Reader/Writer locks are available. */
|
||||
#define _POSIX_READER_WRITER_LOCKS 200912L
|
||||
|
||||
/* We have a POSIX shell. */
|
||||
#define _POSIX_SHELL 1
|
||||
|
||||
/* We support the Timeouts option. */
|
||||
#define _POSIX_TIMEOUTS 200912L
|
||||
|
||||
#endif /* posix_opt.h */
|
129
posix/getconf.c
129
posix/getconf.c
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 92, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 1995-1999, 2000 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
|
||||
@ -592,6 +592,133 @@ static const struct conf vars[] =
|
||||
{ "XBS5_LPBIG_OFFBIG_LINTFLAGS", _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, CONFSTR },
|
||||
#endif
|
||||
|
||||
#ifdef _SC_ADVISORY_INFO
|
||||
{ "ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_BARRIERS
|
||||
{ "BARRIERS", _SC_BARRIERS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_BASE
|
||||
{ "BASE", _SC_BASE, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_C_LANG_SUPPORT
|
||||
{ "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 },
|
||||
#endif
|
||||
#ifdef _SC_CLOCK_SELECTION
|
||||
{ "CLOCK_SELECTION", _SC_CLOCK_SELECTION, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_CPUTIME
|
||||
{ "CPUTIME", _SC_CPUTIME, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_THREAD_CPUTIME
|
||||
{ "THREAD_CPUTIME", _SC_THREAD_CPUTIME, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_DEVICE_SPECIFIC
|
||||
{ "DEVICE_SPECIFIC", _SC_DEVICE_SPECIFIC, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_DEVICE_SPECIFIC_R
|
||||
{ "DEVICE_SPECIFIC_R", _SC_DEVICE_SPECIFIC_R, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_FD_MGMT
|
||||
{ "FD_MGMT", _SC_FD_MGMT, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_FIFO
|
||||
{ "FIFO", _SC_FIFO, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_PIPE
|
||||
{ "PIPE", _SC_PIPE, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_FILE_ATTRIBUTES
|
||||
{ "FILE_ATTRIBUTES", _SC_FILE_ATTRIBUTES, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_FILE_LOCKING
|
||||
{ "FILE_LOCKING", _SC_FILE_LOCKING, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_FILE_SYSTEM
|
||||
{ "FILE_SYSTEM", _SC_FILE_SYSTEM, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_MONOTONIC_CLOCK
|
||||
{ "MONOTONIC_CLOCK", _SC_MONOTONIC_CLOCK, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_MULTIPLE_PROCESS
|
||||
{ "MULTIPLE_PROCESS", _SC_MULTIPLE_PROCESS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SINGLE_PROCESS
|
||||
{ "SINGLE_PROCESS", _SC_SINGLE_PROCESS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_NETWORKING
|
||||
{ "NETWORKING", _SC_NETWORKING, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_READER_WRITER_LOCKS
|
||||
{ "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 },
|
||||
#endif
|
||||
#ifdef _SC_REXEXP
|
||||
{ "REGEXP", _SC_REXEXP, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_REXEX_VERSION
|
||||
{ "REGEX_VERSION", _SC_REXEX_VERSION, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SHELL
|
||||
{ "SHELL", _SC_SHELL, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SIGNALS
|
||||
{ "SIGNALS", _SC_SIGNALS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SPAWN
|
||||
{ "SPAWN", _SC_SPAWN, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SPORADIC_SERVER
|
||||
{ "SPORADIC_SERVER", _SC_SPORADIC_SERVER, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_THREAD_SPORADIC_SERVER
|
||||
{ "THREAD_SPORADIC_SERVER", _SC_THREAD_SPORADIC_SERVER, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SYSTEM_DATABASE
|
||||
{ "SYSTEM_DATABASE", _SC_SYSTEM_DATABASE, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SYSTEM_DATABASE_R
|
||||
{ "SYSTEM_DATABASE_R", _SC_SYSTEM_DATABASE_R, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_TIMEOUTS
|
||||
{ "TIMEOUTS", _SC_TIMEOUTS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_TYPED_MEMORY_OBJECTS
|
||||
{ "TYPED_MEMORY_OBJECTS", _SC_TYPED_MEMORY_OBJECTS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_USER_GROUPS
|
||||
{ "USER_GROUPS", _SC_USER_GROUPS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_USER_GROUPS_R
|
||||
{ "USER_GROUPS_R", _SC_USER_GROUPS_R, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_PBS
|
||||
{ "PBS", _SC_PBS, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_PBS_ACCOUNTING
|
||||
{ "PBS_ACCOUNT", _SC_PBS_ACCOUNTING, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_PBS_LOCATE
|
||||
{ "PBS_LOCATE", _SC_PBS_LOCATE, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_PBS_TRACK
|
||||
{ "PBS_TRACK", _SC_PBS_TRACK, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_PBS_MESSAGE
|
||||
{ "PBS_MESSAGE", _SC_PBS_MESSAGE, SYSCONF },
|
||||
#endif
|
||||
#ifdef _SC_SYMLOOP
|
||||
{ "SYMLOOP", _SC_SYMLOOP, SYSCONF },
|
||||
#endif
|
||||
|
||||
{ NULL, 0, SYSCONF }
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
|
||||
Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1995-1998, 2000 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
|
||||
@ -335,8 +335,93 @@ enum
|
||||
#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
|
||||
_SC_XOPEN_REALTIME,
|
||||
#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
|
||||
_SC_XOPEN_REALTIME_THREADS
|
||||
_SC_XOPEN_REALTIME_THREADS,
|
||||
#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
|
||||
|
||||
_SC_ADVISORY_INFO,
|
||||
#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
|
||||
_SC_BARRIERS,
|
||||
#define _SC_BARRIERS _SC_BARRIERS
|
||||
_SC_BASE,
|
||||
#define _SC_BASE _SC_BASE
|
||||
_SC_C_LANG_SUPPORT,
|
||||
#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
|
||||
_SC_C_LANG_SUPPORT_R,
|
||||
#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
|
||||
_SC_CLOCK_SELECTION,
|
||||
#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
|
||||
_SC_CPUTIME,
|
||||
#define _SC_CPUTIME _SC_CPUTIME
|
||||
_SC_THREAD_CPUTIME,
|
||||
#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
|
||||
_SC_DEVICE_IO,
|
||||
#define _SC_DEVICE_IO _SC_DEVICE_IO
|
||||
_SC_DEVICE_SPECIFIC,
|
||||
#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
|
||||
_SC_DEVICE_SPECIFIC_R,
|
||||
#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
|
||||
_SC_FD_MGMT,
|
||||
#define _SC_FD_MGMT _SC_FD_MGMT
|
||||
_SC_FIFO,
|
||||
#define _SC_FIFO _SC_FIFO
|
||||
_SC_PIPE,
|
||||
#define _SC_PIPE _SC_PIPE
|
||||
_SC_FILE_ATTRIBUTES,
|
||||
#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
|
||||
_SC_FILE_LOCKING,
|
||||
#define _SC_FILE_LOCKING _SC_FILE_LOCKING
|
||||
_SC_FILE_SYSTEM,
|
||||
#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_SINGLE_PROCESS,
|
||||
#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
|
||||
_SC_NETWORKING,
|
||||
#define _SC_NETWORKING _SC_NETWORKING
|
||||
_SC_READER_WRITER_LOCKS,
|
||||
#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
|
||||
_SC_SPIN_LOCKS,
|
||||
#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
|
||||
_SC_REGEXP,
|
||||
#define _SC_REGEXP _SC_REGEXP
|
||||
_SC_REGEX_VERSION,
|
||||
#define _SC_REGEX_VERSION _SC_REGEX_VERSION
|
||||
_SC_SHELL,
|
||||
#define _SC_SHELL _SC_SHELL
|
||||
_SC_SIGNALS,
|
||||
#define _SC_SIGNALS _SC_SIGNALS
|
||||
_SC_SPAWN,
|
||||
#define _SC_SPAWN _SC_SPAWN
|
||||
_SC_SPORADIC_SERVER,
|
||||
#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
|
||||
_SC_THREAD_SPORADIC_SERVER,
|
||||
#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
|
||||
_SC_SYSTEM_DATABASE,
|
||||
#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
|
||||
_SC_SYSTEM_DATABASE_R,
|
||||
#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
|
||||
_SC_TIMEOUTS,
|
||||
#define _SC_TIMEOUTS _SC_TIMEOUTS
|
||||
_SC_TYPED_MEMORY_OBJECTS,
|
||||
#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
|
||||
_SC_USER_GROUPS,
|
||||
#define _SC_USER_GROUPS _SC_USER_GROUPS
|
||||
_SC_USER_GROUPS_R,
|
||||
#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
|
||||
_SC_PBS,
|
||||
#define _SC_PBS _SC_PBS
|
||||
_SC_PBS_ACCOUNTING,
|
||||
#define _SC_PBS_ACCOUNTING _SC_PBS_ACCOUNTING
|
||||
_SC_PBS_LOCATE,
|
||||
#define _SC_PBS_LOCATE _SC_PBS_LOCATE
|
||||
_SC_PBS_MESSAGE,
|
||||
#define _SC_PBS_MESSAGE _SC_PBS_MESSAGE
|
||||
_SC_PBS_TRACK,
|
||||
#define _SC_PBS_TRACK _SC_PBS_TRACK
|
||||
_SC_SYMLOOP,
|
||||
#define _SC_SYMLOOP _SC_SYMLOOP
|
||||
};
|
||||
|
||||
#if (defined __USE_POSIX2 || defined __USE_UNIX98 \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Define POSIX options for GNU/Hurd.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2000 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
|
||||
@ -60,5 +60,11 @@
|
||||
#undef _POSIX_NO_TRUNC /* Overlong file names get error? */
|
||||
#undef _POSIX_SYNC_IO /* File supports O_SYNC et al? */
|
||||
|
||||
/* GNU libc provides regular expression handling. */
|
||||
#define _POSIX_REGEXP 1
|
||||
|
||||
/* We have a POSIX shell. */
|
||||
#define _POSIX_SHELL 1
|
||||
|
||||
|
||||
#endif /* bits/posix_opt.h */
|
||||
|
@ -817,6 +817,277 @@ __sysconf (name)
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_ADVISORY_INFO:
|
||||
#ifdef _POSIX_ADVISORY_INFO
|
||||
return _POSIX_ADVISORY_INFO;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_BARRIERS:
|
||||
#ifdef _POSIX_BARRIERS
|
||||
return _POSIX_BARRIERS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_BASE:
|
||||
#ifdef _POSIX_BASE
|
||||
return _POSIX_BASE;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_C_LANG_SUPPORT:
|
||||
#ifdef _POSIX_C_LANG_SUPPORT
|
||||
return _POSIX_C_LANG_SUPPORT;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_C_LANG_SUPPORT_R:
|
||||
#ifdef _POSIX_C_LANG_SUPPORT_R
|
||||
return _POSIX_C_LANG_SUPPORT_R;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_CLOCK_SELECTION:
|
||||
#ifdef _POSIX_CLOCK_SELECTION
|
||||
return _POSIX_CLOCK_SELECTION;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_CPUTIME:
|
||||
#ifdef _POSIX_CPUTIME
|
||||
return _POSIX_CPUTIME;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_DEVICE_IO:
|
||||
#ifdef _POSIX_DEVICE_IO
|
||||
return _POSIX_DEVICE_IO;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_DEVICE_SPECIFIC:
|
||||
#ifdef _POSIX_DEVICE_SPCIFIC
|
||||
return _POSIX_DEVICE_SPECIFIC;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_DEVICE_SPECIFIC_R:
|
||||
#ifdef _POSIX_DEVICE_SPCIFIC_R
|
||||
return _POSIX_DEVICE_SPECIFIC_R;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_FD_MGMT:
|
||||
#ifdef _POSIX_FD_MGMT
|
||||
return _POSIX_FD_MGMT;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_FIFO:
|
||||
#ifdef _POSIX_FIFO
|
||||
return _POSIX_FIFO;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_PIPE:
|
||||
#ifdef _POSIX_PIPE
|
||||
return _POSIX_PIPE;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_FILE_ATTRIBUTES:
|
||||
#ifdef _POSIX_FILE_ATTRIBUTES
|
||||
return _POSIX_FILE_ATTRIBUTES;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_FILE_LOCKING:
|
||||
#ifdef _POSIX_FILE_LOCKING
|
||||
return _POSIX_FILE_LOCKING;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_FILE_SYSTEM:
|
||||
#ifdef _POSIX_FILE_SYSTEM
|
||||
return _POSIX_FILE_SYSTEM;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_MONOTONIC_CLOCK:
|
||||
#ifdef _POSIX_MONOTONIC_CLOCK
|
||||
return _POSIX_MONOTONIC_CLOCK;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_MULTIPLE_PROCESS:
|
||||
#ifdef _POSIX_MULTIPLE_PROCESS
|
||||
return _POSIX_MULTIPLE_PROCESS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_SINGLE_PROCESS:
|
||||
#ifdef _POSIX_SINGLE_PROCESS
|
||||
return _POSIX_SINGLE_PROCESS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_NETWORKING:
|
||||
#ifdef _POSIX_NETWORKING
|
||||
return _POSIX_NETWORKING;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_READER_WRITER_LOCKS:
|
||||
#ifdef _POSIX_READER_WRITER_LOCKS
|
||||
return _POSIX_READER_WRITER_LOCKS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_SPIN_LOCKS:
|
||||
#ifdef _POSIX_SPIN_LOCKS
|
||||
return _POSIX_SPIN_LOCKS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_REGEXP:
|
||||
#ifdef _POSIX_REGEXP
|
||||
return _POSIX_REGEXP;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_REGEX_VERSION:
|
||||
#ifdef _POSIX_REGEX_VERSION
|
||||
return _POSIX_REGEX_VERSION;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_SHELL:
|
||||
#ifdef _POSIX_SHELL
|
||||
return _POSIX_SHELL;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_SIGNALS:
|
||||
#ifdef _POSUX_SIGNALS
|
||||
return _POSIX_SIGNALS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_SPAWN:
|
||||
#ifdef _POSIX_SPAWN
|
||||
return _POSIX_SPAWN;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_SPORADIC_SERVER:
|
||||
#ifdef _POSIX_SPORADIC_SERVER
|
||||
return _POSIX_SPORADIC_SERVER;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_THREAD_SPORADIC_SERVER:
|
||||
#ifdef _POSIX_THREAD_SPORADIC_SERVER
|
||||
return _POSIX_THREAD_SPORADIC_SERVER;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_SYSTEM_DATABASE:
|
||||
#ifdef _POSIX_SYSTEM_DATABASE
|
||||
return _POSIX_SYSTEM_DATABASE;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_SYSTEM_DATABASE_R:
|
||||
#ifdef _POSIX_SYSTEM_DATABASE_R
|
||||
return _POSIX_SYSTEM_DATABASE_R;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_THREAD_CPUTIME:
|
||||
#ifdef _POSIX_THREAD_CPUTIME
|
||||
return _POSIX_THREAD_CPUTIME;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_TIMEOUTS:
|
||||
#ifdef _POSIX_TIMEOUTS
|
||||
return _POSIX_TIMEOUTS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_TYPED_MEMORY_OBJECTS:
|
||||
#ifdef _POSIX_TYPED_MEMORY_OBJECTS
|
||||
return _POSIX_TYPED_MEMORY_OBJECTS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_USER_GROUPS:
|
||||
#ifdef _POSIX_USER_GROUPS
|
||||
return _POSIX_USER_GROUPS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_USER_GROUPS_R:
|
||||
#ifdef _POSIX_USER_GROUPS_R
|
||||
return _POSIX_USER_GROUPS_R;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_PBS:
|
||||
#ifdef _POSIX2_PBS
|
||||
return _POSIX2_PBS;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_PBS_ACCOUNTING:
|
||||
#ifdef _POSIX2_PBS_ACCOUNTING
|
||||
return _POSIX2_PBS_ACCOUNTING;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_PBS_LOCATE:
|
||||
#ifdef _POSIX2_PBS_LOCATE
|
||||
return _POSIX2_PBS_LOCATE;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
case _SC_PBS_TRACK:
|
||||
#ifdef _POSIX2_PBS_TRACK
|
||||
return _POSIX2_PBS_TRACK;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case _SC_SYMLOOP:
|
||||
#ifdef SYMLOOP_MAX
|
||||
return SYMLOOP_MAX;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
|
||||
return EPERM;
|
||||
|
||||
/* Store the number. */
|
||||
*clock_id = __CLOCK_HIGHRES;
|
||||
*clock_id = CLOCK_PROCESS_CPUTIME_ID;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -39,9 +39,15 @@ static long int nsec;
|
||||
/* We add an limitation here: we assume that the machine is not up as
|
||||
long as it takes to wrap-around the 64-bit timestamp counter. On a
|
||||
4GHz machine it would take 136 years of uptime to wrap around so
|
||||
this "limitation" is not severe. */
|
||||
this "limitation" is not severe.
|
||||
|
||||
We use this clock also as the monotonic clock since we don't allow
|
||||
setting the CPU-time clock. If this should ever change we will have
|
||||
to separate the two. */
|
||||
#define EXTRA_CLOCK_CASES \
|
||||
case __CLOCK_HIGHRES: \
|
||||
case CLOCK_PROCESS_CPUTIME_ID: \
|
||||
case CLOCK_THREAD_CPUTIME_ID: \
|
||||
case CLOCK_MONOTONIC: \
|
||||
{ \
|
||||
if (__builtin_expect (nsec == 0, 0)) \
|
||||
{ \
|
||||
|
@ -38,9 +38,15 @@ static unsigned long long int freq;
|
||||
/* We add an limitation here: we assume that the machine is not up as
|
||||
long as it takes to wrap-around the 64-bit timestamp counter. On a
|
||||
4GHz machine it would take 136 years of uptime to wrap around so
|
||||
this "limitation" is not severe. */
|
||||
this "limitation" is not severe.
|
||||
|
||||
We use this clock also as the monotonic clock since we don't allow
|
||||
setting the CPU-time clock. If this should ever change we will have
|
||||
to separate the two. */
|
||||
#define EXTRA_CLOCK_CASES \
|
||||
case __CLOCK_HIGHRES: \
|
||||
case CLOCK_PROCESS_CPUTIME_ID: \
|
||||
case CLOCK_THREAD_CPUTIME_ID: \
|
||||
case CLOCK_MONOTONIC: \
|
||||
{ \
|
||||
unsigned long long int tsc; \
|
||||
\
|
||||
|
@ -87,4 +87,10 @@
|
||||
/* POSIX shared memory objects are implemented. */
|
||||
#define _POSIX_SHARED_MEMORY_OBJECTS 1
|
||||
|
||||
/* GNU libc provides regular expression handling. */
|
||||
#define _POSIX_REGEXP 1
|
||||
|
||||
/* We have a POSIX shell. */
|
||||
#define _POSIX_SHELL 1
|
||||
|
||||
#endif /* bits/posix_opt.h */
|
||||
|
@ -47,12 +47,16 @@ typedef int __timer_t;
|
||||
|
||||
# ifdef __USE_POSIX199309
|
||||
/* Identifier for system-wide realtime clock. */
|
||||
# define CLOCK_REALTIME 0
|
||||
# define CLOCK_REALTIME 0
|
||||
/* Monotonic clock. */
|
||||
# define CLOCK_MONOTONIC 1
|
||||
/* High-resolution timer from the CPU. */
|
||||
# define __CLOCK_HIGHRES 1
|
||||
# define CLOCK_PROCESS_CPUTIME_ID 2
|
||||
/* Thread-specific CPU-time clock. */
|
||||
# define CLOCK_THREAD_CPUTIME_ID 3
|
||||
|
||||
/* Flag to indicate time is absolute. */
|
||||
# define TIMER_ABSTIME 1
|
||||
# define TIMER_ABSTIME 1
|
||||
# endif
|
||||
|
||||
# endif /* bits/time.h */
|
||||
|
Loading…
Reference in New Issue
Block a user