[svn-commits] gtjoseph: branch 13 r425965 - in /branches/13: ./ include/asterisk/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Oct 19 12:07:56 CDT 2014


Author: gtjoseph
Date: Sun Oct 19 12:07:50 2014
New Revision: 425965

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425965
Log:
build: Force -fsigned-char on platforms where the default for char is unsigned

gcc on the ARM platform defaults 'char' to 'unsigned char' whereas Intel and
SPARC default to 'signed char'.  This is only an issue in the rare cases where
negative values are assigned to a 'char' but this this patch insures
compatibility by detecting platforms that default to 'unsigned' and adding an
'-fsigned-char' flag to _ASTCFLAGS.

If compiling for ARM (native or cross-compile) be sure to run ./bootstrap.sh
and ./configure to regenerate the build files.  You shouldn't have to do this
for Intel or SPARC.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4091/
........

Merged revisions 425964 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/Makefile
    branches/13/configure
    branches/13/configure.ac
    branches/13/include/asterisk/autoconfig.h.in
    branches/13/makeopts.in

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/Makefile
URL: http://svnview.digium.com/svn/asterisk/branches/13/Makefile?view=diff&rev=425965&r1=425964&r2=425965
==============================================================================
--- branches/13/Makefile (original)
+++ branches/13/Makefile Sun Oct 19 12:07:50 2014
@@ -104,7 +104,7 @@
 
 # start the primary CFLAGS and LDFLAGS with any that were provided
 # to the configure script
-_ASTCFLAGS:=$(CONFIG_CFLAGS)
+_ASTCFLAGS:=$(CONFIG_CFLAGS) $(CONFIG_SIGNED_CHAR)
 _ASTLDFLAGS:=$(CONFIG_LDFLAGS)
 
 # Some build systems, such as the one in openwrt, like to pass custom target

Modified: branches/13/configure.ac
URL: http://svnview.digium.com/svn/asterisk/branches/13/configure.ac?view=diff&rev=425965&r1=425964&r2=425965
==============================================================================
--- branches/13/configure.ac (original)
+++ branches/13/configure.ac Sun Oct 19 12:07:50 2014
@@ -191,6 +191,25 @@
 
 AC_SUBST(OSARCH)
 AC_SUBST(PBX_WINARCH)
+
+AC_MSG_CHECKING(whether char is unsigned)
+AC_COMPILE_IFELSE(
+	[
+		AC_LANG_SOURCE(
+#include <limits.h>
+#if CHAR_MIN == 0
+#error
+#endif
+		)
+	],[
+		AC_MSG_RESULT(no)
+		CONFIG_SIGNED_CHAR=""
+	],[
+		AC_MSG_RESULT(yes)
+		CONFIG_SIGNED_CHAR="-fsigned-char"
+	]
+)
+AC_SUBST(CONFIG_SIGNED_CHAR)
 
 #  check for uname
 AC_PATH_TOOL([UNAME], [uname], No)

Modified: branches/13/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/branches/13/include/asterisk/autoconfig.h.in?view=diff&rev=425965&r1=425964&r2=425965
==============================================================================
--- branches/13/include/asterisk/autoconfig.h.in (original)
+++ branches/13/include/asterisk/autoconfig.h.in Sun Oct 19 12:07:50 2014
@@ -1289,6 +1289,11 @@
 /* Define to 1 if running on Darwin. */
 #undef _DARWIN_UNLIMITED_SELECT
 
+/* Enable large inode numbers on Mac OS X 10.5.  */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 

Modified: branches/13/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/branches/13/makeopts.in?view=diff&rev=425965&r1=425964&r2=425965
==============================================================================
--- branches/13/makeopts.in (original)
+++ branches/13/makeopts.in Sun Oct 19 12:07:50 2014
@@ -60,6 +60,7 @@
 
 CONFIG_CFLAGS=@CONFIG_CFLAGS@
 CONFIG_LDFLAGS=@CONFIG_LDFLAGS@
+CONFIG_SIGNED_CHAR=@CONFIG_SIGNED_CHAR@
 
 GNU_LD=@GNU_LD@
 WEAKREF=@PBX_WEAKREF@




More information about the svn-commits mailing list