aboutsummaryrefslogtreecommitdiff
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.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