From cbcf33d1d9dfd0db7a3cd013b5870da1366a65c6 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 12 May 2013 07:27:48 +0200 Subject: [PATCH] Introduce unsigned 64bit type (if available). * include/freetype/config/ftconfig.h: Define FT_UINT64 if available. [FT_LONG64]: Provide FT_UInt64. * builds/unix/ftconfig.in: Synchronized. --- ChangeLog | 9 +++++++++ builds/unix/ftconfig.in | 15 ++++++++++++++- include/freetype/config/ftconfig.h | 30 ++++++++++++++++++++++++------ 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7d4039ff..f3be77cda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2013-05-12 Werner Lemberg + + Introduce unsigned 64bit type (if available). + + * include/freetype/config/ftconfig.h: Define FT_UINT64 if available. + [FT_LONG64]: Provide FT_UInt64. + + * builds/unix/ftconfig.in: Synchronized. + 2013-05-12 Werner Lemberg Fix Savannah bug #38968. diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in index e0ad0ff1d..d171e2476 100644 --- a/builds/unix/ftconfig.in +++ b/builds/unix/ftconfig.in @@ -242,6 +242,18 @@ FT_BEGIN_HEADER /* */ typedef signed XXX FT_Int64; + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt64 */ + /* */ + /* A typedef for a 64bit unsigned integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef unsigned XXX FT_UInt64; + /* */ #endif @@ -339,7 +351,8 @@ FT_BEGIN_HEADER #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ #ifdef FT_LONG64 - typedef FT_INT64 FT_Int64; + typedef FT_INT64 FT_Int64; + typedef FT_UINT64 FT_UInt64; #endif diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h index 5d96161bd..5dce30ef3 100644 --- a/include/freetype/config/ftconfig.h +++ b/include/freetype/config/ftconfig.h @@ -212,6 +212,18 @@ FT_BEGIN_HEADER /* */ typedef signed XXX FT_Int64; + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt64 */ + /* */ + /* A typedef for a 64bit unsigned integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef unsigned XXX FT_UInt64; + /* */ #endif @@ -251,13 +263,15 @@ FT_BEGIN_HEADER /* FT_LONG64 must be defined if a 64-bit type is available */ #define FT_LONG64 -#define FT_INT64 long +#define FT_INT64 long +#define FT_UINT64 unsigned long #elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __BORLANDC__ ) /* Borland C++ */ @@ -266,7 +280,8 @@ FT_BEGIN_HEADER /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __WATCOMC__ ) /* Watcom C++ */ @@ -275,13 +290,15 @@ FT_BEGIN_HEADER #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ #define FT_LONG64 -#define FT_INT64 long long int +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int #elif defined( __GNUC__ ) /* GCC provides the `long long' type */ #define FT_LONG64 -#define FT_INT64 long long int +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ @@ -306,7 +323,8 @@ FT_BEGIN_HEADER #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ #ifdef FT_LONG64 - typedef FT_INT64 FT_Int64; + typedef FT_INT64 FT_Int64; + typedef FT_UINT64 FT_UInt64; #endif