diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-16 19:28:00 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-16 19:28:00 +0000 |
commit | c6e01142eccf1959e00a90372ea12a96821aba87 (patch) | |
tree | 1649f128707d0a2f1a156a56eed0f832945834be | |
parent | 6884c6e29fa62766f3a3678ae9be34b4d82d5d96 (diff) |
Merged revisions 201090 via svnmerge from
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: http://svn.digium.com/svn/asterisk/branches/1.6.1@201091 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | autoconf/ast_gcc_attribute.m4 | 11 | ||||
-rwxr-xr-x | configure | 101 | ||||
-rw-r--r-- | configure.ac | 2 |
3 files changed, 22 insertions, 92 deletions
diff --git a/autoconf/ast_gcc_attribute.m4 b/autoconf/ast_gcc_attribute.m4 index f08b2545b..d3f05be5b 100644 --- a/autoconf/ast_gcc_attribute.m4 +++ b/autoconf/ast_gcc_attribute.m4 @@ -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.]), @@ -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. # @@ -17472,20 +17472,13 @@ 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 /* confdefs.h. */ _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 () { @@ -17593,20 +17586,13 @@ 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 /* confdefs.h. */ _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 () { @@ -17714,20 +17700,13 @@ 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 /* confdefs.h. */ _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 () { @@ -17835,20 +17814,13 @@ 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 /* confdefs.h. */ _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 () { @@ -17956,20 +17928,13 @@ 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 /* confdefs.h. */ _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 () { @@ -18077,20 +18042,13 @@ 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 /* confdefs.h. */ _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 () { @@ -18198,20 +18156,13 @@ 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 /* confdefs.h. */ _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 () { @@ -18319,20 +18270,13 @@ 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 /* confdefs.h. */ _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 () { diff --git a/configure.ac b/configure.ac index 43a14fb2b..b388df28f 100644 --- a/configure.ac +++ b/configure.ac @@ -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}" |