shithub: freetype+ttf2subf

Download patch

ref: 294ce11b00f66a981007e43f0e6bc5c108ee2995
parent: 25b6e600c17a647f5bc54658a6862819600fa37e
author: Werner Lemberg <[email protected]>
date: Wed Jun 12 19:33:11 EDT 2013

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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2013-06-12  Werner Lemberg  <[email protected]>.
 
+	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  <[email protected]>.
+
 	* include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
 
 	This partially undoes commit 3f6e0e0c.
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -247,19 +247,6 @@
   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__ */
--- 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
@@ -762,10 +754,6 @@
 #define FT_SERVICE_TRUETYPE_GLYF_H      <freetype/internal/services/svttglyf.h>
 
  /* */
-
-#if defined( _MSC_VER )
-#pragma warning( pop )
-#endif
 
 FT_END_HEADER
 
--- 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,       */
@@ -46,6 +46,18 @@
 #define FT_INTERNAL_POSTSCRIPT_GLOBALS_H  <freetype/internal/psglobal.h>
 
 #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 */