Commit 26472b4f166d0ac2f3f3b31fa6c047a5cadc828b

Werner Lemberg 2012-07-09T09:55:50

Fix compilation with MSVC 5.0. Problem reported by Peter Breitenlohner and Akira Kakuto. * include/freetype/config/ftstdlib.h (ft_setjmp): Updated. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast.

diff --git a/ChangeLog b/ChangeLog
index 5b1c256..f77a3b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-07-09  Werner Lemberg  <wl@gnu.org>
 
+	Fix compilation with MSVC 5.0.
+
+	Problem reported by Peter Breitenlohner and Akira Kakuto.
+
+	* include/freetype/config/ftstdlib.h (ft_setjmp): Updated.
+	* src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast.
+
+2012-07-09  Werner Lemberg  <wl@gnu.org>
+
 	[autofit] Improve debugging messages; do some code cleanup.
 
 	* src/autofit/aflatin.c (af_latin_align_linked_edge,
diff --git a/include/freetype/config/ftstdlib.h b/include/freetype/config/ftstdlib.h
index 11d5d0e..b940efc 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -5,7 +5,7 @@
 /*    ANSI-specific library and header configuration file (specification   */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 2002-2007, 2009, 2011 by                                     */
+/*  Copyright 2002-2007, 2009, 2011-2012 by                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -159,7 +159,7 @@
                                 /*       on certain platforms           */
 
 #define ft_longjmp     longjmp
-#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) )    /* same thing here */
+#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
 
 
   /* the following is only used for debugging purposes, i.e., if */
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 1dfd987..7957e12 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType character mapping table (cmap) support (body).              */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by      */
+/*  Copyright 2002-2010, 2012 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -3452,8 +3452,7 @@
 
             valid.num_glyphs = (FT_UInt)face->max_profile.numGlyphs;
 
-            if ( ft_setjmp(
-              *((ft_jmp_buf*)&FT_VALIDATOR( &valid )->jump_buffer) ) == 0 )
+            if ( ft_setjmp( FT_VALIDATOR( &valid )->jump_buffer) == 0 )
             {
               /* validate this cmap sub-table */
               error = clazz->validate( cmap, FT_VALIDATOR( &valid ) );