[mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON was a configurable macro to disable Carbon-dependent code. Because now configure script sets DARWIN_NO_CARBON by default and disables Darwin & Carbon-dependent codes, these macros can be unified. FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON (defined by default) is removed, because DARWIN_NO_CARBON violates FT_XXX naming convention of public macros, and a macro configured by default is not portable for the building without configure (e.g. make devel). * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based old Mac font support is requested and Carbon is available. * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is requested. * include/freetype/config/ftconfig.in: Ditto. * builds/vms/ftconfig.h: Ditto. * src/base/ftbase.h: Remove DARWIN_NO_CARBON. * src/base/ftbase.c: Ditto. * src/base/ftobjs.c: Ditto. * src/base/ftrfork.c: Ditto. * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c). * builds/mac/ftmac.c: Ditto. * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH. * builds/mac/FreeType.m68k_far.make.txt: Ditto. * builds/mac/FreeType.ppc_classic.make.txt: Ditto. * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
This commit is contained in:
parent
2968bd6098
commit
714ee56ab1
36
ChangeLog
36
ChangeLog
@ -1,3 +1,39 @@
|
||||
2011-12-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
[mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
|
||||
|
||||
Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
|
||||
was a configurable macro to disable Carbon-dependent code. Because
|
||||
now configure script sets DARWIN_NO_CARBON by default and disables
|
||||
Darwin & Carbon-dependent codes, these macros can be unified.
|
||||
FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
|
||||
(defined by default) is removed, because DARWIN_NO_CARBON violates
|
||||
FT_XXX naming convention of public macros, and a macro configured by
|
||||
default is not portable for the building without configure (e.g.
|
||||
make devel).
|
||||
|
||||
* builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
|
||||
old Mac font support is requested and Carbon is available.
|
||||
* builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
|
||||
for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is
|
||||
requested.
|
||||
* include/freetype/config/ftconfig.in: Ditto.
|
||||
* builds/vms/ftconfig.h: Ditto.
|
||||
|
||||
* src/base/ftbase.h: Remove DARWIN_NO_CARBON.
|
||||
* src/base/ftbase.c: Ditto.
|
||||
* src/base/ftobjs.c: Ditto.
|
||||
* src/base/ftrfork.c: Ditto.
|
||||
|
||||
* src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
|
||||
(same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
|
||||
* builds/mac/ftmac.c: Ditto.
|
||||
|
||||
* builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
|
||||
* builds/mac/FreeType.m68k_far.make.txt: Ditto.
|
||||
* builds/mac/FreeType.ppc_classic.make.txt: Ditto.
|
||||
* builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
|
||||
|
||||
2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
Fix Savannah bug #34728 (`make devel' on Mac OS X).
|
||||
|
@ -17,6 +17,7 @@ Includes = \xB6
|
||||
Sym-68K = -sym off
|
||||
|
||||
COptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=0 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
|
@ -16,6 +16,7 @@ Includes = \xB6
|
||||
Sym-68K = -sym off
|
||||
|
||||
COptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=0 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
|
@ -17,6 +17,7 @@ Includes = \xB6
|
||||
Sym-PPC = -sym off
|
||||
|
||||
PPCCOptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=1 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
|
@ -17,6 +17,7 @@ Includes = \xB6
|
||||
Sym-PPC = -sym off
|
||||
|
||||
PPCCOptions = \xB6
|
||||
-d FT_MACINTOSH=1 \xB6
|
||||
-d HAVE_FSSPEC=1 \xB6
|
||||
-d HAVE_FSREF=0 \xB6
|
||||
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
|
||||
|
@ -171,6 +171,7 @@ typedef short ResourceIndex;
|
||||
#define PREFER_LWFN 1
|
||||
#endif
|
||||
|
||||
#ifdef FT_MACINTOSH
|
||||
|
||||
#if !HAVE_QUICKDRAW_CARBON /* QuickDraw is deprecated since Mac OS X 10.4 */
|
||||
|
||||
@ -1527,5 +1528,7 @@ typedef short ResourceIndex;
|
||||
|
||||
}
|
||||
|
||||
#endif /* FT_MACINTOSH */
|
||||
|
||||
|
||||
/* END */
|
||||
|
@ -331,7 +331,7 @@ if test x$with_old_mac_fonts = xyes; then
|
||||
[AC_MSG_RESULT([ok])
|
||||
ftmac_c='ftmac.c'
|
||||
AC_MSG_CHECKING([OS_INLINE macro is ANSI compatible])
|
||||
orig_CFLAGS="$CFLAGS"
|
||||
orig_CFLAGS="$CFLAGS -DFT_MACINTOSH"
|
||||
CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([
|
||||
|
@ -142,8 +142,7 @@ FT_BEGIN_HEADER
|
||||
/* This is the only necessary change, so it is defined here instead */
|
||||
/* providing a new configuration file. */
|
||||
/* */
|
||||
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
|
||||
( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
/* no Carbon frameworks for 64bit 10.4.x */
|
||||
/* AvailabilityMacros.h is available since Mac OS X 10.2, */
|
||||
/* so guess the system version by maximum errno before inclusion */
|
||||
@ -153,9 +152,7 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
#if defined( __LP64__ ) && \
|
||||
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
|
||||
#define DARWIN_NO_CARBON 1
|
||||
#else
|
||||
#define FT_MACINTOSH 1
|
||||
/undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
|
@ -95,8 +95,7 @@ FT_BEGIN_HEADER
|
||||
/* This is the only necessary change, so it is defined here instead */
|
||||
/* providing a new configuration file. */
|
||||
/* */
|
||||
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
|
||||
( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
/* no Carbon frameworks for 64bit 10.4.x */
|
||||
/* AvailabilityMacros.h is available since Mac OS X 10.2, */
|
||||
/* so guess the system version by maximum errno before inclusion */
|
||||
@ -106,9 +105,7 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
#if defined( __LP64__ ) && \
|
||||
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
|
||||
#define DARWIN_NO_CARBON 1
|
||||
#else
|
||||
#define FT_MACINTOSH 1
|
||||
#undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
|
@ -120,8 +120,7 @@ FT_BEGIN_HEADER
|
||||
/* This is the only necessary change, so it is defined here instead */
|
||||
/* providing a new configuration file. */
|
||||
/* */
|
||||
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
|
||||
( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
/* no Carbon frameworks for 64bit 10.4.x */
|
||||
/* AvailabilityMacros.h is available since Mac OS X 10.2, */
|
||||
/* so guess the system version by maximum errno before inclusion */
|
||||
@ -131,9 +130,7 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
#if defined( __LP64__ ) && \
|
||||
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
|
||||
#define DARWIN_NO_CARBON 1
|
||||
#else
|
||||
#define FT_MACINTOSH 1
|
||||
#undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "fttrigon.c"
|
||||
#include "ftutil.c"
|
||||
|
||||
#if defined( FT_MACINTOSH ) && !defined ( DARWIN_NO_CARBON )
|
||||
#ifdef FT_MACINTOSH
|
||||
#include "ftmac.c"
|
||||
#endif
|
||||
|
||||
|
@ -49,8 +49,8 @@ FT_BEGIN_HEADER
|
||||
FT_Face *aface );
|
||||
|
||||
|
||||
#if defined( FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK ) && \
|
||||
( !defined( FT_MACINTOSH ) || defined( DARWIN_NO_CARBON ) )
|
||||
#if defined( FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK ) && \
|
||||
!defined( FT_MACINTOSH )
|
||||
/* Mac OS X/Darwin kernel often changes recommended method to access */
|
||||
/* the resource fork and older methods makes the kernel issue the */
|
||||
/* warning of deprecated method. To calm it down, the methods based */
|
||||
|
@ -119,6 +119,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FT_MACINTOSH
|
||||
|
||||
/* This function is deprecated because FSSpec is deprecated in Mac OS X */
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_GetFile_From_Mac_Name( const char* fontName,
|
||||
@ -1053,5 +1055,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* FT_MACINTOSH */
|
||||
|
||||
|
||||
/* END */
|
||||
|
@ -1187,7 +1187,7 @@
|
||||
/* there's a Mac-specific extended implementation of FT_New_Face() */
|
||||
/* in src/base/ftmac.c */
|
||||
|
||||
#if !defined( FT_MACINTOSH ) || defined( DARWIN_NO_CARBON )
|
||||
#ifndef FT_MACINTOSH
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
@ -1211,7 +1211,7 @@
|
||||
return FT_Open_Face( library, &args, face_index, aface );
|
||||
}
|
||||
|
||||
#endif /* defined( FT_MACINTOSH ) && !defined( DARWIN_NO_CARBON ) */
|
||||
#endif
|
||||
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
@ -1520,7 +1520,7 @@
|
||||
}
|
||||
|
||||
|
||||
#if !defined( FT_MACINTOSH ) || defined( DARWIN_NO_CARBON )
|
||||
#ifndef FT_MACINTOSH
|
||||
|
||||
/* The resource header says we've got resource_cnt `POST' (type1) */
|
||||
/* resources in this file. They all need to be coalesced into */
|
||||
|
@ -417,7 +417,7 @@
|
||||
}
|
||||
|
||||
|
||||
#if !defined( FT_MACINTOSH ) || defined( DARWIN_NO_CARBON )
|
||||
#ifndef FT_MACINTOSH
|
||||
static FT_RFork_Rule
|
||||
raccess_get_rule_type_from_rule_index( FT_UInt rule_index )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user