summaryrefslogtreecommitdiff
path: root/builds/mac
diff options
context:
space:
mode:
authorSuzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp>2008-08-18 06:02:07 +0000
committerSuzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp>2008-08-18 06:02:07 +0000
commitfdc2d7618a8addfb7f1f4003ae444d14a4d562b0 (patch)
tree45aa81a6fba7cc0fc7d23155a9335d00cfe343c7 /builds/mac
parenta8700d428beebfbe5ed042dd691a8d02b007b154 (diff)
downloadfreetype2-fdc2d7618a8addfb7f1f4003ae444d14a4d562b0.tar.gz
* src/base/ftmac.c: Add a fallback for the case that HAVE_TYPE_RESOURCE_INDEX is not set by configure
Diffstat (limited to 'builds/mac')
-rw-r--r--builds/mac/ftmac.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c
index 6e91a8f29..8b4d29560 100644
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -145,9 +145,21 @@
#endif
#endif
- /* Some portable types are unavailable on legacy SDKs */
-#ifndef MAC_OS_X_VERSION_10_5
-typedef short ResourceIndex;
+ /* configure checks the availability of ResourceIndex strictly */
+ /* and set HAVE_TYPE_RESOURCE_INDEX 1 or 0 always. If it is */
+ /* not set (e.g. build without configure), the availability */
+ /* is supposed from the SDK version but this is uncertain. */
+#if !defined( HAVE_TYPE_RESOURCE_INDEX )
+#if !defined( MAC_OS_X_VERSION_10_5 ) || \
+# ( MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 )
+#define HAVE_TYPE_RESOURCE_INDEX 0
+#else
+#define HAVE_TYPE_RESOURCE_INDEX 1
+#endif
+#endif
+
+#if ( HAVE_TYPE_RESOURCE_INDEX == 0 )
+typedef short ResourceIndex;
#endif
/* Set PREFER_LWFN to 1 if LWFN (Type 1) is preferred over