freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 24fbed0 1/2: Still handle `__FTERRORS_H__'.


From: Werner LEMBERG
Subject: [freetype2] master 24fbed0 1/2: Still handle `__FTERRORS_H__'.
Date: Wed, 20 Jan 2016 20:13:57 +0000

branch: master
commit 24fbed052fbacb690f62bc4b0abfa29f668a35c2
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Still handle `__FTERRORS_H__'.
    
    We need this for backwards compatibility.
    
    Problem reported by John Emmas <address@hidden>.
    
    * include/freetype/fterrors.h: Fix inclusion guard so that
    undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
    expected.
---
 ChangeLog                   |   12 ++++++++++++
 include/freetype/fterrors.h |   14 ++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 721c5d9..d2fc27f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2016-01-20  Werner Lemberg  <address@hidden>
+
+       Still handle `__FTERRORS_H__'.
+
+       We need this for backwards compatibility.
+
+       Problem reported by John Emmas <address@hidden>.
+
+       * include/freetype/fterrors.h: Fix inclusion guard so that
+       undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
+       expected.
+
 2016-01-19  Werner Lemberg  <address@hidden>
 
        [autofit] Fix handling of default script.
diff --git a/include/freetype/fterrors.h b/include/freetype/fterrors.h
index 64839b7..e15bfb0 100644
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -99,8 +99,18 @@
 
   /* */
 
-#ifndef FTERRORS_H_
+  /* In previous FreeType versions we used `__FTERRORS_H__'.  However, */
+  /* using two successive underscores in a non-system symbol name      */
+  /* violates the C (and C++) standard, so it was changed to the       */
+  /* current form.  In spite of this, we have to make                  */
+  /*                                                                   */
+  /*   #undefine __FTERRORS_H__                                        */
+  /*                                                                   */
+  /* work for backwards compatibility.                                 */
+  /*                                                                   */
+#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )
 #define FTERRORS_H_
+#define __FTERRORS_H__
 
 
   /* include module base error codes */
@@ -210,7 +220,7 @@
 #undef FT_ERR_PREFIX
 #endif
 
-#endif /* FTERRORS_H_ */
+#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */
 
 
 /* END */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]