aboutsummaryrefslogtreecommitdiff
path: root/misc
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 /misc
parent36ccb375a7f4db3ef66a0115961cfef23befa0e6 (diff)
downloadglibc-f377d02227448a6f0d97eaf48ba60483c2f27e98.zip
glibc-f377d02227448a6f0d97eaf48ba60483c2f27e98.tar.gz
glibc-f377d02227448a6f0d97eaf48ba60483c2f27e98.tar.bz2
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.
Diffstat (limited to 'misc')
-rw-r--r--misc/sys/cdefs.h22
-rw-r--r--misc/sys/mman.h12
2 files changed, 23 insertions, 11 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 1814305..3c53ca7 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 5e37278..ae4dd64 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