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 | |
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')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_mac.c | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/xetex.h | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index c4f82e8fd72..dd9934c41b9 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -59,6 +59,7 @@ authorization from the copyright holders. #ifdef XETEX_MAC #undef input /* this is defined in texmfmp.h, but we don't need it and it confuses the carbon headers */ +#undef output #include <Carbon/Carbon.h> #endif 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]; } diff --git a/Build/source/texk/web2c/xetexdir/xetex.h b/Build/source/texk/web2c/xetexdir/xetex.h index ce149b221f0..c88942d222f 100644 --- a/Build/source/texk/web2c/xetexdir/xetex.h +++ b/Build/source/texk/web2c/xetexdir/xetex.h @@ -99,6 +99,8 @@ void* getotassemblyptr(int f, int g, int horiz); /* function in XeTeXOTMath.cpp #define Xchr(x) (x) #ifdef XETEX_MAC +#undef input /* this is defined in texmfmp.h, but we don't need it and it confuses the carbon headers */ +#undef output #include <Carbon/Carbon.h> /* for Mac OS X, it's handy to have the Carbon APIs available */ #endif |