[asterisk-commits] file: branch 1.4 r72597 - /branches/1.4/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 29 09:18:36 CDT 2007
Author: file
Date: Fri Jun 29 09:18:36 2007
New Revision: 72597
URL: http://svn.digium.com/view/asterisk?view=rev&rev=72597
Log:
Backport fix for GCC versions without support for declaration-after-statement.
Modified:
branches/1.4/Makefile
branches/1.4/configure
branches/1.4/configure.ac
branches/1.4/makeopts.in
Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.4/Makefile?view=diff&rev=72597&r1=72596&r2=72597
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Fri Jun 29 09:18:36 2007
@@ -192,7 +192,7 @@
ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
ifeq ($(AST_DEVMODE),yes)
- ASTCFLAGS+=-Werror -Wunused -Wdeclaration-after-statement
+ ASTCFLAGS+=-Werror -Wunused $(AST_DECLARATION_AFTER_STATEMENT)
endif
ifneq ($(findstring BSD,$(OSARCH)),)
Modified: branches/1.4/configure
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure?view=diff&rev=72597&r1=72596&r2=72597
==============================================================================
--- branches/1.4/configure (original)
+++ branches/1.4/configure Fri Jun 29 09:18:36 2007
@@ -873,6 +873,7 @@
POW_LIB
GC_CFLAGS
GC_LDFLAGS
+AST_DECLARATION_AFTER_STATEMENT
GSM_INTERNAL
KDEINIT
KDEDIR
@@ -11848,13 +11849,11 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -11894,13 +11893,11 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -15263,6 +15260,19 @@
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="${saved_CFLAGS}"
+
+
+{ echo "$as_me:$LINENO: checking for -Wdeclaration-after-statement support" >&5
+echo $ECHO_N "checking for -Wdeclaration-after-statement support... $ECHO_C" >&6; }
+if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ AST_DECLARATION_AFTER_STATEMENT=
+fi
{ echo "$as_me:$LINENO: checking for res_ninit" >&5
@@ -32082,6 +32092,7 @@
POW_LIB!$POW_LIB$ac_delim
GC_CFLAGS!$GC_CFLAGS$ac_delim
GC_LDFLAGS!$GC_LDFLAGS$ac_delim
+AST_DECLARATION_AFTER_STATEMENT!$AST_DECLARATION_AFTER_STATEMENT$ac_delim
GSM_INTERNAL!$GSM_INTERNAL$ac_delim
KDEINIT!$KDEINIT$ac_delim
KDEDIR!$KDEDIR$ac_delim
@@ -32115,7 +32126,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: branches/1.4/configure.ac
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure.ac?view=diff&rev=72597&r1=72596&r2=72597
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Fri Jun 29 09:18:36 2007
@@ -318,6 +318,16 @@
CFLAGS="${saved_CFLAGS}"
AC_SUBST(GC_CFLAGS)
AC_SUBST(GC_LDFLAGS)
+
+AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
+if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+ AC_MSG_RESULT(yes)
+ AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
+else
+ AC_MSG_RESULT(no)
+ AST_DECLARATION_AFTER_STATEMENT=
+fi
+AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
AC_MSG_CHECKING(for res_ninit)
AC_LINK_IFELSE(
Modified: branches/1.4/makeopts.in
URL: http://svn.digium.com/view/asterisk/branches/1.4/makeopts.in?view=diff&rev=72597&r1=72596&r2=72597
==============================================================================
--- branches/1.4/makeopts.in (original)
+++ branches/1.4/makeopts.in Fri Jun 29 09:18:36 2007
@@ -60,6 +60,8 @@
sysconfdir = @sysconfdir@
AST_DEVMODE=@AST_DEVMODE@
+
+AST_DECLARATION_AFTER_STATEMENT=@AST_DECLARATION_AFTER_STATEMENT@
ASOUND_INCLUDE=@ALSA_INCLUDE@
ASOUND_LIB=@ALSA_LIB@
More information about the asterisk-commits
mailing list