shithub: freetype+ttf2subf

Download patch

ref: e962a914fdee0e442c3a3da8650edf0c04f1dae4
parent: 476a76650b8670d63048a925134e93e46becfaf2
author: Werner Lemberg <[email protected]>
date: Sat Mar 1 16:00:02 EST 2014

Avoid `long long' warnings with older gcc compilers.
Problem reported by Hin-Tak Leung <[email protected]>.

* builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
versions < 4.6.  This is especially needed for Max OS X since this
OS runs a gcc variant (or emulation) based on version 4.2.1.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2014-03-01  Werner Lemberg  <[email protected]>
 
+	Avoid `long long' warnings with older gcc compilers.
+	Problem reported by Hin-Tak Leung <[email protected]>.
+
+	* builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
+	versions < 4.6.  This is especially needed for Max OS X since this
+	OS runs a gcc variant (or emulation) based on version 4.2.1.
+
+2014-03-01  Werner Lemberg  <[email protected]>
+
 	* docs/INSTALL.CROSS: Revised and updated.
 
 2014-03-01  Werner Lemberg  <[email protected]>
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -216,6 +216,12 @@
 #
 #   Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW.
 #
+#   To avoid zillions of
+#
+#     ISO C90 does not support 'long long'
+#
+#   warnings, we disable `-pedantic' for gcc version < 4.6.
+#
 if test "x$GCC" = xyes; then
   XX_CFLAGS="-Wall"
   case "$host" in
@@ -223,8 +229,21 @@
     XX_ANSIFLAGS="-pedantic"
     ;;
   *)
+    GCC_VERSION=`$CC -dumpversion`
+    GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
+    GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
+
+    XX_PEDANTIC=-pedantic
+    if test $GCC_MAJOR -lt 4; then
+      XX_PEDANTIC=
+    else
+      if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then
+        XX_PEDANTIC=
+      fi
+    fi
+
     XX_ANSIFLAGS=""
-    for a in -pedantic -ansi
+    for a in $XX_PEDANTIC -ansi
     do
       AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly])
       orig_CFLAGS="${CFLAGS}"