summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/builds/unix/ftconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/builds/unix/ftconfig.h')
-rw-r--r--src/3rdparty/freetype/builds/unix/ftconfig.h280
1 files changed, 246 insertions, 34 deletions
diff --git a/src/3rdparty/freetype/builds/unix/ftconfig.h b/src/3rdparty/freetype/builds/unix/ftconfig.h
index 8bd62f94d5..39bcaaea14 100644
--- a/src/3rdparty/freetype/builds/unix/ftconfig.h
+++ b/src/3rdparty/freetype/builds/unix/ftconfig.h
@@ -1,11 +1,11 @@
-/* ftconfig.h. Generated by configure. */
+/* ftconfig.h. Generated from ftconfig.in by configure. */
/***************************************************************************/
/* */
/* ftconfig.in */
/* */
/* UNIX-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2000, 2002 by */
+/* Copyright 1996-2004, 2006-2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -28,9 +28,9 @@
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
- /* The build directory is usually `freetype/builds/<system>', and */
- /* contains system-specific files that are always included first when */
- /* building the library. */
+ /* The build directory is usually `builds/<system>', and contains */
+ /* system-specific files that are always included first when building */
+ /* the library. */
/* */
/*************************************************************************/
@@ -53,23 +53,69 @@ FT_BEGIN_HEADER
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
- /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+ /* `builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1
+#define HAVE_STDINT_H 1
+
+
+ /* There are systems (like the Texas Instruments 'C54x) where a `char' */
+ /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */
+ /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */
+ /* is probably unexpected. */
+ /* */
+ /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */
+ /* `char' type. */
+
+#ifndef FT_CHAR_BIT
+#define FT_CHAR_BIT CHAR_BIT
+#endif
+
+
+/* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */
+#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
+#define FT_SIZEOF_INT SIZEOF_INT
+#define FT_SIZEOF_LONG SIZEOF_LONG
+
+#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
+
+ /* Following cpp computation of the bit length of int and long */
+ /* is copied from default include/config/ftconfig.h. */
+ /* If any improvement is required for this file, it should be */
+ /* applied to the original header file for the builders that */
+ /* does not use configure script. */
+
+ /* The size of an `int' type. */
+#if FT_UINT_MAX == 0xFFFFUL
+#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
+#elif FT_UINT_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
+#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
+#else
+#error "Unsupported size of `int' type!"
+#endif
-#define FT_SIZEOF_INT SIZEOF_INT
-#define FT_SIZEOF_LONG SIZEOF_LONG
-
+ /* The size of a `long' type. A five-byte `long' (as used e.g. on the */
+ /* DM642) is recognized but avoided. */
+#if FT_ULONG_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
+#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
+#else
+#error "Unsupported size of `long' type!"
+#endif
- /* Preferred alignment of data */
-#define FT_ALIGNMENT 8
+#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
/* FT_UNUSED is a macro used to indicate that a given parameter is not */
@@ -92,13 +138,127 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* IntN types */
+ /* Mac support */
+ /* */
+ /* This is the only necessary change, so it is defined here instead */
+ /* providing a new configuration file. */
+ /* */
+#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
+ /* no Carbon frameworks for 64bit 10.4.x */
+ /* AvailabilityMacros.h is available since Mac OS X 10.2, */
+ /* so guess the system version by maximum errno before inclusion */
+#include <errno.h>
+#ifdef ECANCELED /* defined since 10.2 */
+#include "AvailabilityMacros.h"
+#endif
+#if defined( __LP64__ ) && \
+ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
+#undef FT_MACINTOSH
+#endif
+
+#elif defined( __SC__ ) || defined( __MRC__ )
+ /* Classic MacOS compilers */
+#include "ConditionalMacros.h"
+#if TARGET_OS_MAC
+#define FT_MACINTOSH 1
+#endif
+
+#endif
+
+
+ /* Fix compiler warning with sgi compiler */
+#if defined( __sgi ) && !defined( __GNUC__ )
+#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
+#pragma set woff 3505
+#endif
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* basic_types */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int16 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 16bit signed integer type. */
+ /* */
+ typedef signed short FT_Int16;
+
+
+ /*************************************************************************/
/* */
- /* Used to guarantee the size of some specific integers. */
+ /* <Type> */
+ /* FT_UInt16 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 16bit unsigned integer type. */
/* */
- typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
+ /* */
+
+
+ /* this #if 0 ... #endif clause is for documentation purposes */
+#if 0
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int32 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 32bit signed integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef signed XXX FT_Int32;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt32 */
+ /* */
+ /* A typedef for a 32bit unsigned integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ 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;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* 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
+
#if FT_SIZEOF_INT == 4
typedef signed int FT_Int32;
@@ -113,40 +273,88 @@ FT_BEGIN_HEADER
#error "no 32bit type found -- please check your configuration files"
#endif
+
+ /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= 4
+
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
+
+#elif FT_SIZEOF_LONG >= 4
+
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
+
+#endif
+
+
+ /* determine whether we have a 64-bit int type for platforms without */
+ /* Autoconf */
#if FT_SIZEOF_LONG == 8
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
#define FT_INT64 long
-
-#else
+#define FT_UINT64 unsigned long
/*************************************************************************/
/* */
- /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
- /* activate it by defining the FTCALC_USE_LONG_LONG macro in */
- /* `ftoption.h'. */
+ /* A 64-bit data type may create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */
+ /* types if __STDC__ is defined. You can however ignore this rule */
+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
- /* Note that this will produce many -ansi warnings during library */
- /* compilation, and that in many cases, the generated code will be */
- /* neither smaller nor faster! */
- /* */
-#ifdef FTCALC_USE_LONG_LONG
+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+ /* this compiler provides the __int64 type */
#define FT_LONG64
-#define FT_INT64 long long
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
-#endif /* FTCALC_USE_LONG_LONG */
-#endif /* FT_SIZEOF_LONG == 8 */
+#elif defined( __BORLANDC__ ) /* Borland C++ */
+ /* XXXX: We should probably check the value of __BORLANDC__ in order */
+ /* to test the compiler version. */
-#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
-#ifdef FT_MULFIX_ASSEMBLER
-#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
-#endif
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
+
+#elif defined( __WATCOMC__ ) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#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_UINT64 unsigned long long int
+
+#endif /* _MSC_VER */
+
+#endif /* FT_SIZEOF_LONG == 8 */
+
+#ifdef FT_LONG64
+ typedef FT_INT64 FT_Int64;
+ typedef FT_UINT64 FT_UInt64;
#endif
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
+
+
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x
@@ -159,11 +367,14 @@ FT_BEGIN_HEADER
#define FT_LOCAL_DEF( x ) extern "C" x
#else
#define FT_LOCAL( x ) extern x
-#define FT_LOCAL_DEF( x ) extern x
+#define FT_LOCAL_DEF( x ) x
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
#ifndef FT_BASE
@@ -179,9 +390,9 @@ FT_BEGIN_HEADER
#ifndef FT_BASE_DEF
#ifdef __cplusplus
-#define FT_BASE_DEF( x ) extern "C" x
+#define FT_BASE_DEF( x ) x
#else
-#define FT_BASE_DEF( x ) extern x
+#define FT_BASE_DEF( x ) x
#endif
#endif /* !FT_BASE_DEF */
@@ -263,6 +474,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
+
#endif /* __FTCONFIG_H__ */