Commit 35b081898694db8f7865d561ff8cc598a4fe9965

Werner Lemberg 2013-11-02T08:28:41

Fix Savannah bug #40451. Simply apply the patch from the bug report. * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: The used #pragma directives only work with gcc versions 4.6 and higher.

diff --git a/ChangeLog b/ChangeLog
index 75cec51..dc327ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-11-02  Werner Lemberg  <wl@gnu.org>
+
+	Fix Savannah bug #40451.
+
+	Simply apply the patch from the bug report.
+
+	* builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+	include/freetype/config/ftconfig.h: The used #pragma directives only
+	work with gcc versions 4.6 and higher.
+
 2013-11-01  Werner Lemberg  <wl@gnu.org>
 
 	* docs/CHANGES: Updated.
diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in
index 1753a6e..9919cd9 100644
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -520,8 +520,10 @@ FT_BEGIN_HEADER
   {
     /* Temporarily disable the warning that C90 doesn't support */
     /* `long long'.                                             */
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wlong-long"
+#endif
 
 #if 1
     /* Technically not an assembly fragment, but GCC does a really good */
@@ -560,7 +562,9 @@ FT_BEGIN_HEADER
     return (FT_Int32)result;
 #endif
 
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
 #pragma GCC diagnostic pop
+#endif
   }
 
 #endif /* __GNUC__ && __x86_64__ */
diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h
index 9ac10f3..9a06624 100644
--- a/builds/vms/ftconfig.h
+++ b/builds/vms/ftconfig.h
@@ -456,8 +456,10 @@ FT_BEGIN_HEADER
   {
     /* Temporarily disable the warning that C90 doesn't support */
     /* `long long'.                                             */
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wlong-long"
+#endif
 
 #if 1
     /* Technically not an assembly fragment, but GCC does a really good */
@@ -496,7 +498,9 @@ FT_BEGIN_HEADER
     return (FT_Int32)result;
 #endif
 
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
 #pragma GCC diagnostic pop
+#endif
   }
 
 #endif /* __GNUC__ && __x86_64__ */
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 1180b12..dd19210 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -487,8 +487,10 @@ FT_BEGIN_HEADER
   {
     /* Temporarily disable the warning that C90 doesn't support */
     /* `long long'.                                             */
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wlong-long"
+#endif
 
 #if 1
     /* Technically not an assembly fragment, but GCC does a really good */
@@ -527,7 +529,9 @@ FT_BEGIN_HEADER
     return (FT_Int32)result;
 #endif
 
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
 #pragma GCC diagnostic pop
+#endif
   }
 
 #endif /* __GNUC__ && __x86_64__ */