OSDN Git Service

use the __extern_always_inline define from cdefs.h instead of duplicating gcc version...
authorMike Frysinger <vapier@gentoo.org>
Sun, 6 Jan 2008 00:04:02 +0000 (00:04 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 6 Jan 2008 00:04:02 +0000 (00:04 -0000)
40 files changed:
include/sys/cdefs.h
libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h
libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h
libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h
libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h
libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h
libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h
libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h
libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h
libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h
libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h
libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h
libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h
libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h
libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h
libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h
libpthread/linuxthreads.old/sysdeps/v850/pt-machine.h
libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h
libpthread/linuxthreads/sysdeps/alpha/pt-machine.h
libpthread/linuxthreads/sysdeps/arm/pt-machine.h
libpthread/linuxthreads/sysdeps/avr32/pt-machine.h
libpthread/linuxthreads/sysdeps/cris/pt-machine.h
libpthread/linuxthreads/sysdeps/hppa/pt-machine.h
libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h
libpthread/linuxthreads/sysdeps/i386/pt-machine.h
libpthread/linuxthreads/sysdeps/ia64/pt-machine.h
libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
libpthread/linuxthreads/sysdeps/mips/pt-machine.h
libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
libpthread/linuxthreads/sysdeps/sh/pt-machine.h
libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h

index e292051..588c1eb 100644 (file)
 #endif
 
 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
-   inline semantics, unless -fgnu89-inline is used.  */
+   inline semantics, unless -fgnu89-inline is used.
+   For -std=gnu99, forcing gnu_inline attribute does not change behavior,
+   but may silence spurious warnings (such as in GCC 4.2).  */
 #if !defined __cplusplus || __GNUC_PREREQ (4,3)
-# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
+# if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ || defined __cplusplus
 #  define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
 #  if __GNUC_PREREQ (4,3)
 #   define __extern_always_inline \
index 26805c4..97c3839 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 #ifdef __linux__
index 3058d64..14eb6f6 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* This will not work on ARM1 or ARM2 because SWP is lacking on those
index a6e1a6f..c9669f2 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 static inline int
@@ -34,10 +30,6 @@ _test_and_set (int *p, int v)
        return result;
 }
 
-#ifndef PT_EI
-# define PT_EI extern inline
-#endif
-
 extern long int testandset (int *spinlock);
 extern int __compare_and_swap (long int *p, long int oldval, long int newval);
 
index ae63e38..9f5cb5c 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 #include <asm/fixed_code.h>
index de747bb..6d626fb 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 PT_EI long int
index c4c337b..2317b65 100644 (file)
 #ifndef __ASSEMBLER__
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index a3cbfa0..121f496 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index 858a9c7..9896414 100644 (file)
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /*
index bbb6b11..668057a 100644 (file)
@@ -29,11 +29,7 @@ extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
                      size_t __child_stack_size, int __flags, void *__arg, ...);
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Make sure gcc doesn't try to be clever and move things around on
index 5876d20..295495b 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index 2c0f808..6389528 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
index 20333d7..1404550 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index 49013e1..061fa73 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index b253479..561f895 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* For multiprocessor systems, we want to ensure all memory accesses
index d1e560d..4ec87ad 100644 (file)
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index b45df97..b87448a 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Get some notion of the current stack.  Need not be exactly the top
index 322a520..43c05f2 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index f65c13b..815d70e 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index a9cb9b8..34de63b 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Get some notion of the current stack.  Need not be exactly the top
index 0122a28..ce07bbb 100644 (file)
 
 
 # ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+#  define PT_EI __extern_always_inline
 # endif
 
 /* Get some notion of the current stack.  Need not be exactly the top
index d5ab9f0..acd4d10 100644 (file)
@@ -26,7 +26,7 @@
 #include <asm/unistd.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI __extern_always_inline
 #endif
 
 /* Memory barrier.  */
index 26805c4..97c3839 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 #ifdef __linux__
index 80d040f..9ffc8bd 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* This will not work on ARM1 or ARM2 because SWP is lacking on those
index 253bda5..903a7ed 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 static inline int
index d6e46f3..33cf579 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 PT_EI long int
index e50a42e..780af7b 100644 (file)
 #include <bits/initspin.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Get some notion of the current stack.  Need not be exactly the top
index 1c75bf9..222d44a 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H  1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 #include "kernel-features.h"
 
index ad004e9..f964525 100644 (file)
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /*
index 2fc94ec..e36468a 100644 (file)
 #include <ia64intrin.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Make sure gcc doesn't try to be clever and move things around on
index 3d1e87d..a13c069 100644 (file)
 #include <features.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index ce70286..0ab7ac1 100644 (file)
 #include <sys/tas.h>
 
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index 8363d16..bfb13df 100644 (file)
@@ -26,7 +26,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index 562e69f..d7ed841 100644 (file)
@@ -25,7 +25,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index 3983329..d52d600 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index 49f8ae2..187e1f8 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index d1e560d..4ec87ad 100644 (file)
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define PT_EI static inline __attribute__((always_inline))
-# else
-#  define PT_EI extern inline __attribute__((always_inline))
-# endif
+# define PT_EI __extern_always_inline
 #endif
 
 /* Spinlock implementation; required.  */
index 322a520..43c05f2 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index f65c13b..815d70e 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# define PT_EI __extern_always_inline
 #endif
 
 extern long int testandset (int *spinlock);
index 66f9652..23615db 100644 (file)
 
 
 # ifndef PT_EI
-#  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#   define PT_EI static inline __attribute__((always_inline))
-#  else
-#   define PT_EI extern inline __attribute__((always_inline))
-#  endif
+#  define PT_EI __extern_always_inline
 # endif
 
 /* Get some notion of the current stack.  Need not be exactly the top