summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2021-08-18 23:05:51 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2021-08-18 23:05:51 -0400
commit857038399a28b9379317b46317bb85634f969c9d (patch)
tree818caace36a1a81c0c5af08ebf2e052acc807e92
parente2cceed857f0b4f3f3fd48681d2f3009e62d1194 (diff)
downloadfreetype2-857038399a28b9379317b46317bb85634f969c9d.tar.gz
Use FT_INT64 instead of FT_LONG64.
* include/freetype/config/integer-types.h: Remove synonymous FT_LONG64. * include/freetype/internal/ftcalc.h: s/FT_LONG64/FT_INT64/. * src/base/ftcalc.c: Ditto. * src/base/fttrigon.c: Ditto. * src/smooth/ftgrays.c: Ditto.
-rw-r--r--include/freetype/config/integer-types.h9
-rw-r--r--include/freetype/internal/ftcalc.h4
-rw-r--r--src/base/ftcalc.c14
-rw-r--r--src/base/fttrigon.c6
-rw-r--r--src/smooth/ftgrays.c6
5 files changed, 16 insertions, 23 deletions
diff --git a/include/freetype/config/integer-types.h b/include/freetype/config/integer-types.h
index 4bb3eedab..0f3f3ee2b 100644
--- a/include/freetype/config/integer-types.h
+++ b/include/freetype/config/integer-types.h
@@ -178,8 +178,6 @@
/* Autoconf */
#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
- /* `FT_LONG64` must be defined if a 64-bit type is available */
-#define FT_LONG64
#define FT_INT64 long
#define FT_UINT64 unsigned long
@@ -194,14 +192,12 @@
#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
-#define FT_LONG64
#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_LONG64
#define FT_INT64 __int64
#define FT_UINT64 unsigned __int64
@@ -211,7 +207,6 @@
/* to test the compiler version. */
/* this compiler provides the `__int64` type */
-#define FT_LONG64
#define FT_INT64 __int64
#define FT_UINT64 unsigned __int64
@@ -221,14 +216,12 @@
#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
@@ -236,7 +229,7 @@
#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
-#ifdef FT_LONG64
+#ifdef FT_INT64
typedef FT_INT64 FT_Int64;
typedef FT_UINT64 FT_UInt64;
#endif
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 15025e871..f24930792 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -487,7 +487,7 @@ FT_BEGIN_HEADER
#define NEG_INT32( a ) \
(FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) )
-#ifdef FT_LONG64
+#ifdef FT_INT64
#define ADD_INT64( a, b ) \
(FT_Int64)( (FT_UInt64)(a) + (FT_UInt64)(b) )
@@ -498,7 +498,7 @@ FT_BEGIN_HEADER
#define NEG_INT64( a ) \
(FT_Int64)( (FT_UInt64)0 - (FT_UInt64)(a) )
-#endif /* FT_LONG64 */
+#endif /* FT_INT64 */
FT_END_HEADER
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index e60303afc..9df8e4010 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -45,7 +45,7 @@
/* we need to emulate a 64-bit data type if a real one isn't available */
-#ifndef FT_LONG64
+#ifndef FT_INT64
typedef struct FT_Int64_
{
@@ -54,7 +54,7 @@
} FT_Int64;
-#endif /* !FT_LONG64 */
+#endif /* !FT_INT64 */
/**************************************************************************
@@ -79,7 +79,7 @@
FT_END_STMNT
/* The following three functions are available regardless of whether */
- /* FT_LONG64 is defined. */
+ /* FT_INT64 is defined. */
/* documentation is in freetype.h */
@@ -164,7 +164,7 @@
}
-#ifdef FT_LONG64
+#ifdef FT_INT64
/* documentation is in freetype.h */
@@ -272,7 +272,7 @@
}
-#else /* !FT_LONG64 */
+#else /* !FT_INT64 */
static void
@@ -651,7 +651,7 @@
}
-#endif /* !FT_LONG64 */
+#endif /* !FT_INT64 */
/* documentation is in ftglyph.h */
@@ -985,7 +985,7 @@
/* we silently ignore overflow errors since such large values */
/* lead to even more (harmless) rendering errors later on */
-#ifdef FT_LONG64
+#ifdef FT_INT64
FT_Int64 delta = SUB_INT64( MUL_INT64( in_x, out_y ),
MUL_INT64( in_y, out_x ) );
diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c
index 990c46d99..0ca6d7810 100644
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -53,7 +53,7 @@
};
-#ifdef FT_LONG64
+#ifdef FT_INT64
/* multiply a given value by the CORDIC shrink factor */
static FT_Fixed
@@ -76,7 +76,7 @@
return s < 0 ? -val : val;
}
-#else /* !FT_LONG64 */
+#else /* !FT_INT64 */
/* multiply a given value by the CORDIC shrink factor */
static FT_Fixed
@@ -125,7 +125,7 @@
return s < 0 ? -val : val;
}
-#endif /* !FT_LONG64 */
+#endif /* !FT_INT64 */
/* undefined and never called for zero vector */
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 250053e8d..0ae187f2b 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -625,7 +625,7 @@ typedef ptrdiff_t FT_PtrDist;
}
-#ifndef FT_LONG64
+#ifndef FT_INT64
/**************************************************************************
*
@@ -1015,11 +1015,11 @@ typedef ptrdiff_t FT_PtrDist;
/*
* For now, the code that depends on `BEZIER_USE_DDA` requires `FT_Int64`
- * to be defined. If `FT_LONG64` is not defined, meaning there is no
+ * to be defined. If `FT_INT64` is not defined, meaning there is no
* 64-bit type available, disable it to avoid compilation errors. See for
* example https://gitlab.freedesktop.org/freetype/freetype/-/issues/1071.
*/
-#if !defined( FT_LONG64 )
+#if !defined( FT_INT64 )
# undef BEZIER_USE_DDA
# define BEZIER_USE_DDA 0
#endif