Commit 294ce11b00f66a981007e43f0e6bc5c108ee2995

Werner Lemberg 2013-06-12T23:33:11

Another try on pragmas. * include/freetype/internal/ftdebug.h: Move pragmas to... * include/freetype/internal/internal.h: ... this file since it gets included by all source files. * include/freetype/internal/ftserv.h: Remove pragma which has no effect.

diff --git a/ChangeLog b/ChangeLog
index b1e55a6..96b1528 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2013-06-12  Werner Lemberg  <wl@gnu.org>.
 
+	Another try on pragmas.
+
+	* include/freetype/internal/ftdebug.h: Move pragmas to...
+	* include/freetype/internal/internal.h: ... this file since it gets
+	included by all source files.
+	* include/freetype/internal/ftserv.h: Remove pragma which has no
+	effect.
+
+2013-06-12  Werner Lemberg  <wl@gnu.org>.
+
 	* include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
 
 	This partially undoes commit 3f6e0e0c.
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index ede3872..58a3916 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -247,19 +247,6 @@ FT_BEGIN_HEADER
   FT_BASE( void )
   ft_debug_init( void );
 
-
-#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
-
-  /* We disable the warning `conditional expression is constant' here */
-  /* in order to compile cleanly with the maximum level of warnings.  */
-  /* In particular, the warning complains about stuff like `while(0)' */
-  /* which is very useful in macro definitions.  There is no benefit  */
-  /* in having it enabled.                                            */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-
-
 FT_END_HEADER
 
 #endif /* __FTDEBUG_H__ */
diff --git a/include/freetype/internal/ftserv.h b/include/freetype/internal/ftserv.h
index 4ac988b..cd5fbd0 100644
--- a/include/freetype/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -34,14 +34,6 @@
 
 FT_BEGIN_HEADER
 
-#if defined( _MSC_VER )      /* Visual C++ (and Intel C++)  */
-  /* We disable the warning `conditional expression is      */
-  /* constant' in order to compile cleanly with the maximum */
-  /* level of warnings.                                     */
-#pragma warning( push )
-#pragma warning( disable : 4127 )
-#endif /* _MSC_VER */
-
   /*
    * @macro:
    *   FT_FACE_FIND_SERVICE
@@ -763,10 +755,6 @@ FT_BEGIN_HEADER
 
  /* */
 
-#if defined( _MSC_VER )
-#pragma warning( pop )
-#endif
-
 FT_END_HEADER
 
 #endif /* __FTSERV_H__ */
diff --git a/include/freetype/internal/internal.h b/include/freetype/internal/internal.h
index f500a65..262afcf 100644
--- a/include/freetype/internal/internal.h
+++ b/include/freetype/internal/internal.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Internal header files (specification only).                          */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004 by                               */
+/*  Copyright 1996-2004, 2013 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -48,4 +48,16 @@
 #define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
 
 
+#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
+
+  /* We disable the warning `conditional expression is constant' here */
+  /* in order to compile cleanly with the maximum level of warnings.  */
+  /* In particular, the warning complains about stuff like `while(0)' */
+  /* which is very useful in macro definitions.  There is no benefit  */
+  /* in having it enabled.                                            */
+#pragma warning( disable : 4127 )
+
+#endif /* _MSC_VER */
+
+
 /* END */