dect
/
libpcap
Archived
13
0
Fork 0

AC_TRY_COMPILE works only for code that fits inside "main()"; the test

for __attribute__ doesn't fit inside "main()" with GCC 4.0, as it
defines a function.
This commit is contained in:
guy 2005-04-21 03:41:24 +00:00
parent b51227ccf4
commit 4eb7b3915e
2 changed files with 16 additions and 11 deletions

16
aclocal.m4 vendored
View File

@ -1,4 +1,4 @@
dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.85 2005-03-27 03:27:09 guy Exp $ (LBL)
dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.86 2005-04-21 03:41:24 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
@ -851,10 +851,10 @@ dnl
AC_DEFUN(AC_C___ATTRIBUTE__, [
AC_MSG_CHECKING(for __attribute__)
AC_CACHE_VAL(ac_cv___attribute__, [
AC_TRY_COMPILE([
AC_COMPILE_IFELSE(
AC_LANG_SOURCE([[
#include <stdlib.h>
],
[
static void foo(void) __attribute__ ((noreturn));
static void
@ -862,7 +862,13 @@ foo(void)
{
exit(1);
}
],
int
main(int argc, char **argv)
{
foo();
}
]]),
ac_cv___attribute__=yes,
ac_cv___attribute__=no)])
if test "$ac_cv___attribute__" = "yes"; then

11
configure vendored
View File

@ -2633,10 +2633,6 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <stdlib.h>
int
main ()
{
static void foo(void) __attribute__ ((noreturn));
static void
@ -2645,9 +2641,12 @@ foo(void)
exit(1);
}
;
return 0;
int
main(int argc, char **argv)
{
foo();
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5