diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2010-06-13 11:58:21 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2010-06-13 11:58:21 +0000 |
commit | 7ef66445c67a38eae29a96876837a3bbbb6897cc (patch) | |
tree | b19ade390c1552db84c0144327b1c3d36244de64 /Build/source/texk/web2c/xetexdir/XeTeX_mac.c | |
parent | 92eecf464fadcf5935e6a001b2bc549564451a50 (diff) |
mac-only compatibility/portability fixes
git-svn-id: svn://tug.org/texlive/trunk@18933 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeX_mac.c')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_mac.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c index 30a891b83f1..20b3a6dcbfc 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c @@ -35,9 +35,9 @@ authorization from the copyright holders. */ #ifdef __POWERPC__ -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_2 +#define MAC_OS_X_VERSION_MIN_REQUIRED 1030 #else -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 +#define MAC_OS_X_VERSION_MIN_REQUIRED 1040 #endif #define EXTERN extern @@ -492,6 +492,7 @@ ats_failed: int GetGlyphIDFromCGFont(ATSFontRef atsFontRef, const char* glyphName) { +#if defined(MAC_OS_X_VERSION_10_5) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) if (&CGFontGetGlyphWithGlyphName == NULL) return 0; @@ -512,6 +513,9 @@ int GetGlyphIDFromCGFont(ATSFontRef atsFontRef, const char* glyphName) } } return rval; +#else + return 0; +#endif } char* @@ -562,6 +566,7 @@ GetGlyphNameFromCGFont(ATSFontRef atsFontRef, UInt16 gid, int* len) static char buffer[256]; buffer[0] = 0; +#if defined(MAC_OS_X_VERSION_10_5) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) if (&CGFontCopyGlyphNameForGlyph == NULL) return &buffer[0]; @@ -581,6 +586,8 @@ GetGlyphNameFromCGFont(ATSFontRef atsFontRef, UInt16 gid, int* len) CGFontRelease(cgfont); } } +#endif + return &buffer[0]; } |