Fix 64bit compilation issues.
* include/freetype/config/ftconfig.h [FT_LONG64]: Typedef `FT_Int64' here. * src/base/ftcalc.c: Remove typedef of `FT_Int64'. (FT_DivFix): Fix cast. * src/base/fttrigon.c: Remove typedef of `FT_Int64'.
This commit is contained in:
parent
073a0e2901
commit
d135e27c23
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2013-05-05 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Fix 64bit compilation issues.
|
||||||
|
|
||||||
|
* include/freetype/config/ftconfig.h [FT_LONG64]: Typedef
|
||||||
|
`FT_Int64' here.
|
||||||
|
|
||||||
|
* src/base/ftcalc.c: Remove typedef of `FT_Int64'.
|
||||||
|
(FT_DivFix): Fix cast.
|
||||||
|
* src/base/fttrigon.c: Remove typedef of `FT_Int64'.
|
||||||
|
|
||||||
2013-05-05 Werner Lemberg <wl@gnu.org>
|
2013-05-05 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[raster] Fix clang issues.
|
[raster] Fix clang issues.
|
||||||
|
|
|
@ -200,6 +200,18 @@ FT_BEGIN_HEADER
|
||||||
/* */
|
/* */
|
||||||
typedef unsigned XXX FT_UInt32;
|
typedef unsigned XXX FT_UInt32;
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* <Type> */
|
||||||
|
/* FT_Int64 */
|
||||||
|
/* */
|
||||||
|
/* A typedef for a 64bit signed 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 signed XXX FT_Int64;
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -293,6 +305,10 @@ FT_BEGIN_HEADER
|
||||||
|
|
||||||
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
|
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
|
||||||
|
|
||||||
|
#ifdef FT_LONG64
|
||||||
|
typedef FT_INT64 FT_Int64;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define FT_BEGIN_STMNT do {
|
#define FT_BEGIN_STMNT do {
|
||||||
#define FT_END_STMNT } while ( 0 )
|
#define FT_END_STMNT } while ( 0 )
|
||||||
|
|
|
@ -43,13 +43,9 @@
|
||||||
#undef FT_MulFix
|
#undef FT_MulFix
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* we need to define a 64-bits data type here */
|
/* we need to emulate a 64-bit data type if a real one isn't available */
|
||||||
|
|
||||||
#ifdef FT_LONG64
|
#ifndef FT_LONG64
|
||||||
|
|
||||||
typedef FT_INT64 FT_Int64;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
typedef struct FT_Int64_
|
typedef struct FT_Int64_
|
||||||
{
|
{
|
||||||
|
@ -58,7 +54,7 @@
|
||||||
|
|
||||||
} FT_Int64;
|
} FT_Int64;
|
||||||
|
|
||||||
#endif /* FT_LONG64 */
|
#endif /* !FT_LONG64 */
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -302,7 +298,7 @@
|
||||||
q = 0x7FFFFFFFL;
|
q = 0x7FFFFFFFL;
|
||||||
else
|
else
|
||||||
/* compute result directly */
|
/* compute result directly */
|
||||||
q = (FT_UInt32)( ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b );
|
q = (FT_UInt32)( ( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / b );
|
||||||
|
|
||||||
return ( s < 0 ? -(FT_Long)q : (FT_Long)q );
|
return ( s < 0 ? -(FT_Long)q : (FT_Long)q );
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,11 +35,6 @@
|
||||||
#include FT_TRIGONOMETRY_H
|
#include FT_TRIGONOMETRY_H
|
||||||
|
|
||||||
|
|
||||||
#ifdef FT_LONG64
|
|
||||||
typedef FT_INT64 FT_Int64;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* the Cordic shrink factor 0.858785336480436 * 2^32 */
|
/* the Cordic shrink factor 0.858785336480436 * 2^32 */
|
||||||
#define FT_TRIG_SCALE 0xDBD95B16UL
|
#define FT_TRIG_SCALE 0xDBD95B16UL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue