1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* misc/sys/cdefs.h: Define __restrict_arr.
	* include/sys/time.h: Add restrict where required by AGd4.
	* inet/arpa/inet.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* misc/search.h: Likewise.
	* misc/sys/select.h: Likewise.
	* posix/glob.h: Likewise.
	* posix/regex.h: Likewise.
	* posix/spawn.h: Likewise.
	* posix/unistd.h: Likewise.
	* rt/aio.h: Likewise.
	* signal/signal.h: Likewise.
	* socket/sys/socket.h: Likewise.
	* stdlib/ucontext.h: Likewise.
	* streams/stropts.h: Likewise.
	* string/string.h: Likewise.
	* time/time.h: Likewise.
	* time/sys/time.h: Likewise.

	* posix/spawn.h: Add declarations for posix_spawnattr_getscheparam
	and posix_spawnattr_setscheparam.

	* libio/stdio.h: Make cuserid prototype again available for all
	XPG versions.
This commit is contained in:
Ulrich Drepper
2000-08-21 06:49:52 +00:00
parent 4aebaa6bd9
commit 98cbe360d9
25 changed files with 287 additions and 166 deletions

View File

@ -1,5 +1,31 @@
2000-08-20 Ulrich Drepper <drepper@redhat.com> 2000-08-20 Ulrich Drepper <drepper@redhat.com>
* misc/sys/cdefs.h: Define __restrict_arr.
* include/sys/time.h: Add restrict where required by AGd4.
* inet/arpa/inet.h: Likewise.
* io/sys/stat.h: Likewise.
* io/sys/statvfs.h: Likewise.
* misc/search.h: Likewise.
* misc/sys/select.h: Likewise.
* posix/glob.h: Likewise.
* posix/regex.h: Likewise.
* posix/spawn.h: Likewise.
* posix/unistd.h: Likewise.
* rt/aio.h: Likewise.
* signal/signal.h: Likewise.
* socket/sys/socket.h: Likewise.
* stdlib/ucontext.h: Likewise.
* streams/stropts.h: Likewise.
* string/string.h: Likewise.
* time/time.h: Likewise.
* time/sys/time.h: Likewise.
* posix/spawn.h: Add declarations for posix_spawnattr_getscheparam
and posix_spawnattr_setscheparam.
* libio/stdio.h: Make cuserid prototype again available for all
XPG versions.
* argp/argp-help.c: Unify use of function aliases to make more compact * argp/argp-help.c: Unify use of function aliases to make more compact
PLT. PLT.
* include/libintl.h: Likewise. * include/libintl.h: Likewise.

View File

@ -11,7 +11,7 @@ extern int __adjtime (__const struct timeval *__delta,
extern int __getitimer (enum __itimer_which __which, extern int __getitimer (enum __itimer_which __which,
struct itimerval *__value); struct itimerval *__value);
extern int __setitimer (enum __itimer_which __which, extern int __setitimer (enum __itimer_which __which,
__const struct itimerval *__new, __const struct itimerval *__restrict __new,
struct itimerval *__old); struct itimerval *__restrict __old);
extern int __utimes (__const char *__file, const struct timeval __tvp[2]); extern int __utimes (__const char *__file, const struct timeval __tvp[2]);
#endif #endif

View File

@ -51,13 +51,15 @@ extern char *inet_ntoa (struct in_addr __in) __THROW;
/* Convert from presentation format of an Internet number in buffer /* Convert from presentation format of an Internet number in buffer
starting at CP to the binary network format and store result for starting at CP to the binary network format and store result for
interface type AF in buffer starting at BUF. */ interface type AF in buffer starting at BUF. */
extern int inet_pton (int __af, __const char *__cp, void *__buf) __THROW; extern int inet_pton (int __af, __const char *__restrict __cp,
void *__restrict __buf) __THROW;
/* Convert a Internet address in binary network format for interface /* Convert a Internet address in binary network format for interface
type AF in buffer starting at CP to presentation form and place type AF in buffer starting at CP to presentation form and place
result in buffer of length LEN astarting at BUF. */ result in buffer of length LEN astarting at BUF. */
extern __const char *inet_ntop (int __af, __const void *__cp, extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
char *__buf, socklen_t __len) __THROW; char *__restrict __buf, socklen_t __len)
__THROW;
/* The following functions are not part of XNS 5.2. */ /* The following functions are not part of XNS 5.2. */

View File

@ -196,7 +196,8 @@ __BEGIN_DECLS
#ifndef __USE_FILE_OFFSET64 #ifndef __USE_FILE_OFFSET64
/* Get file attributes for FILE and put them in BUF. */ /* Get file attributes for FILE and put them in BUF. */
extern int stat (__const char *__file, struct stat *__buf) __THROW; extern int stat (__const char *__restrict __file,
struct stat *__restrict __buf) __THROW;
/* Get file attributes for the file, device, pipe, or socket /* Get file attributes for the file, device, pipe, or socket
that file descriptor FD is open on and put them in BUF. */ that file descriptor FD is open on and put them in BUF. */
@ -204,7 +205,8 @@ extern int fstat (int __fd, struct stat *__buf) __THROW;
#else #else
# ifdef __REDIRECT # ifdef __REDIRECT
extern int __REDIRECT (stat, extern int __REDIRECT (stat,
(__const char *__file, struct stat *__buf) __THROW, (__const char *__restrict __file,
struct stat *__restrict __buf) __THROW,
stat64); stat64);
extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64); extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64);
# else # else
@ -213,7 +215,8 @@ extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64);
# endif # endif
#endif #endif
#ifdef __USE_LARGEFILE64 #ifdef __USE_LARGEFILE64
extern int stat64 (__const char *__file, struct stat64 *__buf) __THROW; extern int stat64 (__const char *__restrict __file,
struct stat64 *__restrict __buf) __THROW;
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW; extern int fstat64 (int __fd, struct stat64 *__buf) __THROW;
#endif #endif
@ -221,18 +224,21 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW;
# ifndef __USE_FILE_OFFSET64 # ifndef __USE_FILE_OFFSET64
/* Get file attributes about FILE and put them in BUF. /* Get file attributes about FILE and put them in BUF.
If FILE is a symbolic link, do not follow it. */ If FILE is a symbolic link, do not follow it. */
extern int lstat (__const char *__file, struct stat *__buf) __THROW; extern int lstat (__const char *__restrict __file,
struct stat *__restrict __buf) __THROW;
# else # else
# ifdef __REDIRECT # ifdef __REDIRECT
extern int __REDIRECT (lstat, extern int __REDIRECT (lstat,
(__const char *__file, struct stat *__buf) __THROW, (__const char *__restrict __file,
struct stat *__restrict __buf) __THROW,
lstat64); lstat64);
# else # else
# define lstat lstat64 # define lstat lstat64
# endif # endif
# endif # endif
# ifdef __USE_LARGEFILE64 # ifdef __USE_LARGEFILE64
extern int lstat64 (__const char *__file, struct stat64 *__buf) __THROW; extern int lstat64 (__const char *__restrict __file,
struct stat64 *__restrict __buf) __THROW;
# endif # endif
#endif #endif

View File

@ -49,18 +49,21 @@ __BEGIN_DECLS
/* Return information about the filesystem on which FILE resides. */ /* Return information about the filesystem on which FILE resides. */
#ifndef __USE_FILE_OFFSET64 #ifndef __USE_FILE_OFFSET64
extern int statvfs (__const char *__file, struct statvfs *__buf) __THROW; extern int statvfs (__const char *__restrict __file,
struct statvfs *__restrict __buf) __THROW;
#else #else
# ifdef __REDIRECT # ifdef __REDIRECT
extern int __REDIRECT (statvfs, extern int __REDIRECT (statvfs,
(__const char *__file, struct statvfs *__buf) __THROW, (__const char *__restrict __file,
struct statvfs *__restrict __buf) __THROW,
statvfs64); statvfs64);
# else # else
# define statvfs statvfs64 # define statvfs statvfs64
# endif # endif
#endif #endif
#ifdef __USE_LARGEFILE64 #ifdef __USE_LARGEFILE64
extern int statvfs64 (__const char *__file, struct statvfs64 *__buf) __THROW; extern int statvfs64 (__const char *__restrict __file,
struct statvfs64 *__restrict __buf) __THROW;
#endif #endif
/* Return information about the filesystem containing the file FILDES /* Return information about the filesystem containing the file FILDES

View File

@ -581,7 +581,7 @@ extern char *ctermid (char *__s) __THROW;
#endif /* Use POSIX. */ #endif /* Use POSIX. */
#if defined __USE_XOPEN && !defined __USE_XOPEN2K #ifdef __USE_XOPEN
/* Return the name of the current user. */ /* Return the name of the current user. */
extern char *cuserid (char *__s) __THROW; extern char *cuserid (char *__s) __THROW;
#endif /* Use X/Open, but not issue 6. */ #endif /* Use X/Open, but not issue 6. */

View File

@ -1,3 +1,9 @@
2000-08-20 Ulrich Drepper <drepper@redhat.com>
* semaphore.h: Add restrict where required by AGd4.
* sysdeps/pthread/pthread.h: Likewise.
* sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2000-08-15 Ulrich Drepper <drepper@redhat.com> 2000-08-15 Ulrich Drepper <drepper@redhat.com>
* Makefile (tests): Add ex12. Add rule to build it. * Makefile (tests): Add ex12. Add rule to build it.

View File

@ -72,7 +72,8 @@ extern int sem_wait (sem_t *__sem) __THROW;
#ifdef __USE_XOPEN2K #ifdef __USE_XOPEN2K
/* Similar to `sem_wait' but wait only until ABSTIME. */ /* Similar to `sem_wait' but wait only until ABSTIME. */
extern int sem_timedwait (sem_t *__sem, __const struct timespec *__abstime) extern int sem_timedwait (sem_t *__restrict __sem,
__const struct timespec *__restrict __abstime)
__THROW; __THROW;
#endif #endif
@ -83,7 +84,8 @@ extern int sem_trywait (sem_t *__sem) __THROW;
extern int sem_post (sem_t *__sem) __THROW; extern int sem_post (sem_t *__sem) __THROW;
/* Get current value of SEM and store it in *SVAL. */ /* Get current value of SEM and store it in *SVAL. */
extern int sem_getvalue (sem_t *__sem, int *__sval) __THROW; extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
__THROW;
__END_DECLS __END_DECLS

View File

@ -155,10 +155,10 @@ enum
/* Create a thread with given attributes ATTR (or default attributes /* Create a thread with given attributes ATTR (or default attributes
if ATTR is NULL), and call function START_ROUTINE with given if ATTR is NULL), and call function START_ROUTINE with given
arguments ARG. */ arguments ARG. */
extern int pthread_create (pthread_t *__thread, extern int pthread_create (pthread_t *__restrict __thread,
__const pthread_attr_t *__attr, __const pthread_attr_t *__restrict __attr,
void *(*__start_routine) (void *), void *(*__start_routine) (void *),
void *__arg) __THROW; void *__restrict __arg) __THROW;
/* Obtain the identifier of the current thread. */ /* Obtain the identifier of the current thread. */
extern pthread_t pthread_self (void) __THROW; extern pthread_t pthread_self (void) __THROW;
@ -201,37 +201,41 @@ extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
int *__detachstate) __THROW; int *__detachstate) __THROW;
/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
extern int pthread_attr_setschedparam (pthread_attr_t *__attr, extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
__const struct sched_param *__param) __const struct sched_param *__restrict
__THROW; __param) __THROW;
/* Return in *PARAM the scheduling parameters of *ATTR. */ /* Return in *PARAM the scheduling parameters of *ATTR. */
extern int pthread_attr_getschedparam (__const pthread_attr_t *__attr, extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
struct sched_param *__param) __THROW; __attr,
struct sched_param *__restrict __param)
__THROW;
/* Set scheduling policy in *ATTR according to POLICY. */ /* Set scheduling policy in *ATTR according to POLICY. */
extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
__THROW; __THROW;
/* Return in *POLICY the scheduling policy of *ATTR. */ /* Return in *POLICY the scheduling policy of *ATTR. */
extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__attr, extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
int *__policy) __THROW; __attr, int *__restrict __policy)
__THROW;
/* Set scheduling inheritance mode in *ATTR according to INHERIT. */ /* Set scheduling inheritance mode in *ATTR according to INHERIT. */
extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
int __inherit) __THROW; int __inherit) __THROW;
/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
extern int pthread_attr_getinheritsched (__const pthread_attr_t *__attr, extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
int *__inherit) __THROW; __attr, int *__restrict __inherit)
__THROW;
/* Set scheduling contention scope in *ATTR according to SCOPE. */ /* Set scheduling contention scope in *ATTR according to SCOPE. */
extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
__THROW; __THROW;
/* Return in *SCOPE the scheduling contention scope of *ATTR. */ /* Return in *SCOPE the scheduling contention scope of *ATTR. */
extern int pthread_attr_getscope (__const pthread_attr_t *__attr, extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
int *__scope) __THROW; int *__restrict __scope) __THROW;
#ifdef __USE_UNIX98 #ifdef __USE_UNIX98
/* Set the size of the guard area at the bottom of the thread. */ /* Set the size of the guard area at the bottom of the thread. */
@ -239,8 +243,9 @@ extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
size_t __guardsize) __THROW; size_t __guardsize) __THROW;
/* Get the size of the guard area at the bottom of the thread. */ /* Get the size of the guard area at the bottom of the thread. */
extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
size_t *__guardsize) __THROW; __attr, size_t *__restrict __guardsize)
__THROW;
#endif #endif
/* Set the starting address of the stack of the thread to be created. /* Set the starting address of the stack of the thread to be created.
@ -251,8 +256,9 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
void *__stackaddr) __THROW; void *__stackaddr) __THROW;
/* Return the previously set address for the stack. */ /* Return the previously set address for the stack. */
extern int pthread_attr_getstackaddr (__const pthread_attr_t *__attr, extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
void **__stackaddr) __THROW; __attr, void **__restrict __stackaddr)
__THROW;
/* Add information about the minimum stack size needed for the thread /* Add information about the minimum stack size needed for the thread
to be started. This size must never be less than PTHREAD_STACK_SIZE to be started. This size must never be less than PTHREAD_STACK_SIZE
@ -261,8 +267,9 @@ extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
size_t __stacksize) __THROW; size_t __stacksize) __THROW;
/* Return the currently used minimal stack size. */ /* Return the currently used minimal stack size. */
extern int pthread_attr_getstacksize (__const pthread_attr_t *__attr, extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
size_t *__stacksize) __THROW; __attr, size_t *__restrict __stacksize)
__THROW;
/* Functions for scheduling control. */ /* Functions for scheduling control. */
@ -273,8 +280,10 @@ extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
__THROW; __THROW;
/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
extern int pthread_getschedparam (pthread_t __target_thread, int *__policy, extern int pthread_getschedparam (pthread_t __target_thread,
struct sched_param *__param) __THROW; int *__restrict __policy,
struct sched_param *__restrict __param)
__THROW;
#ifdef __USE_UNIX98 #ifdef __USE_UNIX98
/* Determine level of concurrency. */ /* Determine level of concurrency. */
@ -296,9 +305,9 @@ extern int pthread_yield (void) __THROW;
/* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
default values if later is NULL. */ default values if later is NULL. */
extern int pthread_mutex_init (pthread_mutex_t *__mutex, extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
__const pthread_mutexattr_t *__mutex_attr) __const pthread_mutexattr_t *__restrict
__THROW; __mutex_attr) __THROW;
/* Destroy MUTEX. */ /* Destroy MUTEX. */
extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW; extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW;
@ -311,9 +320,9 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW;
#ifdef __USE_XOPEN2K #ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */ /* Wait until lock becomes available, or specified time passes. */
extern int pthread_mutex_timedlock (pthread_mutex_t *__mutex, extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
__const struct timespec *__abstime) __const struct timespec *__restrict
__THROW; __abstime) __THROW;
#endif #endif
/* Unlock MUTEX. */ /* Unlock MUTEX. */
@ -330,8 +339,9 @@ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW;
extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW; extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
/* Get the process-shared flag of the mutex attribute ATTR. */ /* Get the process-shared flag of the mutex attribute ATTR. */
extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *__attr, extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
int *__pshared) __THROW; __restrict __attr,
int *__restrict __pshared) __THROW;
/* Set the process-shared flag of the mutex attribute ATTR. */ /* Set the process-shared flag of the mutex attribute ATTR. */
extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
@ -345,8 +355,8 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
__THROW; __THROW;
/* Return in *KIND the mutex kind attribute in *ATTR. */ /* Return in *KIND the mutex kind attribute in *ATTR. */
extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__attr, extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
int *__kind) __THROW; __attr, int *__restrict __kind) __THROW;
#endif #endif
@ -354,8 +364,9 @@ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__attr,
/* Initialize condition variable COND using attributes ATTR, or use /* Initialize condition variable COND using attributes ATTR, or use
the default values if later is NULL. */ the default values if later is NULL. */
extern int pthread_cond_init (pthread_cond_t *__cond, extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
__const pthread_condattr_t *__cond_attr) __THROW; __const pthread_condattr_t *__restrict
__cond_attr) __THROW;
/* Destroy condition variable COND. */ /* Destroy condition variable COND. */
extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW; extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW;
@ -368,16 +379,17 @@ extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW;
/* Wait for condition variable COND to be signaled or broadcast. /* Wait for condition variable COND to be signaled or broadcast.
MUTEX is assumed to be locked before. */ MUTEX is assumed to be locked before. */
extern int pthread_cond_wait (pthread_cond_t *__cond, extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__mutex) __THROW; pthread_mutex_t *__restrict __mutex) __THROW;
/* Wait for condition variable COND to be signaled or broadcast until /* Wait for condition variable COND to be signaled or broadcast until
ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an
absolute time specification; zero is the beginning of the epoch absolute time specification; zero is the beginning of the epoch
(00:00:00 GMT, January 1, 1970). */ (00:00:00 GMT, January 1, 1970). */
extern int pthread_cond_timedwait (pthread_cond_t *__cond, extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__mutex, pthread_mutex_t *__restrict __mutex,
__const struct timespec *__abstime) __THROW; __const struct timespec *__restrict
__abstime) __THROW;
/* Functions for handling condition variable attributes. */ /* Functions for handling condition variable attributes. */
@ -388,8 +400,9 @@ extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW;
extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW; extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
/* Get the process-shared flag of the condition variable attribute ATTR. */ /* Get the process-shared flag of the condition variable attribute ATTR. */
extern int pthread_condattr_getpshared (__const pthread_condattr_t *__attr, extern int pthread_condattr_getpshared (__const pthread_condattr_t *
int *__pshared) __THROW; __restrict __attr,
int *__restrict __pshared) __THROW;
/* Set the process-shared flag of the condition variable attribute ATTR. */ /* Set the process-shared flag of the condition variable attribute ATTR. */
extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
@ -401,8 +414,9 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
/* Initialize read-write lock RWLOCK using attributes ATTR, or use /* Initialize read-write lock RWLOCK using attributes ATTR, or use
the default values if later is NULL. */ the default values if later is NULL. */
extern int pthread_rwlock_init (pthread_rwlock_t *__rwlock, extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
__const pthread_rwlockattr_t *__attr) __THROW; __const pthread_rwlockattr_t *__restrict
__attr) __THROW;
/* Destroy read-write lock RWLOCK. */ /* Destroy read-write lock RWLOCK. */
extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW; extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW;
@ -415,9 +429,9 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW;
#ifdef __USE_XOPEN2K #ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */ /* Try to acquire read lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__rwlock, extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__abstime) __const struct timespec *__restrict
__THROW; __abstime) __THROW;
#endif #endif
/* Acquire write lock for RWLOCK. */ /* Acquire write lock for RWLOCK. */
@ -428,9 +442,9 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW;
#ifdef __USE_XOPEN2K #ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */ /* Try to acquire write lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__rwlock, extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__abstime) __const struct timespec *__restrict
__THROW; __abstime) __THROW;
#endif #endif
/* Unlock RWLOCK. */ /* Unlock RWLOCK. */
@ -446,8 +460,9 @@ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW;
extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW; extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
/* Return current setting of process-shared attribute of ATTR in PSHARED. */ /* Return current setting of process-shared attribute of ATTR in PSHARED. */
extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *__attr, extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
int *__pshared) __THROW; __restrict __attr,
int *__restrict __pshared) __THROW;
/* Set process-shared attribute of ATTR to PSHARED. */ /* Set process-shared attribute of ATTR to PSHARED. */
extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
@ -486,9 +501,9 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW;
/* Barriers are a also a new feature in 1003.1j-2000. */ /* Barriers are a also a new feature in 1003.1j-2000. */
extern int pthread_barrier_init (pthread_barrier_t *__barrier, extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
__const pthread_barrierattr_t *__attr, __const pthread_barrierattr_t *__restrict
unsigned int __count) __THROW; __attr, unsigned int __count) __THROW;
extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW; extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
@ -496,8 +511,9 @@ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW;
extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW; extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *__attr, extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
int *__pshared) __THROW; __restrict __attr,
int *__restrict __pshared) __THROW;
extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
int __pshared) __THROW; int __pshared) __THROW;

View File

@ -1,5 +1,5 @@
/* Signal handling function for threaded programs. /* Signal handling function for threaded programs.
Copyright (C) 1998, 1999 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -28,8 +28,9 @@
/* Modify the signal mask for the calling thread. The arguments have /* Modify the signal mask for the calling thread. The arguments have
the same meaning as for sigprocmask(2). */ the same meaning as for sigprocmask(2). */
extern int pthread_sigmask (int __how, __const __sigset_t *__newmask, extern int pthread_sigmask (int __how,
__sigset_t *__oldmask)__THROW; __const __sigset_t *__restrict __newmask,
__sigset_t *__restrict __oldmask)__THROW;
/* Send signal SIGNO to the given thread. */ /* Send signal SIGNO to the given thread. */
extern int pthread_kill (pthread_t __thread, int __signo) __THROW; extern int pthread_kill (pthread_t __thread, int __signo) __THROW;

View File

@ -136,7 +136,8 @@ extern void *tfind (__const void *__key, void *__const *__rootp,
__compar_fn_t __compar); __compar_fn_t __compar);
/* Remove the element matching KEY from the tree pointed to by *ROOTP. */ /* Remove the element matching KEY from the tree pointed to by *ROOTP. */
extern void *tdelete (__const void *__key, void **__rootp, extern void *tdelete (__const void *__restrict __key,
void **__restrict __rootp,
__compar_fn_t __compar); __compar_fn_t __compar);
#ifndef __ACTION_FN_T #ifndef __ACTION_FN_T

View File

@ -163,4 +163,10 @@
# define __restrict /* Ignore */ # define __restrict /* Ignore */
#endif #endif
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
array_name[restrict]
But gcc so far does not support this syntax. We define a separate macro
for this which can be enabled if the underlying compiler supports it. */
#define __restrict_arr
#endif /* sys/cdefs.h */ #endif /* sys/cdefs.h */

View File

@ -1,5 +1,5 @@
/* `fd_set' type and related macros, and `select'/`pselect' declarations. /* `fd_set' type and related macros, and `select'/`pselect' declarations.
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -71,12 +71,14 @@ typedef __fd_set fd_set;
(if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out
after waiting the interval specified therein. Returns the number of ready after waiting the interval specified therein. Returns the number of ready
descriptors, or -1 for errors. */ descriptors, or -1 for errors. */
extern int __select (int __nfds, __fd_set *__readfds, extern int __select (int __nfds, __fd_set *__restrict __readfds,
__fd_set *__writefds, __fd_set *__exceptfds, __fd_set *__restrict __writefds,
struct timeval *__timeout) __THROW; __fd_set *__restrict __exceptfds,
extern int select (int __nfds, __fd_set *__readfds, struct timeval *__restrict __timeout) __THROW;
__fd_set *__writefds, __fd_set *__exceptfds, extern int select (int __nfds, __fd_set *__restrict __readfds,
struct timeval *__timeout) __THROW; __fd_set *__restrict __writefds,
__fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout) __THROW;
#ifdef __USE_GNU #ifdef __USE_GNU
/* XXX Once/if POSIX.1g gets official this prototype will be available /* XXX Once/if POSIX.1g gets official this prototype will be available
@ -84,9 +86,11 @@ extern int select (int __nfds, __fd_set *__readfds,
/* Same as above only that the TIMEOUT value is given with higher /* Same as above only that the TIMEOUT value is given with higher
resolution and a sigmask which is been set temporarily. This version resolution and a sigmask which is been set temporarily. This version
should be used. */ should be used. */
extern int pselect (int __nfds, __fd_set *__readfds, __fd_set *__writefds, extern int pselect (int __nfds, __fd_set *__restrict __readfds,
__fd_set *__exceptfds, const struct timespec *__timeout, __fd_set *__restrict __writefds,
const __sigset_t *__sigmask) __THROW; __fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask) __THROW;
#endif #endif
__END_DECLS __END_DECLS

View File

@ -120,8 +120,9 @@ typedef struct
void (*gl_closedir) __PMT ((void *)); void (*gl_closedir) __PMT ((void *));
struct dirent *(*gl_readdir) __PMT ((void *)); struct dirent *(*gl_readdir) __PMT ((void *));
__ptr_t (*gl_opendir) __PMT ((__const char *)); __ptr_t (*gl_opendir) __PMT ((__const char *));
int (*gl_lstat) __PMT ((__const char *, struct stat *)); int (*gl_lstat) __PMT ((__const char *__restrict,
int (*gl_stat) __PMT ((__const char *, struct stat *)); struct stat *__restrict));
int (*gl_stat) __PMT ((__const char *__restrict, struct stat *__restrict));
} glob_t; } glob_t;
#ifdef _LARGEFILE64_SOURCE #ifdef _LARGEFILE64_SOURCE
@ -138,8 +139,10 @@ typedef struct
void (*gl_closedir) __PMT ((void *)); void (*gl_closedir) __PMT ((void *));
struct dirent64 *(*gl_readdir) __PMT ((void *)); struct dirent64 *(*gl_readdir) __PMT ((void *));
__ptr_t (*gl_opendir) __PMT ((__const char *)); __ptr_t (*gl_opendir) __PMT ((__const char *));
int (*gl_lstat) __PMT ((__const char *, struct stat64 *)); int (*gl_lstat) __PMT ((__const char *__restrict,
int (*gl_stat) __PMT ((__const char *, struct stat64 *)); struct stat64 *__restrict));
int (*gl_stat) __PMT ((__const char *__restrict,
struct stat64 *__restrict));
} glob64_t; } glob64_t;
#endif #endif
@ -157,24 +160,24 @@ typedef struct
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
Otherwise, `glob' returns zero. */ Otherwise, `glob' returns zero. */
#if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2 #if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2
extern int glob __P ((__const char *__pattern, int __flags, extern int glob __P ((__const char *__restrict __pattern, int __flags,
int (*__errfunc) (__const char *, int), int (*__errfunc) (__const char *, int),
glob_t *__pglob)); glob_t *__restrict __pglob));
/* Free storage allocated in PGLOB by a previous `glob' call. */ /* Free storage allocated in PGLOB by a previous `glob' call. */
extern void globfree __P ((glob_t *__pglob)); extern void globfree __P ((glob_t *__pglob));
#else #else
extern int glob __P ((__const char *__pattern, int __flags, extern int glob __P ((__const char *__restrict __pattern, int __flags,
int (*__errfunc) (__const char *, int), int (*__errfunc) (__const char *, int),
glob_t *__pglob)) __asm__ ("glob64"); glob_t *__restrict __pglob)) __asm__ ("glob64");
extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64"); extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64");
#endif #endif
#ifdef _LARGEFILE64_SOURCE #ifdef _LARGEFILE64_SOURCE
extern int glob64 __P ((__const char *__pattern, int __flags, extern int glob64 __P ((__const char *__restrict __pattern, int __flags,
int (*__errfunc) (__const char *, int), int (*__errfunc) (__const char *, int),
glob64_t *__pglob)); glob64_t *__restrict __pglob));
extern void globfree64 __P ((glob64_t *__pglob)); extern void globfree64 __P ((glob64_t *__pglob));
#endif #endif

View File

@ -514,12 +514,14 @@ extern int re_exec _RE_ARGS ((const char *));
#endif #endif
/* POSIX compatibility. */ /* POSIX compatibility. */
extern int regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern, extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
const char *__restrict __pattern,
int __cflags)); int __cflags));
extern int regexec _RE_ARGS ((const regex_t *__preg, extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
const char *__string, size_t __nmatch, const char *__restrict __string, size_t __nmatch,
regmatch_t __pmatch[], int __eflags)); regmatch_t __pmatch[__restrict_arr],
int __eflags));
extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg, extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
char *__errbuf, size_t __errbuf_size)); char *__errbuf, size_t __errbuf_size));

View File

@ -63,10 +63,13 @@ __BEGIN_DECLS
/* Spawn a new process executing PATH with the attributes describes in *ATTRP. /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
Before running the process perform the actions described in FILE-ACTIONS. */ Before running the process perform the actions described in FILE-ACTIONS. */
extern int posix_spawn (pid_t *__pid, __const char *__path, extern int posix_spawn (pid_t *__restrict __pid,
__const posix_spawn_file_actions_t *__file_actions, __const char *__restrict __path,
__const posix_spawnattr_t *__attrp, __const posix_spawn_file_actions_t *__restrict
char *__const argv[], char *__const envp[]) __THROW; __file_actions,
__const posix_spawnattr_t *__restrict __attrp,
char *__const argv[__restrict_arr],
char *__const envp[__restrict_arr]) __THROW;
/* Similar to `posix_spawn' but search for FILE in the PATH. */ /* Similar to `posix_spawn' but search for FILE in the PATH. */
extern int posix_spawnp (pid_t *__pid, __const char *__file, extern int posix_spawnp (pid_t *__pid, __const char *__file,
@ -83,46 +86,66 @@ extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) __THROW;
/* Store signal mask for signals with default handling from ATTR in /* Store signal mask for signals with default handling from ATTR in
SIGDEFAULT. */ SIGDEFAULT. */
extern int posix_spawnattr_getsigdefault (__const posix_spawnattr_t *__attr, extern int posix_spawnattr_getsigdefault (__const posix_spawnattr_t *
sigset_t *__sigdefault) __THROW; __restrict __attr,
sigset_t *__restrict __sigdefault)
__THROW;
/* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */ /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */
extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__attr, extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr,
__const sigset_t *__sigdefault) __const sigset_t *__restrict
__sigdefault)
__THROW; __THROW;
/* Store signal mask for the new process from ATTR in SIGMASK. */ /* Store signal mask for the new process from ATTR in SIGMASK. */
extern int posix_spawnattr_getsigmask (__const posix_spawnattr_t *__attr, extern int posix_spawnattr_getsigmask (__const posix_spawnattr_t *__restrict
sigset_t *__sigmask) __THROW; __attr,
sigset_t *__restrict __sigmask) __THROW;
/* Set signal mask for the new process in ATTR to SIGMASK. */ /* Set signal mask for the new process in ATTR to SIGMASK. */
extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__attr, extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr,
__const sigset_t *__sigmask) __THROW; __const sigset_t *__restrict __sigmask)
__THROW;
/* Get flag word from the attribute structure. */ /* Get flag word from the attribute structure. */
extern int posix_spawnattr_getflags (__const posix_spawnattr_t *__attr, extern int posix_spawnattr_getflags (__const posix_spawnattr_t *__restrict
short int *__flags) __THROW; __attr,
short int *__restrict __flags) __THROW;
/* Store flags in the attribute structure. */ /* Store flags in the attribute structure. */
extern int posix_spawnattr_setflags (posix_spawnattr_t *_attr, extern int posix_spawnattr_setflags (posix_spawnattr_t *_attr,
short int __flags) __THROW; short int __flags) __THROW;
/* Get process group ID from the attribute structure. */ /* Get process group ID from the attribute structure. */
extern int posix_spawnattr_getpgroup (__const posix_spawnattr_t *__attr, extern int posix_spawnattr_getpgroup (__const posix_spawnattr_t *__restrict
pid_t *__pgroup) __THROW; __attr, pid_t *__restrict __pgroup)
__THROW;
/* Store process group ID in the attribute structure. */ /* Store process group ID in the attribute structure. */
extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr, extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr,
pid_t __pgroup) __THROW; pid_t __pgroup) __THROW;
/* Get scheduling policy from the attribute structure. */ /* Get scheduling policy from the attribute structure. */
extern int posix_spawnattr_getschedpolicy (__const posix_spawnattr_t *__attr, extern int posix_spawnattr_getschedpolicy (__const posix_spawnattr_t *
int *__schedpolicy) __THROW; __restrict __attr,
int *__restrict __schedpolicy)
__THROW;
/* Store scheduling policy in the attribute structure. */ /* Store scheduling policy in the attribute structure. */
extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr, extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr,
int __schedpolicy) __THROW; int __schedpolicy) __THROW;
/* Get scheduling parameters from the attribute structure. */
extern int posix_spawnattr_getschedparam (__const posix_spawnattr_t *
__restrict __attr,
struct sched_param *__restrict
__schedparam) __THROW;
/* Store scheduling parameters in the attribute structure. */
extern int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr,
const struct sched_param *
__restrict __schedparam) __THROW;
/* Initialize data structure for file attribute for `spawn' call. */ /* Initialize data structure for file attribute for `spawn' call. */
extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t * extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *
@ -135,8 +158,9 @@ extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *
/* Add an action to FILE-ACTIONS which tells the implementation to call /* Add an action to FILE-ACTIONS which tells the implementation to call
`open' for the given file during the `spawn' call. */ `open' for the given file during the `spawn' call. */
extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t * extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *
__file_actions, __restrict __file_actions,
int __fd, __const char *__path, int __fd,
__const char *__restrict __path,
int __oflag, mode_t __mode) int __oflag, mode_t __mode)
__THROW; __THROW;

View File

@ -696,7 +696,8 @@ extern int symlink (__const char *__from, __const char *__to) __THROW;
/* Read the contents of the symbolic link PATH into no more than /* Read the contents of the symbolic link PATH into no more than
LEN bytes of BUF. The contents are not null-terminated. LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */ Returns the number of characters read, or -1 for errors. */
extern int readlink (__const char *__path, char *__buf, size_t __len) __THROW; extern int readlink (__const char *__restrict __path, char *__restrict __buf,
size_t __len) __THROW;
#endif /* Use BSD. */ #endif /* Use BSD. */
/* Remove the link NAME. */ /* Remove the link NAME. */
@ -961,7 +962,8 @@ extern void encrypt (char *__block, int __edflag) __THROW;
FROM and copy the result to TO. The value of TO must not be in the FROM and copy the result to TO. The value of TO must not be in the
range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
is without partner. */ is without partner. */
extern void swab (__const void *__from, void *__to, ssize_t __n) __THROW; extern void swab (__const void *__restrict __from, void *__restrict __to,
ssize_t __n) __THROW;
#endif #endif

View File

@ -147,7 +147,8 @@ extern int aio_read (struct aiocb *__aiocbp) __THROW;
extern int aio_write (struct aiocb *__aiocbp) __THROW; extern int aio_write (struct aiocb *__aiocbp) __THROW;
/* Initiate list of I/O requests. */ /* Initiate list of I/O requests. */
extern int lio_listio (int __mode, struct aiocb *__const __list[], extern int lio_listio (int __mode,
struct aiocb *__const __list[__restrict_arr],
int __nent, struct sigevent *__restrict __sig) __THROW; int __nent, struct sigevent *__restrict __sig) __THROW;
/* Retrieve error status associated with AIOCBP. */ /* Retrieve error status associated with AIOCBP. */
@ -174,7 +175,8 @@ extern int __REDIRECT (aio_write, (struct aiocb *__aiocbp) __THROW,
aio_write64); aio_write64);
extern int __REDIRECT (lio_listio, extern int __REDIRECT (lio_listio,
(int __mode, struct aiocb *__const __list[], (int __mode,
struct aiocb *__const __list[__restrict_arr],
int __nent, struct sigevent *__restrict __sig) __THROW, int __nent, struct sigevent *__restrict __sig) __THROW,
lio_listio64); lio_listio64);
@ -213,7 +215,8 @@ extern int __REDIRECT (aio_fsync,
extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW; extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW;
extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW; extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW;
extern int lio_listio64 (int __mode, struct aiocb64 *__const __list[], extern int lio_listio64 (int __mode,
struct aiocb64 *__const __list[__restrict_arr],
int __nent, struct sigevent *__restrict __sig) int __nent, struct sigevent *__restrict __sig)
__THROW; __THROW;

View File

@ -232,34 +232,38 @@ extern int sigorset (sigset_t *__set, __const sigset_t *__left,
# include <bits/sigaction.h> # include <bits/sigaction.h>
/* Get and/or change the set of blocked signals. */ /* Get and/or change the set of blocked signals. */
extern int sigprocmask (int __how, __const sigset_t *__set, sigset_t *__oset) extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
__THROW; sigset_t *__restrict __oset) __THROW;
/* Change the set of blocked signals to SET, /* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */ wait until a signal arrives, and restore the set of blocked signals. */
extern int sigsuspend (__const sigset_t *__set) __THROW; extern int sigsuspend (__const sigset_t *__set) __THROW;
/* Get and/or set the action for signal SIG. */ /* Get and/or set the action for signal SIG. */
extern int __sigaction (int __sig, __const struct sigaction *__act, extern int __sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__oact) __THROW; struct sigaction *__restrict __oact) __THROW;
extern int sigaction (int __sig, __const struct sigaction *__act, extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__oact) __THROW; struct sigaction *__restrict __oact) __THROW;
/* Put in SET all signals that are blocked and waiting to be delivered. */ /* Put in SET all signals that are blocked and waiting to be delivered. */
extern int sigpending (sigset_t *__set) __THROW; extern int sigpending (sigset_t *__set) __THROW;
/* Select any of pending signals from SET or wait for any to arrive. */ /* Select any of pending signals from SET or wait for any to arrive. */
extern int sigwait (__const sigset_t *__set, int *__sig) __THROW; extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
__THROW;
# ifdef __USE_POSIX199309 # ifdef __USE_POSIX199309
/* Select any of pending signals from SET and place information in INFO. */ /* Select any of pending signals from SET and place information in INFO. */
extern int sigwaitinfo (__const sigset_t *__set, siginfo_t *__info) __THROW; extern int sigwaitinfo (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info) __THROW;
/* Select any of pending signals from SET and place information in INFO. /* Select any of pending signals from SET and place information in INFO.
Wait the imte specified by TIMEOUT if no signal is pending. */ Wait the imte specified by TIMEOUT if no signal is pending. */
extern int sigtimedwait (__const sigset_t *__set, siginfo_t *__info, extern int sigtimedwait (__const sigset_t *__restrict __set,
__const struct timespec *__timeout) __THROW; siginfo_t *__restrict __info,
__const struct timespec *__restrict __timeout)
__THROW;
/* Send signal SIG to the process PID. Associate data in VAL with the /* Send signal SIG to the process PID. Associate data in VAL with the
signal. */ signal. */
@ -329,8 +333,8 @@ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW;
/* Alternate signal handler stack interface. /* Alternate signal handler stack interface.
This interface should always be preferred over `sigstack'. */ This interface should always be preferred over `sigstack'. */
extern int sigaltstack (__const struct sigaltstack *__ss, extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
struct sigaltstack *__oss) __THROW; struct sigaltstack *__restrict __oss) __THROW;
#endif /* use BSD or X/Open Unix. */ #endif /* use BSD or X/Open Unix. */

View File

@ -1,5 +1,5 @@
/* Declarations of socket constants, types, and functions. /* Declarations of socket constants, types, and functions.
Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc. Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -62,7 +62,7 @@ enum
G++ 2.7 does not support transparent unions so there we want the G++ 2.7 does not support transparent unions so there we want the
old-style declaration, too. */ old-style declaration, too. */
#if defined __cplusplus || !__GNUC_PREREQ (2, 7) #if defined __cplusplus || !__GNUC_PREREQ (2, 7)
# define __SOCKADDR_ARG struct sockaddr * # define __SOCKADDR_ARG struct sockaddr *__restrict
# define __CONST_SOCKADDR_ARG __const struct sockaddr * # define __CONST_SOCKADDR_ARG __const struct sockaddr *
#else #else
/* Add more `struct sockaddr_AF' types here as necessary. /* Add more `struct sockaddr_AF' types here as necessary.
@ -82,11 +82,11 @@ enum
__SOCKADDR_ONETYPE (sockaddr_un) \ __SOCKADDR_ONETYPE (sockaddr_un) \
__SOCKADDR_ONETYPE (sockaddr_x25) __SOCKADDR_ONETYPE (sockaddr_x25)
# define __SOCKADDR_ONETYPE(type) struct type *__##type##__; # define __SOCKADDR_ONETYPE(type) struct type *__restrict __##type##__;
typedef union { __SOCKADDR_ALLTYPES typedef union { __SOCKADDR_ALLTYPES
} __SOCKADDR_ARG __attribute__ ((__transparent_union__)); } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
# undef __SOCKADDR_ONETYPE # undef __SOCKADDR_ONETYPE
# define __SOCKADDR_ONETYPE(type) __const struct type *__##type##__; # define __SOCKADDR_ONETYPE(type) __const struct type *__restrict __##type##__;
typedef union { __SOCKADDR_ALLTYPES typedef union { __SOCKADDR_ALLTYPES
} __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__));
# undef __SOCKADDR_ONETYPE # undef __SOCKADDR_ONETYPE
@ -110,8 +110,8 @@ extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
__THROW; __THROW;
/* Put the local address of FD into *ADDR and its length in *LEN. */ /* Put the local address of FD into *ADDR and its length in *LEN. */
extern int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__len) extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
__THROW; socklen_t *__restrict __len) __THROW;
/* Open a connection on socket FD to peer at ADDR (which LEN bytes long). /* Open a connection on socket FD to peer at ADDR (which LEN bytes long).
For connectionless socket types, just set the default address to send to For connectionless socket types, just set the default address to send to
@ -124,8 +124,8 @@ extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
/* Put the address of the peer connected to socket FD into *ADDR /* Put the address of the peer connected to socket FD into *ADDR
(which is *LEN bytes long), and its actual length into *LEN. */ (which is *LEN bytes long), and its actual length into *LEN. */
extern int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__len) extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
__THROW; socklen_t *__restrict __len) __THROW;
/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */ /* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
@ -149,8 +149,9 @@ extern int sendto (int __fd, __const void *__buf, size_t __n,
If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of
the sender, and store the actual size of the address in *ADDR_LEN. the sender, and store the actual size of the address in *ADDR_LEN.
Returns the number of bytes read or -1 for errors. */ Returns the number of bytes read or -1 for errors. */
extern int recvfrom (int __fd, void *__buf, size_t __n, int __flags, extern int recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
__SOCKADDR_ARG __addr, socklen_t *__addr_len) __THROW; __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
__THROW;
/* Send a message described MESSAGE on socket FD. /* Send a message described MESSAGE on socket FD.
@ -168,7 +169,8 @@ extern int recvmsg (int __fd, struct msghdr *__message, int __flags)
into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
actual length. Returns 0 on success, -1 for errors. */ actual length. Returns 0 on success, -1 for errors. */
extern int getsockopt (int __fd, int __level, int __optname, extern int getsockopt (int __fd, int __level, int __optname,
void *__optval, socklen_t *__optlen) __THROW; void *__restrict __optval,
socklen_t *__restrict __optlen) __THROW;
/* Set socket FD's option OPTNAME at protocol level LEVEL /* Set socket FD's option OPTNAME at protocol level LEVEL
to *OPTVAL (which is OPTLEN bytes long). to *OPTVAL (which is OPTLEN bytes long).
@ -187,7 +189,8 @@ extern int listen (int __fd, unsigned int __n) __THROW;
set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting
peer and *ADDR_LEN to the address's actual length, and return the peer and *ADDR_LEN to the address's actual length, and return the
new socket's descriptor, or -1 for errors. */ new socket's descriptor, or -1 for errors. */
extern int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__addr_len) extern int accept (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__restrict __addr_len)
__THROW; __THROW;
/* Shut down all or part of the connection open on socket FD. /* Shut down all or part of the connection open on socket FD.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. /* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -36,7 +36,8 @@ extern int setcontext (__const ucontext_t *__ucp) __THROW;
/* Save current context in context variable pointed to by OUCP and set /* Save current context in context variable pointed to by OUCP and set
context from variable pointed to by UCP. */ context from variable pointed to by UCP. */
extern int swapcontext (ucontext_t *__oucp, __const ucontext_t *__ucp) __THROW; extern int swapcontext (ucontext_t *__restrict __oucp,
__const ucontext_t *__restrict __ucp) __THROW;
/* Manipulate user context UCP to continue with calling functions FUNC /* Manipulate user context UCP to continue with calling functions FUNC
and the ARGC-1 parameters following ARGC when the context is used and the ARGC-1 parameters following ARGC when the context is used

View File

@ -44,13 +44,15 @@ __BEGIN_DECLS
extern int isastream (int __fildes) __THROW; extern int isastream (int __fildes) __THROW;
/* Receive next message from a STREAMS file. */ /* Receive next message from a STREAMS file. */
extern int getmsg (int __fildes, struct strbuf *__ctlptr, extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
struct strbuf *__dataptr, int *__flagsp) __THROW; struct strbuf *__restrict __dataptr,
int *__restrict __flagsp) __THROW;
/* Receive next message from a STREAMS file, with *FLAGSP allowing to /* Receive next message from a STREAMS file, with *FLAGSP allowing to
control which message. */ control which message. */
extern int getpmsg (int __fildes, struct strbuf *__ctlptr, extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
struct strbuf *__dataptr, int *__bandp, int *__flagsp) struct strbuf *__restrict __dataptr,
int *__restrict __bandp, int *__restrict __flagsp)
__THROW; __THROW;
/* Perform the I/O control operation specified by REQUEST on FD. /* Perform the I/O control operation specified by REQUEST on FD.

View File

@ -45,7 +45,8 @@ extern void *memmove (void *__dest, __const void *__src, size_t __n)
Return the position in DEST one byte past where C was copied, Return the position in DEST one byte past where C was copied,
or NULL if C was not found in the first N bytes of SRC. */ or NULL if C was not found in the first N bytes of SRC. */
#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN
extern void *memccpy (void *__dest, __const void *__src, int __c, size_t __n) extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
int __c, size_t __n)
__THROW; __THROW;
#endif /* SVID. */ #endif /* SVID. */

View File

@ -65,7 +65,8 @@ typedef void *__timezone_ptr_t;
Returns 0 on success, -1 on errors. Returns 0 on success, -1 on errors.
NOTE: This form of timezone information is obsolete. NOTE: This form of timezone information is obsolete.
Use the functions and variables declared in <time.h> instead. */ Use the functions and variables declared in <time.h> instead. */
extern int gettimeofday (struct timeval *__tv, __timezone_ptr_t __tz) __THROW; extern int gettimeofday (struct timeval *__restrict __tv,
__timezone_ptr_t __restrict __tz) __THROW;
/* Set the current time of day and timezone information. /* Set the current time of day and timezone information.
This call is restricted to the super-user. */ This call is restricted to the super-user. */
@ -120,8 +121,8 @@ extern int getitimer (__itimer_which_t __which,
set *OLD to the old value of timer WHICH. set *OLD to the old value of timer WHICH.
Returns 0 on success, -1 on errors. */ Returns 0 on success, -1 on errors. */
extern int setitimer (__itimer_which_t __which, extern int setitimer (__itimer_which_t __which,
__const struct itimerval *__new, __const struct itimerval *__restrict __new,
struct itimerval *__old) __THROW; struct itimerval *__restrict __old) __THROW;
/* Change the access time of FILE to TVP[0] and /* Change the access time of FILE to TVP[0] and
the modification time of FILE to TVP[1]. */ the modification time of FILE to TVP[1]. */

View File

@ -182,7 +182,8 @@ extern size_t strftime (char *__restrict __s, size_t __maxsize,
# ifdef __USE_XOPEN # ifdef __USE_XOPEN
/* Parse S according to FORMAT and store binary time information in TP. /* Parse S according to FORMAT and store binary time information in TP.
The return value is a pointer to the first unparsed character in S. */ The return value is a pointer to the first unparsed character in S. */
extern char *strptime (__const char *__s, __const char *__fmt, struct tm *__tp) extern char *strptime (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp)
__THROW; __THROW;
# endif # endif
@ -304,16 +305,17 @@ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
/* Create new per-process timer using CLOCK_ID. */ /* Create new per-process timer using CLOCK_ID. */
extern int timer_create (clockid_t __clock_id, struct sigevent *__evp, extern int timer_create (clockid_t __clock_id,
timer_t *__timerid) __THROW; struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) __THROW;
/* Delete timer TIMERID. */ /* Delete timer TIMERID. */
extern int timer_delete (timer_t __timerid) __THROW; extern int timer_delete (timer_t __timerid) __THROW;
/* Set timer TIMERID to VALUE, returning old value in OVLAUE. */ /* Set timer TIMERID to VALUE, returning old value in OVLAUE. */
extern int timer_settime (timer_t __timerid, int __flags, extern int timer_settime (timer_t __timerid, int __flags,
__const struct itimerspec *__value, __const struct itimerspec *__restrict __value,
struct itimerspec *__ovalue) __THROW; struct itimerspec *__restrict __ovalue) __THROW;
/* Get current value of timer TIMERID and store it in VLAUE. */ /* Get current value of timer TIMERID and store it in VLAUE. */
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)