]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Expand the test function for GCC attributes so that more complex attributes are prope...
authorJoshua Colp <jcolp@digium.com>
Sun, 4 May 2008 02:09:44 +0000 (02:09 +0000)
committerJoshua Colp <jcolp@digium.com>
Sun, 4 May 2008 02:09:44 +0000 (02:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115282 65c4cc65-6c06-0410-ace0-fbb531ad65f3

acinclude.m4
configure

index b4df57451cd4cffae37540e2f1b5151d25b6fb72..0fa4e546ead95cd100b8b3999ec6147a705ce8da 100644 (file)
@@ -6,7 +6,7 @@ AC_MSG_CHECKING(for compiler 'attribute $1' support)
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Werror"
 AC_COMPILE_IFELSE(
-       AC_LANG_PROGRAM([static int __attribute__(($1)) test(void) {}],
+       AC_LANG_PROGRAM([static void __attribute__(($1)) *test(void *muffin, ...) {}],
                        []),
        AC_MSG_RESULT(yes)
        AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
index c9479e0ce7e2491a4ca1b5e9290ca941acbc5ab5..86b2c57be3d7172a8c9e2fad502baf6a183c3908 100755 (executable)
--- a/configure
+++ b/configure
@@ -14900,7 +14900,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-static int __attribute__((pure)) test(void) {}
+static void __attribute__((pure)) *test(void *muffin, ...) {}
 int
 main ()
 {
@@ -14956,7 +14956,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-static int __attribute__((malloc)) test(void) {}
+static void __attribute__((malloc)) *test(void *muffin, ...) {}
 int
 main ()
 {
@@ -15012,7 +15012,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-static int __attribute__((const)) test(void) {}
+static void __attribute__((const)) *test(void *muffin, ...) {}
 int
 main ()
 {
@@ -15068,7 +15068,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-static int __attribute__((unused)) test(void) {}
+static void __attribute__((unused)) *test(void *muffin, ...) {}
 int
 main ()
 {
@@ -15124,7 +15124,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-static int __attribute__((always_inline)) test(void) {}
+static void __attribute__((always_inline)) *test(void *muffin, ...) {}
 int
 main ()
 {
@@ -15180,7 +15180,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-static int __attribute__((deprecated)) test(void) {}
+static void __attribute__((deprecated)) *test(void *muffin, ...) {}
 int
 main ()
 {