about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog26
-rw-r--r--include/sys/time.h4
-rw-r--r--inet/arpa/inet.h8
-rw-r--r--io/sys/stat.h18
-rw-r--r--io/sys/statvfs.h9
-rw-r--r--libio/stdio.h2
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/semaphore.h6
-rw-r--r--linuxthreads/sysdeps/pthread/pthread.h128
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h9
-rw-r--r--misc/search.h3
-rw-r--r--misc/sys/cdefs.h6
-rw-r--r--misc/sys/select.h24
-rw-r--r--posix/glob.h23
-rw-r--r--posix/regex.h10
-rw-r--r--posix/spawn.h64
-rw-r--r--posix/unistd.h6
-rw-r--r--rt/aio.h9
-rw-r--r--signal/signal.h28
-rw-r--r--socket/sys/socket.h27
-rw-r--r--stdlib/ucontext.h5
-rw-r--r--streams/stropts.h10
-rw-r--r--string/string.h3
-rw-r--r--time/sys/time.h7
-rw-r--r--time/time.h12
25 files changed, 287 insertions, 166 deletions
diff --git a/ChangeLog b/ChangeLog
index b137f794bc..ccffcd7873 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
 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
 	PLT.
 	* include/libintl.h: Likewise.
diff --git a/include/sys/time.h b/include/sys/time.h
index e21cca43ec..0350573b6b 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -11,7 +11,7 @@ extern int __adjtime (__const struct timeval *__delta,
 extern int __getitimer (enum __itimer_which __which,
 			struct itimerval *__value);
 extern int __setitimer (enum __itimer_which __which,
-			__const struct itimerval *__new,
-			struct itimerval *__old);
+			__const struct itimerval *__restrict __new,
+			struct itimerval *__restrict __old);
 extern int __utimes (__const char *__file, const struct timeval __tvp[2]);
 #endif
diff --git a/inet/arpa/inet.h b/inet/arpa/inet.h
index 72a90ba3da..a9381de6da 100644
--- a/inet/arpa/inet.h
+++ b/inet/arpa/inet.h
@@ -51,13 +51,15 @@ extern char *inet_ntoa (struct in_addr __in) __THROW;
 /* Convert from presentation format of an Internet number in buffer
    starting at CP to the binary network format and store result for
    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
    type AF in buffer starting at CP to presentation form and place
    result in buffer of length LEN astarting at BUF.  */
-extern __const char *inet_ntop (int __af, __const void *__cp,
-				char *__buf, socklen_t __len) __THROW;
+extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
+				char *__restrict __buf, socklen_t __len)
+     __THROW;
 
 
 /* The following functions are not part of XNS 5.2.  */
diff --git a/io/sys/stat.h b/io/sys/stat.h
index 7a8c8b3e1e..32268a0b43 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -196,7 +196,8 @@ __BEGIN_DECLS
 
 #ifndef __USE_FILE_OFFSET64
 /* 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
    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
 # ifdef __REDIRECT
 extern int __REDIRECT (stat,
-		       (__const char *__file, struct stat *__buf) __THROW,
+		       (__const char *__restrict __file,
+			struct stat *__restrict __buf) __THROW,
 		       stat64);
 extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64);
 # else
@@ -213,7 +215,8 @@ extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64);
 # endif
 #endif
 #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;
 #endif
 
@@ -221,18 +224,21 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW;
 # ifndef __USE_FILE_OFFSET64
 /* Get file attributes about FILE and put them in BUF.
    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
 #  ifdef __REDIRECT
 extern int __REDIRECT (lstat,
-		       (__const char *__file, struct stat *__buf) __THROW,
+		       (__const char *__restrict __file,
+			struct stat *__restrict __buf) __THROW,
 		       lstat64);
 #  else
 #   define lstat lstat64
 #  endif
 # endif
 # 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
 
diff --git a/io/sys/statvfs.h b/io/sys/statvfs.h
index 71335f324f..9134cb4cd9 100644
--- a/io/sys/statvfs.h
+++ b/io/sys/statvfs.h
@@ -49,18 +49,21 @@ __BEGIN_DECLS
 
 /* Return information about the filesystem on which FILE resides.  */
 #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
 # ifdef __REDIRECT
 extern int __REDIRECT (statvfs,
-		       (__const char *__file, struct statvfs *__buf) __THROW,
+		       (__const char *__restrict __file,
+			struct statvfs *__restrict __buf) __THROW,
 		       statvfs64);
 # else
 #  define statvfs statvfs64
 # endif
 #endif
 #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
 
 /* Return information about the filesystem containing the file FILDES
diff --git a/libio/stdio.h b/libio/stdio.h
index b43826e037..7a18261586 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -581,7 +581,7 @@ extern char *ctermid (char *__s) __THROW;
 #endif /* Use POSIX.  */
 
 
-#if defined __USE_XOPEN && !defined __USE_XOPEN2K
+#ifdef __USE_XOPEN
 /* Return the name of the current user.  */
 extern char *cuserid (char *__s) __THROW;
 #endif /* Use X/Open, but not issue 6.  */
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 187d3a571b..498cebb415 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -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>
 
 	* Makefile (tests): Add ex12.  Add rule to build it.
diff --git a/linuxthreads/semaphore.h b/linuxthreads/semaphore.h
index 583b65ea18..f611f48323 100644
--- a/linuxthreads/semaphore.h
+++ b/linuxthreads/semaphore.h
@@ -72,7 +72,8 @@ extern int sem_wait (sem_t *__sem) __THROW;
 
 #ifdef __USE_XOPEN2K
 /* 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;
 #endif
 
@@ -83,7 +84,8 @@ extern int sem_trywait (sem_t *__sem) __THROW;
 extern int sem_post (sem_t *__sem) __THROW;
 
 /* 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
 
diff --git a/linuxthreads/sysdeps/pthread/pthread.h b/linuxthreads/sysdeps/pthread/pthread.h
index b017007f80..28c8354b37 100644
--- a/linuxthreads/sysdeps/pthread/pthread.h
+++ b/linuxthreads/sysdeps/pthread/pthread.h
@@ -155,10 +155,10 @@ enum
 /* Create a thread with given attributes ATTR (or default attributes
    if ATTR is NULL), and call function START_ROUTINE with given
    arguments ARG.  */
-extern int pthread_create (pthread_t *__thread,
-			   __const pthread_attr_t *__attr,
+extern int pthread_create (pthread_t *__restrict __thread,
+			   __const pthread_attr_t *__restrict __attr,
 			   void *(*__start_routine) (void *),
-			   void *__arg) __THROW;
+			   void *__restrict __arg) __THROW;
 
 /* Obtain the identifier of the current thread.  */
 extern pthread_t pthread_self (void) __THROW;
@@ -201,37 +201,41 @@ extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
 					int *__detachstate) __THROW;
 
 /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM.  */
-extern int pthread_attr_setschedparam (pthread_attr_t *__attr,
-				       __const struct sched_param *__param)
-     __THROW;
+extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
+				       __const struct sched_param *__restrict
+				       __param) __THROW;
 
 /* Return in *PARAM the scheduling parameters of *ATTR.  */
-extern int pthread_attr_getschedparam (__const pthread_attr_t *__attr,
-				       struct sched_param *__param) __THROW;
+extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
+				       __attr,
+				       struct sched_param *__restrict __param)
+     __THROW;
 
 /* Set scheduling policy in *ATTR according to POLICY.  */
 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
      __THROW;
 
 /* Return in *POLICY the scheduling policy of *ATTR.  */
-extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__attr,
-					int *__policy) __THROW;
+extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
+					__attr, int *__restrict __policy)
+     __THROW;
 
 /* Set scheduling inheritance mode in *ATTR according to INHERIT.  */
 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
 					 int __inherit) __THROW;
 
 /* Return in *INHERIT the scheduling inheritance mode of *ATTR.  */
-extern int pthread_attr_getinheritsched (__const pthread_attr_t *__attr,
-					 int *__inherit) __THROW;
+extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
+					 __attr, int *__restrict __inherit)
+     __THROW;
 
 /* Set scheduling contention scope in *ATTR according to SCOPE.  */
 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
      __THROW;
 
 /* Return in *SCOPE the scheduling contention scope of *ATTR.  */
-extern int pthread_attr_getscope (__const pthread_attr_t *__attr,
-				  int *__scope) __THROW;
+extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
+				  int *__restrict __scope) __THROW;
 
 #ifdef __USE_UNIX98
 /* 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;
 
 /* Get the size of the guard area at the bottom of the thread.  */
-extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
-				      size_t *__guardsize) __THROW;
+extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
+				      __attr, size_t *__restrict __guardsize)
+     __THROW;
 #endif
 
 /* 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;
 
 /* Return the previously set address for the stack.  */
-extern int pthread_attr_getstackaddr (__const pthread_attr_t *__attr,
-				      void **__stackaddr) __THROW;
+extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
+				      __attr, void **__restrict __stackaddr)
+     __THROW;
 
 /* Add information about the minimum stack size needed for the thread
    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;
 
 /* Return the currently used minimal stack size.  */
-extern int pthread_attr_getstacksize (__const pthread_attr_t *__attr,
-				      size_t *__stacksize) __THROW;
+extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
+				      __attr, size_t *__restrict __stacksize)
+     __THROW;
 
 /* Functions for scheduling control.  */
 
@@ -273,8 +280,10 @@ extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
      __THROW;
 
 /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD.  */
-extern int pthread_getschedparam (pthread_t __target_thread, int *__policy,
-				  struct sched_param *__param) __THROW;
+extern int pthread_getschedparam (pthread_t __target_thread,
+				  int *__restrict __policy,
+				  struct sched_param *__restrict __param)
+     __THROW;
 
 #ifdef __USE_UNIX98
 /* Determine level of concurrency.  */
@@ -296,9 +305,9 @@ extern int pthread_yield (void) __THROW;
 
 /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
    default values if later is NULL.  */
-extern int pthread_mutex_init (pthread_mutex_t *__mutex,
-			       __const pthread_mutexattr_t *__mutex_attr)
-     __THROW;
+extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
+			       __const pthread_mutexattr_t *__restrict
+			       __mutex_attr) __THROW;
 
 /* Destroy MUTEX.  */
 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
 /* Wait until lock becomes available, or specified time passes. */
-extern int pthread_mutex_timedlock (pthread_mutex_t *__mutex,
-				    __const struct timespec *__abstime)
-     __THROW;
+extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
+				    __const struct timespec *__restrict
+				    __abstime) __THROW;
 #endif
 
 /* 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;
 
 /* Get the process-shared flag of the mutex attribute ATTR.  */
-extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *__attr,
-					 int *__pshared) __THROW;
+extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
+					 __restrict __attr,
+					 int *__restrict __pshared) __THROW;
 
 /* Set the process-shared flag of the mutex attribute 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;
 
 /* Return in *KIND the mutex kind attribute in *ATTR.  */
-extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__attr,
-				      int *__kind) __THROW;
+extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
+				      __attr, int *__restrict __kind) __THROW;
 #endif
 
 
@@ -354,8 +364,9 @@ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__attr,
 
 /* Initialize condition variable COND using attributes ATTR, or use
    the default values if later is NULL.  */
-extern int pthread_cond_init (pthread_cond_t *__cond,
-			      __const pthread_condattr_t *__cond_attr) __THROW;
+extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
+			      __const pthread_condattr_t *__restrict
+			      __cond_attr) __THROW;
 
 /* Destroy condition variable COND.  */
 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.
    MUTEX is assumed to be locked before.  */
-extern int pthread_cond_wait (pthread_cond_t *__cond,
-			      pthread_mutex_t *__mutex) __THROW;
+extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
+			      pthread_mutex_t *__restrict __mutex) __THROW;
 
 /* Wait for condition variable COND to be signaled or broadcast until
    ABSTIME.  MUTEX is assumed to be locked before.  ABSTIME is an
    absolute time specification; zero is the beginning of the epoch
    (00:00:00 GMT, January 1, 1970).  */
-extern int pthread_cond_timedwait (pthread_cond_t *__cond,
-				   pthread_mutex_t *__mutex,
-				   __const struct timespec *__abstime) __THROW;
+extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
+				   pthread_mutex_t *__restrict __mutex,
+				   __const struct timespec *__restrict
+				   __abstime) __THROW;
 
 /* 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;
 
 /* Get the process-shared flag of the condition variable attribute ATTR.  */
-extern int pthread_condattr_getpshared (__const pthread_condattr_t *__attr,
-					int *__pshared) __THROW;
+extern int pthread_condattr_getpshared (__const pthread_condattr_t *
+					__restrict __attr,
+					int *__restrict __pshared) __THROW;
 
 /* Set the process-shared flag of the condition variable attribute 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
    the default values if later is NULL.  */
-extern int pthread_rwlock_init (pthread_rwlock_t *__rwlock,
-				__const pthread_rwlockattr_t *__attr) __THROW;
+extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
+				__const pthread_rwlockattr_t *__restrict
+				__attr) __THROW;
 
 /* Destroy read-write lock RWLOCK.  */
 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
 /* Try to acquire read lock for RWLOCK or return after specfied time.  */
-extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__rwlock,
-				       __const struct timespec *__abstime)
-     __THROW;
+extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
+				       __const struct timespec *__restrict
+				       __abstime) __THROW;
 #endif
 
 /* Acquire write lock for RWLOCK.  */
@@ -428,9 +442,9 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW;
 
 #ifdef __USE_XOPEN2K
 /* Try to acquire write lock for RWLOCK or return after specfied time.  */
-extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__rwlock,
-				       __const struct timespec *__abstime)
-     __THROW;
+extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
+				       __const struct timespec *__restrict
+				       __abstime) __THROW;
 #endif
 
 /* 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;
 
 /* Return current setting of process-shared attribute of ATTR in PSHARED.  */
-extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *__attr,
-					  int *__pshared) __THROW;
+extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
+					  __restrict __attr,
+					  int *__restrict __pshared) __THROW;
 
 /* Set process-shared attribute of ATTR to PSHARED.  */
 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. */
 
-extern int pthread_barrier_init (pthread_barrier_t *__barrier,
-				 __const pthread_barrierattr_t *__attr,
-				 unsigned int __count) __THROW;
+extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
+				 __const pthread_barrierattr_t *__restrict
+				 __attr, unsigned int __count) __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_getpshared (__const pthread_barrierattr_t *__attr,
-					   int *__pshared) __THROW;
+extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
+					   __restrict __attr,
+					   int *__restrict __pshared) __THROW;
 
 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
 					   int __pshared) __THROW;
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
index 40238561df..b86e75f20e 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
@@ -1,5 +1,5 @@
 /* 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.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _BITS_SIGTHREAD_H 
+#ifndef _BITS_SIGTHREAD_H
 #define _BITS_SIGTHREAD_H	1
 
 #if !defined _SIGNAL_H && !defined _PTHREAD_H
@@ -28,8 +28,9 @@
 
 /* Modify the signal mask for the calling thread.  The arguments have
    the same meaning as for sigprocmask(2). */
-extern int pthread_sigmask (int __how, __const __sigset_t *__newmask,
-			    __sigset_t *__oldmask)__THROW;
+extern int pthread_sigmask (int __how,
+			    __const __sigset_t *__restrict __newmask,
+			    __sigset_t *__restrict __oldmask)__THROW;
 
 /* Send signal SIGNO to the given thread. */
 extern int pthread_kill (pthread_t __thread, int __signo) __THROW;
diff --git a/misc/search.h b/misc/search.h
index 0ea91c2150..7722be9670 100644
--- a/misc/search.h
+++ b/misc/search.h
@@ -136,7 +136,8 @@ extern void *tfind (__const void *__key, void *__const *__rootp,
 		    __compar_fn_t __compar);
 
 /* 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);
 
 #ifndef __ACTION_FN_T
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 9960239688..a4535e3cac 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -163,4 +163,10 @@
 # define __restrict	/* Ignore */
 #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 */
diff --git a/misc/sys/select.h b/misc/sys/select.h
index 15130cbab3..ff5ba6b39f 100644
--- a/misc/sys/select.h
+++ b/misc/sys/select.h
@@ -1,5 +1,5 @@
 /* `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.
 
    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
    after waiting the interval specified therein.  Returns the number of ready
    descriptors, or -1 for errors.  */
-extern int __select (int __nfds, __fd_set *__readfds,
-		     __fd_set *__writefds, __fd_set *__exceptfds,
-		     struct timeval *__timeout) __THROW;
-extern int select (int __nfds, __fd_set *__readfds,
-		   __fd_set *__writefds, __fd_set *__exceptfds,
-		   struct timeval *__timeout) __THROW;
+extern int __select (int __nfds, __fd_set *__restrict __readfds,
+		     __fd_set *__restrict __writefds,
+		     __fd_set *__restrict __exceptfds,
+		     struct timeval *__restrict __timeout) __THROW;
+extern int select (int __nfds, __fd_set *__restrict __readfds,
+		   __fd_set *__restrict __writefds,
+		   __fd_set *__restrict __exceptfds,
+		   struct timeval *__restrict __timeout) __THROW;
 
 #ifdef __USE_GNU
 /* 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
    resolution and a sigmask which is been set temporarily.  This version
    should be used.  */
-extern int pselect (int __nfds, __fd_set *__readfds, __fd_set *__writefds,
-		    __fd_set *__exceptfds, const struct timespec *__timeout,
-		    const __sigset_t *__sigmask) __THROW;
+extern int pselect (int __nfds, __fd_set *__restrict __readfds,
+		    __fd_set *__restrict __writefds,
+		    __fd_set *__restrict __exceptfds,
+		    const struct timespec *__restrict __timeout,
+		    const __sigset_t *__restrict __sigmask) __THROW;
 #endif
 
 __END_DECLS
diff --git a/posix/glob.h b/posix/glob.h
index 7d93b98320..5ce4c9aa92 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -120,8 +120,9 @@ typedef struct
     void (*gl_closedir) __PMT ((void *));
     struct dirent *(*gl_readdir) __PMT ((void *));
     __ptr_t (*gl_opendir) __PMT ((__const char *));
-    int (*gl_lstat) __PMT ((__const char *, struct stat *));
-    int (*gl_stat) __PMT ((__const char *, struct stat *));
+    int (*gl_lstat) __PMT ((__const char *__restrict,
+			    struct stat *__restrict));
+    int (*gl_stat) __PMT ((__const char *__restrict, struct stat *__restrict));
   } glob_t;
 
 #ifdef _LARGEFILE64_SOURCE
@@ -138,8 +139,10 @@ typedef struct
     void (*gl_closedir) __PMT ((void *));
     struct dirent64 *(*gl_readdir) __PMT ((void *));
     __ptr_t (*gl_opendir) __PMT ((__const char *));
-    int (*gl_lstat) __PMT ((__const char *, struct stat64 *));
-    int (*gl_stat) __PMT ((__const char *, struct stat64 *));
+    int (*gl_lstat) __PMT ((__const char *__restrict,
+			    struct stat64 *__restrict));
+    int (*gl_stat) __PMT ((__const char *__restrict,
+			   struct stat64 *__restrict));
   } glob64_t;
 #endif
 
@@ -157,24 +160,24 @@ typedef struct
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    Otherwise, `glob' returns zero.  */
 #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),
-		      glob_t *__pglob));
+		      glob_t *__restrict __pglob));
 
 /* Free storage allocated in PGLOB by a previous `glob' call.  */
 extern void globfree __P ((glob_t *__pglob));
 #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),
-		      glob_t *__pglob)) __asm__ ("glob64");
+		      glob_t *__restrict __pglob)) __asm__ ("glob64");
 
 extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64");
 #endif
 
 #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),
-			glob64_t *__pglob));
+			glob64_t *__restrict __pglob));
 
 extern void globfree64 __P ((glob64_t *__pglob));
 #endif
diff --git a/posix/regex.h b/posix/regex.h
index 5edeff3551..8576fe68fa 100644
--- a/posix/regex.h
+++ b/posix/regex.h
@@ -514,12 +514,14 @@ extern int re_exec _RE_ARGS ((const char *));
 #endif
 
 /* 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));
 
-extern int regexec _RE_ARGS ((const regex_t *__preg,
-			      const char *__string, size_t __nmatch,
-			      regmatch_t __pmatch[], int __eflags));
+extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
+			      const char *__restrict __string, size_t __nmatch,
+			      regmatch_t __pmatch[__restrict_arr],
+			      int __eflags));
 
 extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
 				  char *__errbuf, size_t __errbuf_size));
diff --git a/posix/spawn.h b/posix/spawn.h
index 9487cbd179..38bdbd37b5 100644
--- a/posix/spawn.h
+++ b/posix/spawn.h
@@ -63,10 +63,13 @@ __BEGIN_DECLS
 
 /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
    Before running the process perform the actions described in FILE-ACTIONS. */
-extern int posix_spawn (pid_t *__pid, __const char *__path,
-			__const posix_spawn_file_actions_t *__file_actions,
-			__const posix_spawnattr_t *__attrp,
-			char *__const argv[], char *__const envp[]) __THROW;
+extern int posix_spawn (pid_t *__restrict __pid,
+			__const char *__restrict __path,
+			__const posix_spawn_file_actions_t *__restrict
+			__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.  */
 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
    SIGDEFAULT.  */
-extern int posix_spawnattr_getsigdefault (__const posix_spawnattr_t *__attr,
-					  sigset_t *__sigdefault) __THROW;
+extern int posix_spawnattr_getsigdefault (__const posix_spawnattr_t *
+					  __restrict __attr,
+					  sigset_t *__restrict __sigdefault)
+     __THROW;
 
 /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT.  */
-extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__attr,
-					  __const sigset_t *__sigdefault)
+extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr,
+					  __const sigset_t *__restrict
+					  __sigdefault)
      __THROW;
 
 /* Store signal mask for the new process from ATTR in SIGMASK.  */
-extern int posix_spawnattr_getsigmask (__const posix_spawnattr_t *__attr,
-				       sigset_t *__sigmask) __THROW;
+extern int posix_spawnattr_getsigmask (__const posix_spawnattr_t *__restrict
+				       __attr,
+				       sigset_t *__restrict __sigmask) __THROW;
 
 /* Set signal mask for the new process in ATTR to SIGMASK.  */
-extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__attr,
-				       __const sigset_t *__sigmask) __THROW;
+extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr,
+				       __const sigset_t *__restrict __sigmask)
+     __THROW;
 
 /* Get flag word from the attribute structure.  */
-extern int posix_spawnattr_getflags (__const posix_spawnattr_t *__attr,
-				     short int *__flags) __THROW;
+extern int posix_spawnattr_getflags (__const posix_spawnattr_t *__restrict
+				     __attr,
+				     short int *__restrict __flags) __THROW;
 
 /* Store flags in the attribute structure.  */
 extern int posix_spawnattr_setflags (posix_spawnattr_t *_attr,
 				     short int __flags) __THROW;
 
 /* Get process group ID from the attribute structure.  */
-extern int posix_spawnattr_getpgroup (__const posix_spawnattr_t *__attr,
-				      pid_t *__pgroup) __THROW;
+extern int posix_spawnattr_getpgroup (__const posix_spawnattr_t *__restrict
+				      __attr, pid_t *__restrict __pgroup)
+     __THROW;
 
 /* Store process group ID in the attribute structure.  */
 extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr,
 				      pid_t __pgroup) __THROW;
 
 /* Get scheduling policy from the attribute structure.  */
-extern int posix_spawnattr_getschedpolicy (__const posix_spawnattr_t *__attr,
-					   int *__schedpolicy) __THROW;
+extern int posix_spawnattr_getschedpolicy (__const posix_spawnattr_t *
+					   __restrict __attr,
+					   int *__restrict __schedpolicy)
+     __THROW;
 
 /* Store scheduling policy in the attribute structure.  */
 extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr,
 					   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.  */
 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
    `open' for the given file during the `spawn' call.  */
 extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *
-					     __file_actions,
-					     int __fd, __const char *__path,
+					     __restrict __file_actions,
+					     int __fd,
+					     __const char *__restrict __path,
 					     int __oflag, mode_t __mode)
      __THROW;
 
diff --git a/posix/unistd.h b/posix/unistd.h
index 0df0e93e08..eebfe88f85 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -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
    LEN bytes of BUF.  The contents are not null-terminated.
    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.  */
 
 /* 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
    range [FROM - N + 1, FROM - 1].  If N is odd the first byte in FROM
    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
 
 
diff --git a/rt/aio.h b/rt/aio.h
index 15b16ab234..61662089ff 100644
--- a/rt/aio.h
+++ b/rt/aio.h
@@ -147,7 +147,8 @@ extern int aio_read (struct aiocb *__aiocbp) __THROW;
 extern int aio_write (struct aiocb *__aiocbp) __THROW;
 
 /* 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;
 
 /* Retrieve error status associated with AIOCBP.  */
@@ -174,7 +175,8 @@ extern int __REDIRECT (aio_write, (struct aiocb *__aiocbp) __THROW,
 		       aio_write64);
 
 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,
 		       lio_listio64);
 
@@ -213,7 +215,8 @@ extern int __REDIRECT (aio_fsync,
 extern int aio_read64 (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)
      __THROW;
 
diff --git a/signal/signal.h b/signal/signal.h
index 3f6373ee75..cc422ac9f6 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -232,34 +232,38 @@ extern int sigorset (sigset_t *__set, __const sigset_t *__left,
 # include <bits/sigaction.h>
 
 /* Get and/or change the set of blocked signals.  */
-extern int sigprocmask (int __how, __const sigset_t *__set, sigset_t *__oset)
-     __THROW;
+extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
+			sigset_t *__restrict __oset) __THROW;
 
 /* Change the set of blocked signals to SET,
    wait until a signal arrives, and restore the set of blocked signals.  */
 extern int sigsuspend (__const sigset_t *__set) __THROW;
 
 /* Get and/or set the action for signal SIG.  */
-extern int __sigaction (int __sig, __const struct sigaction *__act,
-			struct sigaction *__oact) __THROW;
-extern int sigaction (int __sig, __const struct sigaction *__act,
-		      struct sigaction *__oact) __THROW;
+extern int __sigaction (int __sig, __const struct sigaction *__restrict __act,
+			struct sigaction *__restrict __oact) __THROW;
+extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
+		      struct sigaction *__restrict __oact) __THROW;
 
 /* Put in SET all signals that are blocked and waiting to be delivered.  */
 extern int sigpending (sigset_t *__set) __THROW;
 
 
 /* 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
 /* 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.
    Wait the imte specified by TIMEOUT if no signal is pending.  */
-extern int sigtimedwait (__const sigset_t *__set, siginfo_t *__info,
-			 __const struct timespec *__timeout) __THROW;
+extern int sigtimedwait (__const sigset_t *__restrict __set,
+			 siginfo_t *__restrict __info,
+			 __const struct timespec *__restrict __timeout)
+     __THROW;
 
 /* Send signal SIG to the process PID.  Associate data in VAL with the
    signal.  */
@@ -329,8 +333,8 @@ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW;
 
 /* Alternate signal handler stack interface.
    This interface should always be preferred over `sigstack'.  */
-extern int sigaltstack (__const struct sigaltstack *__ss,
-			struct sigaltstack *__oss) __THROW;
+extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
+			struct sigaltstack *__restrict __oss) __THROW;
 
 #endif /* use BSD or X/Open Unix.  */
 
diff --git a/socket/sys/socket.h b/socket/sys/socket.h
index dbb6dabd2c..1655d956e8 100644
--- a/socket/sys/socket.h
+++ b/socket/sys/socket.h
@@ -1,5 +1,5 @@
 /* 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.
 
    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
    old-style declaration, too.  */
 #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 *
 #else
 /* Add more `struct sockaddr_AF' types here as necessary.
@@ -82,11 +82,11 @@ enum
   __SOCKADDR_ONETYPE (sockaddr_un) \
   __SOCKADDR_ONETYPE (sockaddr_x25)
 
-# define __SOCKADDR_ONETYPE(type) struct type *__##type##__;
+# define __SOCKADDR_ONETYPE(type) struct type *__restrict __##type##__;
 typedef union { __SOCKADDR_ALLTYPES
 	      } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
 # undef __SOCKADDR_ONETYPE
-# define __SOCKADDR_ONETYPE(type) __const struct type *__##type##__;
+# define __SOCKADDR_ONETYPE(type) __const struct type *__restrict __##type##__;
 typedef union { __SOCKADDR_ALLTYPES
 	      } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__));
 # undef __SOCKADDR_ONETYPE
@@ -110,8 +110,8 @@ extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
      __THROW;
 
 /* Put the local address of FD into *ADDR and its length in *LEN.  */
-extern int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__len)
-     __THROW;
+extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
+			socklen_t *__restrict __len) __THROW;
 
 /* 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
@@ -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
    (which is *LEN bytes long), and its actual length into *LEN.  */
-extern int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__len)
-     __THROW;
+extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
+			socklen_t *__restrict __len) __THROW;
 
 
 /* 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
    the sender, and store the actual size of the address in *ADDR_LEN.
    Returns the number of bytes read or -1 for errors.  */
-extern int recvfrom (int __fd, void *__buf, size_t __n, int __flags,
-		     __SOCKADDR_ARG __addr, socklen_t *__addr_len) __THROW;
+extern int recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
+		     __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
+     __THROW;
 
 
 /* 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
    actual length.  Returns 0 on success, -1 for errors.  */
 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
    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
    peer and *ADDR_LEN to the address's actual length, and return the
    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;
 
 /* Shut down all or part of the connection open on socket FD.
diff --git a/stdlib/ucontext.h b/stdlib/ucontext.h
index 9e92a61cbf..346a682950 100644
--- a/stdlib/ucontext.h
+++ b/stdlib/ucontext.h
@@ -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.
 
    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
    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
    and the ARGC-1 parameters following ARGC when the context is used
diff --git a/streams/stropts.h b/streams/stropts.h
index dda28573e9..04dc5cd0af 100644
--- a/streams/stropts.h
+++ b/streams/stropts.h
@@ -44,13 +44,15 @@ __BEGIN_DECLS
 extern int isastream (int __fildes) __THROW;
 
 /* Receive next message from a STREAMS file.  */
-extern int getmsg (int __fildes, struct strbuf *__ctlptr,
-		   struct strbuf *__dataptr, int *__flagsp) __THROW;
+extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
+		   struct strbuf *__restrict __dataptr,
+		   int *__restrict __flagsp) __THROW;
 
 /* Receive next message from a STREAMS file, with *FLAGSP allowing to
    control which message.  */
-extern int getpmsg (int __fildes, struct strbuf *__ctlptr,
-		    struct strbuf *__dataptr, int *__bandp, int *__flagsp)
+extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
+		    struct strbuf *__restrict __dataptr,
+		    int *__restrict __bandp, int *__restrict __flagsp)
      __THROW;
 
 /* Perform the I/O control operation specified by REQUEST on FD.
diff --git a/string/string.h b/string/string.h
index d4d3e442ef..1ea0ff5d92 100644
--- a/string/string.h
+++ b/string/string.h
@@ -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,
    or NULL if C was not found in the first N bytes of SRC.  */
 #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;
 #endif /* SVID.  */
 
diff --git a/time/sys/time.h b/time/sys/time.h
index fe8648e763..a753912299 100644
--- a/time/sys/time.h
+++ b/time/sys/time.h
@@ -65,7 +65,8 @@ typedef void *__timezone_ptr_t;
    Returns 0 on success, -1 on errors.
    NOTE: This form of timezone information is obsolete.
    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.
    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.
    Returns 0 on success, -1 on errors.  */
 extern int setitimer (__itimer_which_t __which,
-		      __const struct itimerval *__new,
-		      struct itimerval *__old) __THROW;
+		      __const struct itimerval *__restrict __new,
+		      struct itimerval *__restrict __old) __THROW;
 
 /* Change the access time of FILE to TVP[0] and
    the modification time of FILE to TVP[1].  */
diff --git a/time/time.h b/time/time.h
index 47e4d8c5be..9178d5f2da 100644
--- a/time/time.h
+++ b/time/time.h
@@ -182,7 +182,8 @@ extern size_t strftime (char *__restrict __s, size_t __maxsize,
 # ifdef __USE_XOPEN
 /* 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.  */
-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;
 # 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.  */
-extern int timer_create (clockid_t __clock_id, struct sigevent *__evp,
-			 timer_t *__timerid) __THROW;
+extern int timer_create (clockid_t __clock_id,
+			 struct sigevent *__restrict __evp,
+			 timer_t *__restrict __timerid) __THROW;
 
 /* Delete timer TIMERID.  */
 extern int timer_delete (timer_t __timerid) __THROW;
 
 /* Set timer TIMERID to VALUE, returning old value in OVLAUE.  */
 extern int timer_settime (timer_t __timerid, int __flags,
-			  __const struct itimerspec *__value,
-			  struct itimerspec *__ovalue) __THROW;
+			  __const struct itimerspec *__restrict __value,
+			  struct itimerspec *__restrict __ovalue) __THROW;
 
 /* Get current value of timer TIMERID and store it in VLAUE.  */
 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)