]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 201090 via svnmerge from
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 16 Jun 2009 19:28:00 +0000 (19:28 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 16 Jun 2009 19:28:00 +0000 (19:28 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r201090 | kpfleming | 2009-06-16 14:27:12 -0500 (Tue, 16 Jun 2009) | 5 lines

  Another minor fix to compiler attribute checking.

  Defaulting to 'static' for the function scope was bad... so remove it.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@201091 65c4cc65-6c06-0410-ace0-fbb531ad65f3

autoconf/ast_gcc_attribute.m4
configure
configure.ac

index f08b2545b7760c06c506fb862830968cb8531a3b..d3f05be5b8d1d759056813e3ed9e423d324a8822 100644 (file)
@@ -7,17 +7,10 @@ AC_MSG_CHECKING(for compiler 'attribute $1' support)
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x$3" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope="$3"
-fi
-
 if test "x$2" = "x"
 then
 AC_COMPILE_IFELSE(
-       AC_LANG_PROGRAM([$attribute_scope void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
+       AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
                        []),
        AC_MSG_RESULT(yes)
        AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
@@ -25,7 +18,7 @@ AC_COMPILE_IFELSE(
 )
 else
 AC_COMPILE_IFELSE(
-       AC_LANG_PROGRAM([$attribute_scope void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
+       AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
                        []),
        AC_MSG_RESULT(yes)
        AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
index 2149fa1da0c57ba18202afba5bf4ce9d20b46e12..9fdd1ea6f8f3789af074746beab6f203ce3f9f36 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 196947 .
+# From configure.ac Revision: 200989 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.63 for asterisk 1.6.
 #
@@ -17470,13 +17470,6 @@ $as_echo_n "checking for compiler 'attribute pure' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -17485,7 +17478,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17536,7 +17529,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17591,13 +17584,6 @@ $as_echo_n "checking for compiler 'attribute malloc' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -17606,7 +17592,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17657,7 +17643,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17712,13 +17698,6 @@ $as_echo_n "checking for compiler 'attribute const' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -17727,7 +17706,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17778,7 +17757,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17833,13 +17812,6 @@ $as_echo_n "checking for compiler 'attribute unused' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -17848,7 +17820,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17899,7 +17871,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -17954,13 +17926,6 @@ $as_echo_n "checking for compiler 'attribute always_inline' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -17969,7 +17934,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18020,7 +17985,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18075,13 +18040,6 @@ $as_echo_n "checking for compiler 'attribute deprecated' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -18090,7 +18048,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18141,7 +18099,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18196,13 +18154,6 @@ $as_echo_n "checking for compiler 'attribute sentinel' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -18211,7 +18162,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18262,7 +18213,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18317,13 +18268,6 @@ $as_echo_n "checking for compiler 'attribute warn_unused_result' support... " >&
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -18332,7 +18276,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18383,7 +18327,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18438,13 +18382,6 @@ $as_echo_n "checking for compiler 'attribute weak' support... " >&6; }
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
-if test "x""" = "x"
-then
-attribute_scope="static"
-else
-attribute_scope=""""
-fi
-
 if test "x" = "x"
 then
 cat >conftest.$ac_ext <<_ACEOF
@@ -18453,7 +18390,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__((weak)) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__((weak)) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
@@ -18504,7 +18441,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
+ void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
 int
 main ()
 {
index 43a14fb2bf3dfe519a05c926c9a6cec973b0403b..b388df28f7cc41583a87e54b61d7d09f3186b83b 100644 (file)
@@ -488,7 +488,7 @@ AST_GCC_ATTRIBUTE(always_inline)
 AST_GCC_ATTRIBUTE(deprecated)
 AST_GCC_ATTRIBUTE(sentinel)
 AST_GCC_ATTRIBUTE(warn_unused_result)
-AST_GCC_ATTRIBUTE(weak, , "")
+AST_GCC_ATTRIBUTE(weak)
 
 AC_MSG_CHECKING(for -ffunction-sections support)
 saved_CFLAGS="${CFLAGS}"