summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-07 22:33:37 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-07 22:33:37 +0000
commitf377d02227448a6f0d97eaf48ba60483c2f27e98 (patch)
treedc3fa6ae400c4a26e8757fc1bfadce3ab5f4d018
parent36ccb375a7f4db3ef66a0115961cfef23befa0e6 (diff)
downloadglibc-f377d02227448a6f0d97eaf48ba60483c2f27e98.tar.gz
glibc-f377d02227448a6f0d97eaf48ba60483c2f27e98.tar.xz
glibc-f377d02227448a6f0d97eaf48ba60483c2f27e98.zip
Update.
	* include/atomic.h: Define atomic_increment_val, atomic_decrement_val,
	and atomic_dealy is not already defined.
	* sysdeps/i386/i486/bits/atomic.h: Define atomic_delay.
	* sysdeps/x86_64/bits/atomic.h: Likewise.

	* miscd/sys/cdefs.h (__NTH): New macro.
	(__THROW): Define using nothrow attribute for C code and gcc >= 3.2.
	(__REDIRECT_NTH): New macro.
	* argp/argp.h: Use __NTH and __REDIRECT_NTH where necessary.
	* ctype/ctype.h: Likewise.
	* dirent/dirent.h: Likewise.
	* io/fcntl.h: Likewise.
	* io/sys/sendfile.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statfs.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* libio/bits/stdio.h: Likewise.
	* misc/sys/mman.h: Likewise.
	* posix/unistd.h: Likewise.
	* resource/sys/resource.h: Likewise.
	* rt/aio.h: Likewise.
	* signal/signal.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/argz.h: Likewise.
	* string/string.h: Likewise.
	* sysdeps/generic/inttypes.h: Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h: Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/sys/sysmacros.h: Likewise.
	* wcsmbs/wchar.h: Likewise.

	* sysdeps/generic/glob.c: Use __PMT isntead of __P where appropriate.

	* resolv/gethnamaddr.c (getanswer): Remove __P use in variable
	definition.

	* io/sys/poll.h: Remove __THROW from poll prototype, it's a
	cancellation point.
-rw-r--r--ChangeLog42
-rw-r--r--argp/argp.h11
-rw-r--r--ctype/ctype.h6
-rw-r--r--dirent/dirent.h24
-rw-r--r--include/atomic.h17
-rw-r--r--io/fcntl.h10
-rw-r--r--io/sys/sendfile.h11
-rw-r--r--io/sys/stat.h63
-rw-r--r--io/sys/statfs.h16
-rw-r--r--io/sys/statvfs.h17
-rw-r--r--libio/bits/stdio.h4
-rw-r--r--misc/sys/cdefs.h22
-rw-r--r--misc/sys/mman.h12
-rw-r--r--posix/unistd.h32
-rw-r--r--resource/sys/resource.h17
-rw-r--r--rt/aio.h58
-rw-r--r--signal/signal.h9
-rw-r--r--stdlib/stdlib.h40
-rw-r--r--string/argz.h10
-rw-r--r--string/string.h10
-rw-r--r--sysdeps/generic/inttypes.h32
-rw-r--r--sysdeps/i386/fpu/bits/mathinline.h42
-rw-r--r--sysdeps/i386/i486/bits/atomic.h3
-rw-r--r--sysdeps/powerpc/fpu/bits/mathinline.h28
-rw-r--r--sysdeps/s390/fpu/bits/mathinline.h14
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h4
-rw-r--r--sysdeps/unix/sysv/linux/sys/sysmacros.h8
-rw-r--r--sysdeps/x86_64/bits/atomic.h5
-rw-r--r--sysdeps/x86_64/fpu/bits/mathinline.h8
-rw-r--r--wcsmbs/wchar.h47
30 files changed, 347 insertions, 275 deletions
diff --git a/ChangeLog b/ChangeLog
index 944416412f..968756a24d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,47 @@
 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
 
+	* include/atomic.h: Define atomic_increment_val, atomic_decrement_val,
+	and atomic_dealy is not already defined.
+	* sysdeps/i386/i486/bits/atomic.h: Define atomic_delay.
+	* sysdeps/x86_64/bits/atomic.h: Likewise.
+
+	* miscd/sys/cdefs.h (__NTH): New macro.
+	(__THROW): Define using nothrow attribute for C code and gcc >= 3.2.
+	(__REDIRECT_NTH): New macro.
+	* argp/argp.h: Use __NTH and __REDIRECT_NTH where necessary.
+	* ctype/ctype.h: Likewise.
+	* dirent/dirent.h: Likewise.
+	* io/fcntl.h: Likewise.
+	* io/sys/sendfile.h: Likewise.
+	* io/sys/stat.h: Likewise.
+	* io/sys/statfs.h: Likewise.
+	* io/sys/statvfs.h: Likewise.
+	* libio/bits/stdio.h: Likewise.
+	* misc/sys/mman.h: Likewise.
+	* posix/unistd.h: Likewise.
+	* resource/sys/resource.h: Likewise.
+	* rt/aio.h: Likewise.
+	* signal/signal.h: Likewise.
+	* stdlib/stdlib.h: Likewise.
+	* string/argz.h: Likewise.
+	* string/string.h: Likewise.
+	* sysdeps/generic/inttypes.h: Likewise.
+	* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
+	* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
+	* sysdeps/s390/fpu/bits/mathinline.h: Likewise.
+	* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
+	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
+	* sysdeps/unix/sysv/linux/bits/sys/sysmacros.h: Likewise.
+	* wcsmbs/wchar.h: Likewise.
+
+	* sysdeps/generic/glob.c: Use __PMT isntead of __P where appropriate.
+
+	* resolv/gethnamaddr.c (getanswer): Remove __P use in variable
+	definition.
+
+	* io/sys/poll.h: Remove __THROW from poll prototype, it's a
+	cancellation point.
+
 	* io/fts.c (fts_open): Remove uses of __P.
 
 	* include/stdlib.h: No need to use __THROW in this header.
diff --git a/argp/argp.h b/argp/argp.h
index 78a9d1bb3c..008e039f9e 100644
--- a/argp/argp.h
+++ b/argp/argp.h
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing, layered over getopt.
-   Copyright (C) 1995,1996,1997,1998,1999,2003 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -35,6 +35,9 @@
 #ifndef __THROW
 # define __THROW
 #endif
+#ifndef __NTH
+# define __NTH(fct) fct __THROW
+#endif
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */
@@ -558,13 +561,13 @@ extern void *__argp_input (__const struct argp *__restrict __argp,
 # endif
 
 ARGP_EI void
-__argp_usage (__const struct argp_state *__state) __THROW
+__NTH (__argp_usage (__const struct argp_state *__state))
 {
   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
 }
 
 ARGP_EI int
-__option_is_short (__const struct argp_option *__opt) __THROW
+__NTH (__option_is_short (__const struct argp_option *__opt))
 {
   if (__opt->flags & OPTION_DOC)
     return 0;
@@ -576,7 +579,7 @@ __option_is_short (__const struct argp_option *__opt) __THROW
 }
 
 ARGP_EI int
-__option_is_end (__const struct argp_option *__opt) __THROW
+__NTH (__option_is_end (__const struct argp_option *__opt))
 {
   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
 }
diff --git a/ctype/ctype.h b/ctype/ctype.h
index c7290ed731..e08545359d 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,02
+/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004
    	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -188,13 +188,13 @@ __exctype (_tolower);
 
 # ifdef __USE_EXTERN_INLINES
 extern __inline int
-tolower (int __c) __THROW
+__NTH (tolower (int __c))
 {
   return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
 }
 
 extern __inline int
-toupper (int __c) __THROW
+__NTH (toupper (int __c))
 {
   return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
 }
diff --git a/dirent/dirent.h b/dirent/dirent.h
index 319fb745a1..173d0eba97 100644
--- a/dirent/dirent.h
+++ b/dirent/dirent.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000, 2003, 2004 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
@@ -268,9 +268,9 @@ extern int alphasort (__const void *__e1, __const void *__e2)
      __THROW __attribute_pure__;
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (alphasort,
-		       (__const void *__e1, __const void *__e2) __THROW,
-		       alphasort64) __attribute_pure__;
+extern int __REDIRECT_NTH (alphasort,
+			   (__const void *__e1, __const void *__e2),
+			   alphasort64) __attribute_pure__;
 #  else
 #   define alphasort alphasort64
 #  endif
@@ -288,9 +288,9 @@ extern int versionsort (__const void *__e1, __const void *__e2)
      __THROW __attribute_pure__;
 #  else
 #   ifdef __REDIRECT
-extern int __REDIRECT (versionsort,
-		       (__const void *__e1, __const void *__e2) __THROW,
-		       versionsort64) __attribute_pure__;
+extern int __REDIRECT_NTH (versionsort,
+			   (__const void *__e1, __const void *__e2),
+			   versionsort64) __attribute_pure__;
 #   else
 #    define versionsort versionsort64
 #   endif
@@ -312,11 +312,11 @@ extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
 				__off_t *__restrict __basep) __THROW;
 # else
 #  ifdef __REDIRECT
-extern __ssize_t __REDIRECT (getdirentries,
-			     (int __fd, char *__restrict __buf,
-			      size_t __nbytes,
-			      __off64_t *__restrict __basep) __THROW,
-			     getdirentries64);
+extern __ssize_t __REDIRECT_NTH (getdirentries,
+				 (int __fd, char *__restrict __buf,
+				  size_t __nbytes,
+				  __off64_t *__restrict __basep),
+				 getdirentries64);
 #  else
 #   define getdirentries getdirentries64
 #  endif
diff --git a/include/atomic.h b/include/atomic.h
index 092b6e00a3..8a23f6ee9e 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -1,5 +1,5 @@
 /* Internal macros for atomic operations for GNU C Library.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -151,6 +151,11 @@
 #endif
 
 
+#ifndef atomic_increment_val
+# define atomic_increment_val(mem) (atomic_exchange_and_add ((mem), 1) + 1)
+#endif
+
+
 /* Add one to *MEM and return true iff it's now zero.  */
 #ifndef atomic_increment_and_test
 # define atomic_increment_and_test(mem) \
@@ -163,6 +168,11 @@
 #endif
 
 
+#ifndef atomic_decrement_val
+# define atomic_decrement_val(mem) (atomic_exchange_and_add ((mem), -1) - 1)
+#endif
+
+
 /* Subtract 1 from *MEM and return true iff it's now zero.  */
 #ifndef atomic_decrement_and_test
 # define atomic_decrement_and_test(mem) \
@@ -243,4 +253,9 @@
 # define atomic_write_barrier() atomic_full_barrier ()
 #endif
 
+
+#ifndef atomic_delay
+# define atomic_delay() do { /* nothing */ } while (0)
+#endif
+
 #endif	/* atomic.h */
diff --git a/io/fcntl.h b/io/fcntl.h
index b81a5b7230..b1a9f65387 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994-2001,2003,2004 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
@@ -136,10 +136,10 @@ extern int lockf64 (int __fd, int __cmd, __off64_t __len);
 extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
 			  int __advise) __THROW;
 # else
-# ifdef __REDIRECT
-extern int __REDIRECT (posix_fadvise, (int __fd, __off64_t __offset,
-				       __off64_t __len, int __advise) __THROW,
-		       posix_fadvise64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset,
+					   __off64_t __len, int __advise),
+			   posix_fadvise64);
 # else
 #  define posix_fadvise posix_fadvise64
 # endif
diff --git a/io/sys/sendfile.h b/io/sys/sendfile.h
index 797822b9fe..4c1367b6be 100644
--- a/io/sys/sendfile.h
+++ b/io/sys/sendfile.h
@@ -1,5 +1,5 @@
 /* sendfile -- copy data directly from one file descriptor to another
-   Copyright (C) 1998,99,01,2002 Free Software Foundation, Inc.
+   Copyright (C) 1998,99,01,2002,2004 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
@@ -34,11 +34,10 @@ __BEGIN_DECLS
 extern ssize_t sendfile (int __out_fd, int __in_fd, off_t *__offset,
 			 size_t __count) __THROW;
 #else
-# ifdef __REDIRECT
-extern ssize_t __REDIRECT (sendfile,
-			   (int __out_fd, int __in_fd, __off64_t *__offset,
-			    size_t __count) __THROW,
-			   sendfile64);
+# ifdef __REDIRECT_NTH
+extern ssize_t __REDIRECT_NTH (sendfile,
+			       (int __out_fd, int __in_fd, __off64_t *__offset,
+				size_t __count), sendfile64);
 # else
 #  define sendfile sendfile64
 # endif
diff --git a/io/sys/stat.h b/io/sys/stat.h
index e71006a43d..abe68860cb 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -211,12 +211,10 @@ extern int stat (__const char *__restrict __file,
    that file descriptor FD is open on and put them in BUF.  */
 extern int fstat (int __fd, struct stat *__buf) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (stat,
-		       (__const char *__restrict __file,
-			struct stat *__restrict __buf) __THROW,
-		       stat64);
-extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (stat, (__const char *__restrict __file,
+				  struct stat *__restrict __buf), stat64);
+extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64);
 # else
 #  define stat stat64
 #  define fstat fstat64
@@ -235,11 +233,10 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW;
 extern int lstat (__const char *__restrict __file,
 		  struct stat *__restrict __buf) __THROW;
 # else
-#  ifdef __REDIRECT
-extern int __REDIRECT (lstat,
-		       (__const char *__restrict __file,
-			struct stat *__restrict __buf) __THROW,
-		       lstat64);
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (lstat,
+			   (__const char *__restrict __file,
+			    struct stat *__restrict __buf), lstat64);
 #  else
 #   define lstat lstat64
 #  endif
@@ -322,15 +319,13 @@ extern int __xstat (int __ver, __const char *__filename,
 extern int __lxstat (int __ver, __const char *__filename,
 		     struct stat *__stat_buf) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (__fxstat, (int __ver, int __fildes,
-				  struct stat *__stat_buf) __THROW,
-		       __fxstat64);
-extern int __REDIRECT (__xstat, (int __ver, __const char *__filename,
-				 struct stat *__stat_buf) __THROW, __xstat64);
-extern int __REDIRECT (__lxstat, (int __ver, __const char *__filename,
-				  struct stat *__stat_buf) __THROW,
-		       __lxstat64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (__fxstat, (int __ver, int __fildes,
+				      struct stat *__stat_buf), __fxstat64);
+extern int __REDIRECT_NTH (__xstat, (int __ver, __const char *__filename,
+				     struct stat *__stat_buf), __xstat64);
+extern int __REDIRECT_NTH (__lxstat, (int __ver, __const char *__filename,
+				      struct stat *__stat_buf), __lxstat64);
 
 # else
 #  define __fxstat __fxstat64
@@ -353,28 +348,29 @@ extern int __xmknod (int __ver, __const char *__path, __mode_t __mode,
 #if defined __GNUC__ && __GNUC__ >= 2
 /* Inlined versions of the real stat and mknod functions.  */
 
-extern __inline__ int stat (__const char *__path,
-			    struct stat *__statbuf) __THROW
+extern __inline__ int
+__NTH (stat (__const char *__path, struct stat *__statbuf))
 {
   return __xstat (_STAT_VER, __path, __statbuf);
 }
 
 # if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-extern __inline__ int lstat (__const char *__path,
-			     struct stat *__statbuf) __THROW
+extern __inline__ int
+__NTH (lstat (__const char *__path, struct stat *__statbuf))
 {
   return __lxstat (_STAT_VER, __path, __statbuf);
 }
 # endif
 
-extern __inline__ int fstat (int __fd, struct stat *__statbuf) __THROW
+extern __inline__ int
+__NTH (fstat (int __fd, struct stat *__statbuf))
 {
   return __fxstat (_STAT_VER, __fd, __statbuf);
 }
 
 # if defined __USE_MISC || defined __USE_BSD
-extern __inline__ int mknod (__const char *__path, __mode_t __mode,
-			     __dev_t __dev) __THROW
+extern __inline__ int
+__NTH (mknod (__const char *__path, __mode_t __mode, __dev_t __dev))
 {
   return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
 }
@@ -382,22 +378,23 @@ extern __inline__ int mknod (__const char *__path, __mode_t __mode,
 
 # if defined __USE_LARGEFILE64 \
   && (! defined __USE_FILE_OFFSET64 \
-      || (defined __REDIRECT && defined __OPTIMIZE__))
-extern __inline__ int stat64 (__const char *__path,
-			      struct stat64 *__statbuf) __THROW
+      || (defined __REDIRECT_NTH && defined __OPTIMIZE__))
+extern __inline__ int
+__NTH (stat64 (__const char *__path, struct stat64 *__statbuf))
 {
   return __xstat64 (_STAT_VER, __path, __statbuf);
 }
 
 #  if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-extern __inline__ int lstat64 (__const char *__path,
-			       struct stat64 *__statbuf) __THROW
+extern __inline__ int
+__NTH (lstat64 (__const char *__path, struct stat64 *__statbuf))
 {
   return __lxstat64 (_STAT_VER, __path, __statbuf);
 }
 #  endif
 
-extern __inline__ int fstat64 (int __fd, struct stat64 *__statbuf) __THROW
+extern __inline__ int
+__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
 {
   return __fxstat64 (_STAT_VER, __fd, __statbuf);
 }
diff --git a/io/sys/statfs.h b/io/sys/statfs.h
index 969d9d0e58..c93d8f1d44 100644
--- a/io/sys/statfs.h
+++ b/io/sys/statfs.h
@@ -1,5 +1,5 @@
 /* Definitions for getting information about a filesystem.
-   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2004 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
@@ -31,10 +31,10 @@ __BEGIN_DECLS
 #ifndef __USE_FILE_OFFSET64
 extern int statfs (__const char *__file, struct statfs *__buf) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (statfs,
-		       (__const char *__file, struct statfs *__buf) __THROW,
-		       statfs64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (statfs,
+			   (__const char *__file, struct statfs *__buf),
+			   statfs64);
 # else
 #  define statfs statfs64
 # endif
@@ -48,9 +48,9 @@ extern int statfs64 (__const char *__file, struct statfs64 *__buf) __THROW;
 #ifndef __USE_FILE_OFFSET64
 extern int fstatfs (int __fildes, struct statfs *__buf) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (fstatfs, (int __fildes, struct statfs *__buf) __THROW,
-		       fstatfs64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf),
+			   fstatfs64);
 # else
 #  define fstatfs fstatfs64
 # endif
diff --git a/io/sys/statvfs.h b/io/sys/statvfs.h
index f34f8d318e..7c6c90fae0 100644
--- a/io/sys/statvfs.h
+++ b/io/sys/statvfs.h
@@ -1,5 +1,5 @@
 /* Definitions for getting information about a filesystem.
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2004 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
@@ -52,11 +52,10 @@ __BEGIN_DECLS
 extern int statvfs (__const char *__restrict __file,
 		    struct statvfs *__restrict __buf) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (statvfs,
-		       (__const char *__restrict __file,
-			struct statvfs *__restrict __buf) __THROW,
-		       statvfs64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (statvfs,
+			   (__const char *__restrict __file,
+			    struct statvfs *__restrict __buf), statvfs64);
 # else
 #  define statvfs statvfs64
 # endif
@@ -71,9 +70,9 @@ extern int statvfs64 (__const char *__restrict __file,
 #ifndef __USE_FILE_OFFSET64
 extern int fstatvfs (int __fildes, struct statvfs *__buf) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (fstatvfs, (int __fildes, struct statvfs *__buf) __THROW,
-		       fstatvfs64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatvfs, (int __fildes, struct statvfs *__buf),
+			   fstatvfs64);
 # else
 #  define fstatvfs fstatvfs64
 # endif
diff --git a/libio/bits/stdio.h b/libio/bits/stdio.h
index 60c937f072..9e951ad8e4 100644
--- a/libio/bits/stdio.h
+++ b/libio/bits/stdio.h
@@ -109,14 +109,14 @@ getline (char **__lineptr, size_t *__n, FILE *__stream)
 # ifdef __USE_MISC
 /* Faster versions when locking is not required.  */
 __STDIO_INLINE int
-feof_unlocked (FILE *__stream) __THROW
+__NTH (feof_unlocked (FILE *__stream))
 {
   return _IO_feof_unlocked (__stream);
 }
 
 /* Faster versions when locking is not required.  */
 __STDIO_INLINE int
-ferror_unlocked (FILE *__stream) __THROW
+__NTH (ferror_unlocked (FILE *__stream))
 {
   return _IO_ferror_unlocked (__stream);
 }
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 18143058fa..3c53ca707d 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2001, 2002, 2004 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
@@ -39,11 +39,20 @@
 
 /* GCC can always grok prototypes.  For C++ programs we add throw()
    to help it optimize the function calls.  But this works only with
-   gcc 2.8.x and egcs.  */
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
-#  define __THROW	throw ()
+   gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
+   as non-throwing using a function attribute since programs can use
+   the -fexceptions options for C code as well.  */
+# if !defined __cplusplus && __GNUC_PREREQ (3, 2)
+#  define __THROW	__attribute__ ((__nothrow__))
+#  define __NTH(fct)	__attribute__ ((__nothrow__)) fct
 # else
-#  define __THROW
+#  if defined __cplusplus && __GNUC_PREREQ (2,8)
+#   define __THROW	throw ()
+#   define __NTH(fct)	fct throw ()
+#  else
+#   define __THROW
+#   define __NTH(fct)	fct
+#  endif
 # endif
 # define __P(args)	args __THROW
 /* This macro will be used for functions which might take C++ callback
@@ -55,6 +64,7 @@
 # define __inline		/* No inline functions.  */
 
 # define __THROW
+# define __NTH(fct)	fct
 # define __P(args)	args
 # define __PMT(args)	args
 
@@ -149,6 +159,8 @@
 #if defined __GNUC__ && __GNUC__ >= 2
 
 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
+# define __REDIRECT_NTH(name, proto, alias) \
+     name proto __asm__ (__ASMNAME (#alias)) __THROW
 # define __ASMNAME(cname)  __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
 # define __ASMNAME2(prefix, cname) __STRING (prefix) cname
 
diff --git a/misc/sys/mman.h b/misc/sys/mman.h
index 5e37278df3..ae4dd64fc6 100644
--- a/misc/sys/mman.h
+++ b/misc/sys/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for BSD-style memory management.
-   Copyright (C) 1994-1999, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1994-2000, 2003, 2004 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
@@ -58,11 +58,11 @@ __BEGIN_DECLS
 extern void *mmap (void *__addr, size_t __len, int __prot,
 		   int __flags, int __fd, __off_t __offset) __THROW;
 #else
-# ifdef __REDIRECT
-extern void * __REDIRECT (mmap,
-			  (void *__addr, size_t __len, int __prot,
-			   int __flags, int __fd, __off64_t __offset) __THROW,
-			  mmap64);
+# ifdef __REDIRECT_NTH
+extern void * __REDIRECT_NTH (mmap,
+			      (void *__addr, size_t __len, int __prot,
+			       int __flags, int __fd, __off64_t __offset),
+			      mmap64);
 # else
 #  define mmap mmap64
 # endif
diff --git a/posix/unistd.h b/posix/unistd.h
index 72167483d7..52a0185115 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -285,11 +285,10 @@ extern int euidaccess (__const char *__name, int __type) __THROW;
 #ifndef __USE_FILE_OFFSET64
 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
 #else
-# ifdef __REDIRECT
-extern __off64_t __REDIRECT (lseek,
-			     (int __fd, __off64_t __offset, int __whence)
-			     __THROW,
-			     lseek64);
+# ifdef __REDIRECT_NTH
+extern __off64_t __REDIRECT_NTH (lseek,
+				 (int __fd, __off64_t __offset, int __whence),
+				 lseek64);
 # else
 #  define lseek lseek64
 # endif
@@ -550,8 +549,8 @@ extern __pid_t getppid (void) __THROW;
 #ifndef __FAVOR_BSD
 extern __pid_t getpgrp (void) __THROW;
 #else
-# ifdef __REDIRECT
-extern __pid_t __REDIRECT (getpgrp, (__pid_t __pid) __THROW, __getpgid);
+# ifdef __REDIRECT_NTH
+extern __pid_t __REDIRECT_NTH (getpgrp, (__pid_t __pid), __getpgid);
 # else
 #  define getpgrp __getpgid
 # endif
@@ -589,9 +588,8 @@ extern int setpgrp (void) __THROW;
 # else
 
 /* Another name for `setpgid' (above).  */
-#  ifdef __REDIRECT
-extern int __REDIRECT (setpgrp, (__pid_t __pid, __pid_t __pgrp) __THROW,
-		       setpgid);
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (setpgrp, (__pid_t __pid, __pid_t __pgrp), setpgid);
 #  else
 #   define setpgrp setpgid
 #  endif
@@ -876,10 +874,10 @@ extern int getpagesize (void)  __THROW __attribute__ ((__const__));
 # ifndef __USE_FILE_OFFSET64
 extern int truncate (__const char *__file, __off_t __length) __THROW;
 # else
-#  ifdef __REDIRECT
-extern int __REDIRECT (truncate,
-		       (__const char *__file, __off64_t __length) __THROW,
-		       truncate64);
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (truncate,
+			   (__const char *__file, __off64_t __length),
+			   truncate64);
 #  else
 #   define truncate truncate64
 #  endif
@@ -892,9 +890,9 @@ extern int truncate64 (__const char *__file, __off64_t __length) __THROW;
 # ifndef __USE_FILE_OFFSET64
 extern int ftruncate (int __fd, __off_t __length) __THROW;
 # else
-#  ifdef __REDIRECT
-extern int __REDIRECT (ftruncate, (int __fd, __off64_t __length) __THROW,
-		       ftruncate64);
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length),
+			   ftruncate64);
 #  else
 #   define ftruncate ftruncate64
 #  endif
diff --git a/resource/sys/resource.h b/resource/sys/resource.h
index 3dd2da9291..3912741376 100644
--- a/resource/sys/resource.h
+++ b/resource/sys/resource.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,94,96,97,98,99,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992,94,1996-2000,2002,2004 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
@@ -51,10 +51,9 @@ typedef int __priority_which_t;
 extern int getrlimit (__rlimit_resource_t __resource,
 		      struct rlimit *__rlimits) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (getrlimit, (__rlimit_resource_t __resource,
-				   struct rlimit *__rlimits) __THROW,
-		       getrlimit64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,
+				       struct rlimit *__rlimits), getrlimit64);
 # else
 #  define getrlimit getrlimit64
 # endif
@@ -71,10 +70,10 @@ extern int getrlimit64 (__rlimit_resource_t __resource,
 extern int setrlimit (__rlimit_resource_t __resource,
 		      __const struct rlimit *__rlimits) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (setrlimit, (__rlimit_resource_t __resource,
-				   __const struct rlimit *__rlimits) __THROW,
-		       setrlimit64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
+				       __const struct rlimit *__rlimits),
+			   setrlimit64);
 # else
 #  define setrlimit setrlimit64
 # endif
diff --git a/rt/aio.h b/rt/aio.h
index 12c8eeaf04..35dc196426 100644
--- a/rt/aio.h
+++ b/rt/aio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000,2003,2004 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
@@ -172,35 +172,33 @@ extern int aio_suspend (__const struct aiocb *__const __list[], int __nent,
    `aio_fildes' member of AIOCBP.  */
 extern int aio_fsync (int __operation, struct aiocb *__aiocbp) __THROW;
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (aio_read, (struct aiocb *__aiocbp) __THROW, aio_read64);
-extern int __REDIRECT (aio_write, (struct aiocb *__aiocbp) __THROW,
-		       aio_write64);
-
-extern int __REDIRECT (lio_listio,
-		       (int __mode,
-			struct aiocb *__const __list[__restrict_arr],
-			int __nent, struct sigevent *__restrict __sig) __THROW,
-		       lio_listio64);
-
-extern int __REDIRECT (aio_error, (__const struct aiocb *__aiocbp) __THROW,
-		       aio_error64);
-extern __ssize_t __REDIRECT (aio_return, (struct aiocb *__aiocbp) __THROW,
-			     aio_return64);
-
-extern int __REDIRECT (aio_cancel,
-		       (int __fildes, struct aiocb *__aiocbp) __THROW,
-		       aio_cancel64);
-
-extern int __REDIRECT (aio_suspend,
-		       (__const struct aiocb *__const __list[],
-			int __nent,
-			__const struct timespec *__restrict __timeout) __THROW,
-		       aio_suspend64);
-
-extern int __REDIRECT (aio_fsync,
-		       (int __operation, struct aiocb *__aiocbp) __THROW,
-		       aio_fsync64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (aio_read, (struct aiocb *__aiocbp), aio_read64);
+extern int __REDIRECT_NTH (aio_write, (struct aiocb *__aiocbp), aio_write64);
+
+extern int __REDIRECT_NTH (lio_listio,
+			   (int __mode,
+			    struct aiocb *__const __list[__restrict_arr],
+			    int __nent, struct sigevent *__restrict __sig),
+			   lio_listio64);
+
+extern int __REDIRECT_NTH (aio_error, (__const struct aiocb *__aiocbp),
+			   aio_error64);
+extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
+				 aio_return64);
+
+extern int __REDIRECT_NTH (aio_cancel,
+			   (int __fildes, struct aiocb *__aiocbp),
+			   aio_cancel64);
+
+extern int __REDIRECT_NTH (aio_suspend,
+			   (__const struct aiocb *__const __list[], int __nent,
+			    __const struct timespec *__restrict __timeout),
+			   aio_suspend64);
+
+extern int __REDIRECT_NTH (aio_fsync,
+			   (int __operation, struct aiocb *__aiocbp),
+			   aio_fsync64);
 
 # else
 #  define aio_read aio_read64
diff --git a/signal/signal.h b/signal/signal.h
index 4df5603e2c..e99ef28d96 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -92,11 +92,10 @@ __BEGIN_NAMESPACE_STD
 extern __sighandler_t signal (int __sig, __sighandler_t __handler) __THROW;
 #else
 /* Make sure the used `signal' implementation is the SVID version. */
-# ifdef __REDIRECT
-extern __sighandler_t __REDIRECT (signal,
-				  (int __sig,
-				   __sighandler_t __handler) __THROW,
-				  __sysv_signal);
+# ifdef __REDIRECT_NTH
+extern __sighandler_t __REDIRECT_NTH (signal,
+				      (int __sig, __sighandler_t __handler),
+				      __sysv_signal);
 # else
 #  define signal __sysv_signal
 # endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 1349753b78..e178568dd3 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002, 2003, 2004 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
@@ -306,19 +306,19 @@ extern unsigned long long int __strtoull_internal (__const char *
 
 __BEGIN_NAMESPACE_STD
 extern __inline double
-strtod (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
+__NTH (strtod (__const char *__restrict __nptr, char **__restrict __endptr))
 {
   return __strtod_internal (__nptr, __endptr, 0);
 }
 extern __inline long int
-strtol (__const char *__restrict __nptr, char **__restrict __endptr,
-	int __base) __THROW
+__NTH (strtol (__const char *__restrict __nptr, char **__restrict __endptr,
+	       int __base))
 {
   return __strtol_internal (__nptr, __endptr, __base, 0);
 }
 extern __inline unsigned long int
-strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
-	 int __base) __THROW
+__NTH (strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
+		int __base))
 {
   return __strtoul_internal (__nptr, __endptr, __base, 0);
 }
@@ -327,12 +327,12 @@ __END_NAMESPACE_STD
 # ifdef __USE_ISOC99
 __BEGIN_NAMESPACE_C99
 extern __inline float
-strtof (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
+__NTH (strtof (__const char *__restrict __nptr, char **__restrict __endptr))
 {
   return __strtof_internal (__nptr, __endptr, 0);
 }
 extern __inline long double
-strtold (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
+__NTH (strtold (__const char *__restrict __nptr, char **__restrict __endptr))
 {
   return __strtold_internal (__nptr, __endptr, 0);
 }
@@ -341,14 +341,14 @@ __END_NAMESPACE_C99
 
 # ifdef __USE_BSD
 __extension__ extern __inline long long int
-strtoq (__const char *__restrict __nptr, char **__restrict __endptr,
-	int __base) __THROW
+__NTH (strtoq (__const char *__restrict __nptr, char **__restrict __endptr,
+	       int __base))
 {
   return __strtoll_internal (__nptr, __endptr, __base, 0);
 }
 __extension__ extern __inline unsigned long long int
-strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
-	 int __base) __THROW
+__NTH (strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
+		int __base))
 {
   return __strtoull_internal (__nptr, __endptr, __base, 0);
 }
@@ -357,14 +357,14 @@ strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
 # if defined __USE_MISC || defined __USE_ISOC99
 __BEGIN_NAMESPACE_C99
 __extension__ extern __inline long long int
-strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
-	 int __base) __THROW
+__NTH (strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
+		int __base))
 {
   return __strtoll_internal (__nptr, __endptr, __base, 0);
 }
 __extension__ extern __inline unsigned long long int
-strtoull (__const char * __restrict __nptr, char **__restrict __endptr,
-	  int __base) __THROW
+__NTH (strtoull (__const char * __restrict __nptr, char **__restrict __endptr,
+		 int __base))
 {
   return __strtoull_internal (__nptr, __endptr, __base, 0);
 }
@@ -373,17 +373,17 @@ __END_NAMESPACE_C99
 
 __BEGIN_NAMESPACE_STD
 extern __inline double
-atof (__const char *__nptr) __THROW
+__NTH (atof (__const char *__nptr))
 {
   return strtod (__nptr, (char **) NULL);
 }
 extern __inline int
-atoi (__const char *__nptr) __THROW
+__NTH (atoi (__const char *__nptr))
 {
   return (int) strtol (__nptr, (char **) NULL, 10);
 }
 extern __inline long int
-atol (__const char *__nptr) __THROW
+__NTH (atol (__const char *__nptr))
 {
   return strtol (__nptr, (char **) NULL, 10);
 }
@@ -392,7 +392,7 @@ __END_NAMESPACE_STD
 # if defined __USE_MISC || defined __USE_ISOC99
 __BEGIN_NAMESPACE_C99
 __extension__ extern __inline long long int
-atoll (__const char *__nptr) __THROW
+__NTH (atoll (__const char *__nptr))
 {
   return strtoll (__nptr, (char **) NULL, 10);
 }
diff --git a/string/argz.h b/string/argz.h
index b083d8e1a9..dd7e4706c7 100644
--- a/string/argz.h
+++ b/string/argz.h
@@ -1,5 +1,5 @@
 /* Routines for dealing with '\0' separated arg vectors.
-   Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995,96,97,98,99,2000,2004 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
@@ -161,8 +161,8 @@ extern char *argz_next (__const char *__restrict __argz, size_t __argz_len,
 
 #ifdef __USE_EXTERN_INLINES
 extern inline char *
-__argz_next (__const char *__argz, size_t __argz_len,
-	     __const char *__entry) __THROW
+__NTH (__argz_next (__const char *__argz, size_t __argz_len,
+		    __const char *__entry))
 {
   if (__entry)
     {
@@ -175,8 +175,8 @@ __argz_next (__const char *__argz, size_t __argz_len,
     return __argz_len > 0 ? (char *) __argz : 0;
 }
 extern inline char *
-argz_next (__const char *__argz, size_t __argz_len,
-	   __const char *__entry) __THROW
+__NTH (argz_next (__const char *__argz, size_t __argz_len,
+		  __const char *__entry))
 {
   return __argz_next (__argz, __argz_len, __entry);
 }
diff --git a/string/string.h b/string/string.h
index 19dd9c3188..d62594bc4c 100644
--- a/string/string.h
+++ b/string/string.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1995-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1995-2003, 2004 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
@@ -253,10 +253,10 @@ __END_NAMESPACE_STD
 # if defined __USE_XOPEN2K && !defined __USE_GNU
 /* Fill BUF with a string describing the meaning of the `errno' code in
    ERRNUM.  */
-#  ifdef __REDIRECT
-extern int __REDIRECT (strerror_r,
-		       (int __errnum, char *__buf, size_t __buflen),
-		       __xpg_strerror_r) __THROW;
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (strerror_r,
+			   (int __errnum, char *__buf, size_t __buflen),
+			   __xpg_strerror_r);
 #  else
 extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
      __THROW;
diff --git a/sysdeps/generic/inttypes.h b/sysdeps/generic/inttypes.h
index 4ac6815623..87f532f1d4 100644
--- a/sysdeps/generic/inttypes.h
+++ b/sysdeps/generic/inttypes.h
@@ -331,8 +331,8 @@ extern long int __strtol_internal (__const char *__restrict __nptr,
 #   define __strtol_internal_defined	1
 #  endif
 extern __inline intmax_t
-strtoimax (__const char *__restrict nptr, char **__restrict endptr,
-	   int base) __THROW
+__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
+		  int base))
 {
   return __strtol_internal (nptr, endptr, base, 0);
 }
@@ -346,8 +346,8 @@ extern unsigned long int __strtoul_internal (__const char *
 #   define __strtoul_internal_defined	1
 #  endif
 extern __inline uintmax_t
-strtoumax (__const char *__restrict nptr, char **__restrict endptr,
-	   int base) __THROW
+__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
+		  int base))
 {
   return __strtoul_internal (nptr, endptr, base, 0);
 }
@@ -360,8 +360,8 @@ extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr,
 #   define __wcstol_internal_defined	1
 #  endif
 extern __inline intmax_t
-wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr,
-	   int base) __THROW
+__NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
+		  __gwchar_t **__restrict endptr, int base))
 {
   return __wcstol_internal (nptr, endptr, base, 0);
 }
@@ -377,8 +377,8 @@ extern unsigned long int __wcstoul_internal (__const __gwchar_t *
 #   define __wcstoul_internal_defined	1
 #  endif
 extern __inline uintmax_t
-wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr,
-	   int base) __THROW
+__NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
+		  __gwchar_t **__restrict endptr, int base))
 {
   return __wcstoul_internal (nptr, endptr, base, 0);
 }
@@ -394,8 +394,8 @@ extern long long int __strtoll_internal (__const char *__restrict __nptr,
 #   define __strtoll_internal_defined	1
 #  endif
 extern __inline intmax_t
-strtoimax (__const char *__restrict nptr, char **__restrict endptr,
-	   int base) __THROW
+__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
+		  int base))
 {
   return __strtoll_internal (nptr, endptr, base, 0);
 }
@@ -412,8 +412,8 @@ extern unsigned long long int __strtoull_internal (__const char *
 #   define __strtoull_internal_defined	1
 #  endif
 extern __inline uintmax_t
-strtoumax (__const char *__restrict nptr, char **__restrict endptr,
-	   int base) __THROW
+__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
+		  int base))
 {
   return __strtoull_internal (nptr, endptr, base, 0);
 }
@@ -428,8 +428,8 @@ extern long long int __wcstoll_internal (__const __gwchar_t *
 #   define __wcstoll_internal_defined	1
 #  endif
 extern __inline intmax_t
-wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr,
-	   int base) __THROW
+__NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
+		  __gwchar_t **__restrict endptr, int base))
 {
   return __wcstoll_internal (nptr, endptr, base, 0);
 }
@@ -447,8 +447,8 @@ extern unsigned long long int __wcstoull_internal (__const __gwchar_t *
 #   define __wcstoull_internal_defined	1
 #  endif
 extern __inline uintmax_t
-wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr,
-	   int base) __THROW
+__NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
+		  __gwchar_t **__restrict endptr, int base))
 {
   return __wcstoull_internal (nptr, endptr, base, 0);
 }
diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h
index 4256777db3..e04ce95099 100644
--- a/sysdeps/i386/fpu/bits/mathinline.h
+++ b/sysdeps/i386/fpu/bits/mathinline.h
@@ -125,19 +125,19 @@
 # if __GNUC_PREREQ (2, 8)
 /* Test for negative number.  Used in the signbit() macro.  */
 __MATH_INLINE int
-__signbitf (float __x) __THROW
+__NTH (__signbitf (float __x))
 {
   __extension__ union { float __f; int __i; } __u = { __f: __x };
   return __u.__i < 0;
 }
 __MATH_INLINE int
-__signbit (double __x) __THROW
+__NTH (__signbit (double __x))
 {
   __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
   return __u.__i[1] < 0;
 }
 __MATH_INLINE int
-__signbitl (long double __x) __THROW
+__NTH (__signbitl (long double __x))
 {
   __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
   return (__u.__i[2] & 0x8000) != 0;
@@ -203,7 +203,7 @@ __signbitl (long double __x) __THROW
   __inline_mathop_declNP_ (float_type, func, op, params)
 
 #define __inline_mathop_declNP_(float_type, func, op, params...) \
-  __MATH_INLINE float_type func (float_type __x) __THROW		      \
+  __MATH_INLINE float_type __NTH (func (float_type __x))		      \
   {									      \
     register float_type __result;					      \
     __asm __volatile__ (op : "=t" (__result) : params);			      \
@@ -256,7 +256,7 @@ __signbitl (long double __x) __THROW
   __inline_mathcodeNP_(float_type, func, arg, code)
 
 #define __inline_mathcodeNP_(float_type, func, arg, code) \
-  __MATH_INLINE float_type func (float_type arg) __THROW		      \
+  __MATH_INLINE float_type __NTH (func (float_type arg))		      \
   {									      \
     code;								      \
   }
@@ -267,7 +267,7 @@ __signbitl (long double __x) __THROW
   __inline_mathcodeNP2_ (float_type, func, arg1, arg2, code)
 
 #define __inline_mathcodeNP2_(float_type, func, arg1, arg2, code) \
-  __MATH_INLINE float_type func (float_type arg1, float_type arg2) __THROW    \
+  __MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2))    \
   {									      \
     code;								      \
   }
@@ -277,8 +277,8 @@ __signbitl (long double __x) __THROW
   __inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code)
 
 #define __inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code) \
-  __MATH_INLINE float_type func (float_type arg1, float_type arg2,	      \
-				 float_type arg3) __THROW		      \
+  __MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2,     \
+					float_type arg3))		      \
   {									      \
     code;								      \
   }
@@ -341,19 +341,19 @@ __inline_mathcode (__pow2, __x, \
   *__cosx = __cosr
 
 __MATH_INLINE void
-__sincos (double __x, double *__sinx, double *__cosx) __THROW
+__NTH (__sincos (double __x, double *__sinx, double *__cosx))
 {
   __sincos_code;
 }
 
 __MATH_INLINE void
-__sincosf (float __x, float *__sinx, float *__cosx) __THROW
+__NTH (__sincosf (float __x, float *__sinx, float *__cosx))
 {
   __sincos_code;
 }
 
 __MATH_INLINE void
-__sincosl (long double __x, long double *__sinx, long double *__cosx) __THROW
+__NTH (__sincosl (long double __x, long double *__sinx, long double *__cosx))
 {
   __sincos_code;
 }
@@ -558,7 +558,7 @@ __inline_mathcodeNP (ceil, __x, \
   return __value
 
 __MATH_INLINE double
-ldexp (double __x, int __y) __THROW
+__NTH (ldexp (double __x, int __y))
 {
   __ldexp_code;
 }
@@ -628,13 +628,13 @@ __inline_mathop_declNP (log2, "fld1; fxch; fyl2x", "0" (__x) : "st(1)")
 #  endif
 
 __MATH_INLINE float
-ldexpf (float __x, int __y) __THROW
+__NTH (ldexpf (float __x, int __y))
 {
   __ldexp_code;
 }
 
 __MATH_INLINE long double
-ldexpl (long double __x, int __y) __THROW
+__NTH (ldexpl (long double __x, int __y))
 {
   __ldexp_code;
 }
@@ -651,17 +651,17 @@ __inline_mathopNP (rint, "frndint")
      : "=m" (__lrintres) : "t" (__x) : "st");				      \
   return __lrintres
 __MATH_INLINE long int
-lrintf (float __x) __THROW
+__NTH (lrintf (float __x))
 {
   __lrint_code;
 }
 __MATH_INLINE long int
-lrint (double __x) __THROW
+__NTH (lrint (double __x))
 {
   __lrint_code;
 }
 __MATH_INLINE long int
-lrintl (long double __x) __THROW
+__NTH (lrintl (long double __x))
 {
   __lrint_code;
 }
@@ -674,17 +674,17 @@ lrintl (long double __x) __THROW
      : "=m" (__llrintres) : "t" (__x) : "st");				      \
   return __llrintres
 __MATH_INLINE long long int
-llrintf (float __x) __THROW
+__NTH (llrintf (float __x))
 {
   __llrint_code;
 }
 __MATH_INLINE long long int
-llrint (double __x) __THROW
+__NTH (llrint (double __x))
 {
   __llrint_code;
 }
 __MATH_INLINE long long int
-llrintl (long double __x) __THROW
+__NTH (llrintl (long double __x))
 {
   __llrint_code;
 }
@@ -711,7 +711,7 @@ __inline_mathcodeNP2 (drem, __x, __y, \
 
 /* This function is used in the `isfinite' macro.  */
 __MATH_INLINE int
-__finite (double __x) __THROW
+__NTH (__finite (double __x))
 {
   return (__extension__
 	  (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1]
diff --git a/sysdeps/i386/i486/bits/atomic.h b/sysdeps/i386/i486/bits/atomic.h
index 7f3d534483..c748761758 100644
--- a/sysdeps/i386/i486/bits/atomic.h
+++ b/sysdeps/i386/i486/bits/atomic.h
@@ -361,3 +361,6 @@ typedef uintmax_t uatomic_max_t;
      else							      	      \
        abort ();							      \
      __result; })
+
+
+#define atomic_delay() asm ("rep; nop")
diff --git a/sysdeps/powerpc/fpu/bits/mathinline.h b/sysdeps/powerpc/fpu/bits/mathinline.h
index d9206d4fac..491d529091 100644
--- a/sysdeps/powerpc/fpu/bits/mathinline.h
+++ b/sysdeps/powerpc/fpu/bits/mathinline.h
@@ -61,13 +61,13 @@
 # if __GNUC_PREREQ (2, 8)
 /* Test for negative number.  Used in the signbit() macro.  */
 __MATH_INLINE int
-__signbitf (float __x) __THROW
+__NTH (__signbitf (float __x))
 {
   __extension__ union { float __f; int __i; } __u = { __f: __x };
   return __u.__i < 0;
 }
 __MATH_INLINE int
-__signbit (double __x) __THROW
+__NTH (__signbit (double __x))
 {
   __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
   return __u.__i[0] < 0;
@@ -82,7 +82,7 @@ __signbit (double __x) __THROW
 # ifndef __powerpc64__
 __MATH_INLINE long int lrint (double __x) __THROW;
 __MATH_INLINE long int
-lrint (double __x) __THROW
+__NTH (lrint (double __x))
 {
   union {
     double __d;
@@ -94,7 +94,7 @@ lrint (double __x) __THROW
 
 __MATH_INLINE long int lrintf (float __x) __THROW;
 __MATH_INLINE long int
-lrintf (float __x) __THROW
+__NTH (lrintf (float __x))
 {
   union {
     double __d;
@@ -107,14 +107,14 @@ lrintf (float __x) __THROW
 
 __MATH_INLINE double fdim (double __x, double __y) __THROW;
 __MATH_INLINE double
-fdim (double __x, double __y) __THROW
+__NTH (fdim (double __x, double __y))
 {
   return __x < __y ? 0 : __x - __y;
 }
 
 __MATH_INLINE float fdimf (float __x, float __y) __THROW;
 __MATH_INLINE float
-fdimf (float __x, float __y) __THROW
+__NTH (fdimf (float __x, float __y))
 {
   return __x < __y ? 0 : __x - __y;
 }
@@ -131,14 +131,14 @@ fdimf (float __x, float __y) __THROW
 
 extern double __slow_ieee754_sqrt (double);
 __MATH_INLINE double
-__ieee754_sqrt (double __x)
+__NTH (__ieee754_sqrt (double __x))
 {
   double __z;
-  
+
   /* If the CPU is 64-bit we can use the optional FP instructions we.  */
   if ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
   {
-    /* Volatile is required to prevent the compiler from moving the 
+    /* Volatile is required to prevent the compiler from moving the
        fsqrt instruction above the branch.  */
      __asm __volatile (
 	"	fsqrt	%0,%1\n"
@@ -147,20 +147,20 @@ __ieee754_sqrt (double __x)
   }
   else
      __z = __slow_ieee754_sqrt(__x);
-     
+
   return __z;
 }
 
 extern float __slow_ieee754_sqrtf (float);
 __MATH_INLINE float
-__ieee754_sqrtf (float __x)
+__NTH (__ieee754_sqrtf (float __x))
 {
   float __z;
-  
+
   /* If the CPU is 64-bit we can use the optional FP instructions we.  */
   if ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
   {
-    /* Volatile is required to prevent the compiler from moving the 
+    /* Volatile is required to prevent the compiler from moving the
        fsqrts instruction above the branch.  */
      __asm __volatile (
 	"	fsqrts	%0,%1\n"
@@ -169,7 +169,7 @@ __ieee754_sqrtf (float __x)
   }
   else
      __z = __slow_ieee754_sqrtf(__x);
-     
+
   return __z;
 }
 #  endif /* __LIBC_INTERNAL_MATH_INLINES */
diff --git a/sysdeps/s390/fpu/bits/mathinline.h b/sysdeps/s390/fpu/bits/mathinline.h
index d83d9ca8b8..4d22922f8d 100644
--- a/sysdeps/s390/fpu/bits/mathinline.h
+++ b/sysdeps/s390/fpu/bits/mathinline.h
@@ -33,13 +33,15 @@
 #ifdef __USE_ISOC99
 
 /* Test for negative number.  Used in the signbit() macro.  */
-__MATH_INLINE int __signbitf (float __x) __THROW
+__MATH_INLINE int
+__NTH (__signbitf (float __x))
 {
   __extension__ union { float __f; int __i; } __u = { __f: __x };
   return __u.__i < 0;
 }
 
-__MATH_INLINE int __signbit (double __x) __THROW
+__MATH_INLINE int
+__NTH (__signbit (double __x))
 {
   __extension__ union { double __d; long __i; } __u = { __d: __x };
   return __u.__i < 0;
@@ -55,19 +57,19 @@ __MATH_INLINE int __signbit (double __x) __THROW
 #include <dl-procinfo.h>
 
 __MATH_INLINE double
-__ieee754_sqrt (double x)
+__NTH (__ieee754_sqrt (double x))
 {
   double res;
-     
+
   asm ( "sqdbr %0,%1" : "=f" (res) : "f" (x) );
   return res;
 }
 
 __MATH_INLINE float
-__ieee754_sqrtf (float x)
+__NTH (__ieee754_sqrtf (float x))
 {
   float res;
-  
+
   asm ( "sqebr %0,%1" : "=f" (res) : "f" (x) );
   return res;
 }
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index c28e03ff35..e94a42175e 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -1,5 +1,5 @@
 /* System-specific socket constants and types.  Linux version.
-   Copyright (C) 1991,1992,1994-1999,2000,2001 Free Software Foundation, Inc.
+   Copyright (C) 1991,1992,1994-2001, 2004 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
@@ -261,7 +261,7 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
 #  define _EXTERN_INLINE extern __inline
 # endif
 _EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
 {
   if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
     /* The kernel header does this so there may be a reason.  */
diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h
index a9bfa78d3e..179642ff40 100644
--- a/sysdeps/unix/sysv/linux/sys/sysmacros.h
+++ b/sysdeps/unix/sysv/linux/sys/sysmacros.h
@@ -1,5 +1,5 @@
 /* Definitions of macros to access `dev_t' values.
-   Copyright (C) 1996, 1997, 1999, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999, 2003, 2004 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
@@ -39,19 +39,19 @@ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
 
 # if defined __GNUC__ && __GNUC__ >= 2
 __extension__ extern __inline unsigned int
-gnu_dev_major (unsigned long long int __dev) __THROW
+__NTH (gnu_dev_major (unsigned long long int __dev))
 {
   return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
 }
 
 __extension__ extern __inline unsigned int
-gnu_dev_minor (unsigned long long int __dev) __THROW
+__NTH (gnu_dev_minor (unsigned long long int __dev))
 {
   return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
 }
 
 __extension__ extern __inline unsigned long long int
-gnu_dev_makedev (unsigned int __major, unsigned int __minor) __THROW
+__NTH (gnu_dev_makedev (unsigned int __major, unsigned int __minor))
 {
   return ((__minor & 0xff) | ((__major & 0xfff) << 8)
 	  | (((unsigned long long int) (__minor & ~0xff)) << 12)
diff --git a/sysdeps/x86_64/bits/atomic.h b/sysdeps/x86_64/bits/atomic.h
index f31bedb0b3..133a68d192 100644
--- a/sysdeps/x86_64/bits/atomic.h
+++ b/sysdeps/x86_64/bits/atomic.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -319,3 +319,6 @@ typedef uintmax_t uatomic_max_t;
 			 : "=q" (__result), "=m" (*mem)			      \
 			 : "m" (*mem), "ir" (bit));			      \
      __result; })
+
+
+#define atomic_delay() asm ("rep; nop")
diff --git a/sysdeps/x86_64/fpu/bits/mathinline.h b/sysdeps/x86_64/fpu/bits/mathinline.h
index 3f61ff5e92..39d11b678d 100644
--- a/sysdeps/x86_64/fpu/bits/mathinline.h
+++ b/sysdeps/x86_64/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
 /* Inline math functions for x86-64.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 2002.
 
@@ -33,19 +33,19 @@
 
 /* Test for negative number.  Used in the signbit() macro.  */
 __MATH_INLINE int
-__signbitf (float __x) __THROW
+__NTH (__signbitf (float __x))
 {
   __extension__ union { float __f; int __i; } __u = { __f: __x };
   return __u.__i < 0;
 }
 __MATH_INLINE int
-__signbit (double __x) __THROW
+__NTH (__signbit (double __x))
 {
   __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
   return __u.__i[1] < 0;
 }
 __MATH_INLINE int
-__signbitl (long double __x) __THROW
+__NTH (__signbitl (long double __x))
 {
   __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
   return (__u.__i[2] & 0x8000) != 0;
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 8bab0ddd7b..1fe7e94d92 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003, 2004 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
@@ -320,8 +320,9 @@ __END_NAMESPACE_C99
 
 #ifdef __USE_EXTERN_INLINES
 /* Define inline function as optimization.  */
-extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n,
-			       mbstate_t *__restrict __ps) __THROW
+extern __inline size_t
+__NTH (mbrlen (__const char *__restrict __s, size_t __n,
+	       mbstate_t *__restrict __ps))
 { return (__ps != NULL
 	  ? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
 #endif
@@ -525,38 +526,40 @@ extern unsigned long long int __wcstoull_internal (__const wchar_t *
 /* Define inline functions which call the internal entry points.  */
 __BEGIN_NAMESPACE_C99
 
-extern __inline double wcstod (__const wchar_t *__restrict __nptr,
-			       wchar_t **__restrict __endptr) __THROW
+extern __inline double
+__NTH (wcstod (__const wchar_t *__restrict __nptr,
+	       wchar_t **__restrict __endptr))
 { return __wcstod_internal (__nptr, __endptr, 0); }
-extern __inline long int wcstol (__const wchar_t *__restrict __nptr,
-                                 wchar_t **__restrict __endptr,
-				 int __base) __THROW
+extern __inline long int
+__NTH (wcstol (__const wchar_t *__restrict __nptr,
+	       wchar_t **__restrict __endptr, int __base))
 { return __wcstol_internal (__nptr, __endptr, __base, 0); }
-extern __inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
-                                           wchar_t **__restrict __endptr,
-					   int __base) __THROW
+extern __inline unsigned long int
+__NTH (wcstoul (__const wchar_t *__restrict __nptr,
+		wchar_t **__restrict __endptr, int __base))
 { return __wcstoul_internal (__nptr, __endptr, __base, 0); }
 __END_NAMESPACE_C99
 
 # ifdef __USE_GNU
-extern __inline float wcstof (__const wchar_t *__restrict __nptr,
-			      wchar_t **__restrict __endptr) __THROW
+extern __inline float
+__NTH (wcstof (__const wchar_t *__restrict __nptr,
+	       wchar_t **__restrict __endptr))
 { return __wcstof_internal (__nptr, __endptr, 0); }
-extern __inline long double wcstold (__const wchar_t *__restrict __nptr,
-				     wchar_t **__restrict __endptr) __THROW
+extern __inline long double
+__NTH (wcstold (__const wchar_t *__restrict __nptr,
+		wchar_t **__restrict __endptr))
 { return __wcstold_internal (__nptr, __endptr, 0); }
 
 
 __extension__
-extern __inline long long int wcstoq (__const wchar_t *__restrict __nptr,
-				      wchar_t **__restrict __endptr,
-				      int __base) __THROW
+extern __inline long long int
+__NTH (wcstoq (__const wchar_t *__restrict __nptr,
+	       wchar_t **__restrict __endptr, int __base))
 { return __wcstoll_internal (__nptr, __endptr, __base, 0); }
 __extension__
-extern __inline unsigned long long int wcstouq (__const wchar_t *
-						__restrict __nptr,
-						wchar_t **__restrict __endptr,
-						int __base) __THROW
+extern __inline unsigned long long int
+__NTH (wcstouq (__const wchar_t *__restrict __nptr,
+		wchar_t **__restrict __endptr, int __base))
 { return __wcstoull_internal (__nptr, __endptr, __base, 0); }
 # endif /* Use GNU.  */
 #endif /* Optimizing GCC >=2.  */