From 40520b2931f9d41ca4e3c2f3e8dea6578785624b Mon Sep 17 00:00:00 2001 From: joseph Date: Mon, 8 Oct 2007 15:18:44 +0000 Subject: Merge changes between r3614 and r3746 from /fsf/trunk. git-svn-id: svn://svn.eglibc.org/trunk@3747 7b3dc134-2b1b-0410-93df-9e9f96275f8d --- libc/misc/sys/cdefs.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'libc/misc/sys/cdefs.h') diff --git a/libc/misc/sys/cdefs.h b/libc/misc/sys/cdefs.h index 26b9490ba..efdc4f97e 100644 --- a/libc/misc/sys/cdefs.h +++ b/libc/misc/sys/cdefs.h @@ -131,9 +131,18 @@ /* Fortify support. */ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) -#define __warndecl(name, msg) extern void name (void) -#define __errordecl(name, msg) extern void name (void) +#if __GNUC_PREREQ (4,3) +# define __warndecl(name, msg) \ + extern void name (void) __attribute__((__warning__ (msg))) +# define __warnattr(msg) __attribute__((__warning__ (msg))) +# define __errordecl(name, msg) \ + extern void name (void) __attribute__((__error__ (msg))) +#else +# define __warndecl(name, msg) extern void name (void) +# define __warnattr(msg) +# define __errordecl(name, msg) extern void name (void) +#endif /* Support for flexible arrays. */ #if __GNUC_PREREQ (2,97) @@ -285,8 +294,13 @@ #if !defined __cplusplus || __GNUC_PREREQ (4,3) # if defined __GNUC_STDC_INLINE__ || defined __cplusplus # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) -# define __extern_always_inline \ +# if __GNUC_PREREQ (4,3) +# define __extern_always_inline \ + extern __always_inline __attribute__ ((__gnu_inline__, __artificial__)) +# else +# define __extern_always_inline \ extern __always_inline __attribute__ ((__gnu_inline__)) +# endif # else # define __extern_inline extern __inline # define __extern_always_inline extern __always_inline @@ -346,6 +360,10 @@ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR_DECL(name) \ extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name)); +# define __REDIRECT_LDBL(name, proto, alias) \ + __LDBL_REDIR1 (name, proto, __nldbl_##alias) +# define __REDIRECT_NTH_LDBL(name, proto, alias) \ + __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) # endif #endif #if !defined __LDBL_COMPAT || !defined __REDIRECT @@ -354,6 +372,11 @@ # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW # define __LDBL_REDIR_NTH(name, proto) name proto __THROW # define __LDBL_REDIR_DECL(name) +# ifdef __REDIRECT +# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) +# define __REDIRECT_NTH_LDBL(name, proto, alias) \ + __REDIRECT_NTH (name, proto, alias) +# endif #endif #endif /* sys/cdefs.h */ -- cgit v1.2.1