ref: 02ba0fc81e57a3934c6c1842ade6def0facf82d8
parent: 857038399a28b9379317b46317bb85634f969c9d
author: Alexei Podtelezhnikov <[email protected]>
date: Wed Aug 18 19:27:48 EDT 2021
Readily use `long long` as a 64-bit type in C99 mode. * include/freetype/config/integer-types.h (FT_INT64): FT_CONFIG_OPTION_FORCE_INT64 is no longer required to use `long long`.
--- a/include/freetype/config/integer-types.h
+++ b/include/freetype/config/integer-types.h
@@ -174,13 +174,17 @@
#endif
- /* determine whether we have a 64-bit `int` type for platforms without */
- /* Autoconf */
+ /* determine whether we have a 64-bit integer type */
#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
#define FT_INT64 long
#define FT_UINT64 unsigned long
+#elif defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
+
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
/**************************************************************************
*
* A 64-bit data type may create compilation problems if you compile in
@@ -190,13 +194,8 @@
*/
#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
-#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
-
/* this compiler provides the `__int64` type */
#define FT_INT64 __int64
#define FT_UINT64 unsigned __int64
@@ -225,7 +224,7 @@
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int
-#endif /* __STDC_VERSION__ >= 199901L */
+#endif /* !__STDC__ */
#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */