* src/base/ftmac.c: Add a fallback for the case that HAVE_TYPE_RESOURCE_INDEX is not set by configure
This commit is contained in:
parent
a8700d428b
commit
fdc2d7618a
|
@ -1,3 +1,12 @@
|
||||||
|
2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||||
|
|
||||||
|
* src/base/ftmac.c: Add a fallback to suppose the availability
|
||||||
|
of ResourceIndex type. It is used when built without configure
|
||||||
|
(e.g. build by Jam).
|
||||||
|
* builds/mac/ftmac.c: Ditto.
|
||||||
|
* builds/unix/configure.raw: Set HAVE_TYPE_RESOURCE_INDEX
|
||||||
|
to 1 or 0 explicitly, even if ResourceIndex is unavailable.
|
||||||
|
|
||||||
2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||||
|
|
||||||
* builds/unix/configure.raw: In checking of Mac OS X features,
|
* builds/unix/configure.raw: In checking of Mac OS X features,
|
||||||
|
|
|
@ -145,8 +145,20 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some portable types are unavailable on legacy SDKs */
|
/* configure checks the availability of ResourceIndex strictly */
|
||||||
#ifndef MAC_OS_X_VERSION_10_5
|
/* 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;
|
typedef short ResourceIndex;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -285,10 +285,11 @@ if test x$with_old_mac_fonts = xyes; then
|
||||||
])],
|
])],
|
||||||
[AC_MSG_RESULT([ok])
|
[AC_MSG_RESULT([ok])
|
||||||
CFLAGS="$orig_CFLAGS"
|
CFLAGS="$orig_CFLAGS"
|
||||||
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX"
|
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1"
|
||||||
],
|
],
|
||||||
[AC_MSG_RESULT([no])
|
[AC_MSG_RESULT([no])
|
||||||
CFLAGS="$orig_CFLAGS"
|
CFLAGS="$orig_CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
|
||||||
])],
|
])],
|
||||||
[AC_MSG_RESULT([not found])
|
[AC_MSG_RESULT([not found])
|
||||||
LDFLAGS="${orig_LDFLAGS}"
|
LDFLAGS="${orig_LDFLAGS}"
|
||||||
|
|
|
@ -77,8 +77,20 @@
|
||||||
#define OS_INLINE static __inline__
|
#define OS_INLINE static __inline__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The ResourceIndex type was available SDKs on 10.5 */
|
/* configure checks the availability of ResourceIndex strictly */
|
||||||
#ifndef HAVE_TYPE_RESOURCE_INDEX
|
/* 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;
|
typedef short ResourceIndex;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue