mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Fix build issue on OSX 10.4
This commit is contained in:
parent
3f67c43f78
commit
0d236eb05a
6 changed files with 80 additions and 8 deletions
|
@ -30,6 +30,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <Carbon/Carbon.h>
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
#ifndef HAVE_MACOS105_SDK
|
||||
typedef SInt16 FSIORefNum;
|
||||
#endif
|
||||
|
||||
static PyObject *MacOS_Error; /* Exception MacOS.Error */
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
|
||||
#include "pymactoolbox.h"
|
||||
|
||||
#ifndef HAVE_OSX105_SDK
|
||||
typedef SInt32 SRefCon;
|
||||
#endif
|
||||
|
||||
/* Macro to test whether a weak-loaded CFM function exists */
|
||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||
PyErr_SetString(PyExc_NotImplementedError, \
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
|
||||
#include "pymactoolbox.h"
|
||||
|
||||
#ifndef HAVE_MACOS105_SDK
|
||||
typedef SInt16 FSIORefNum;
|
||||
#endif
|
||||
|
||||
/* Macro to test whether a weak-loaded CFM function exists */
|
||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||
PyErr_SetString(PyExc_NotImplementedError, \
|
||||
|
@ -193,10 +197,6 @@ static int FSCatalogInfo_Convert(PyObject *v, FSCatalogInfo *p_itself)
|
|||
static void FSCatalogInfo_dealloc(FSCatalogInfoObject *self)
|
||||
{
|
||||
/* Cleanup of self->ob_itself goes here */
|
||||
FSPermissionInfo* info = (FSPermissionInfo*)&(self->ob_itself.permissions);
|
||||
if (info->fileSec != NULL) {
|
||||
CFRelease(info->fileSec);
|
||||
}
|
||||
self->ob_type->tp_free((PyObject *)self);
|
||||
}
|
||||
|
||||
|
|
57
configure
vendored
57
configure
vendored
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# From configure.in Revision: 63690 .
|
||||
# From configure.in Revision: 63955 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for python 2.6.
|
||||
#
|
||||
|
@ -4659,6 +4659,7 @@ echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2
|
|||
|
||||
|
||||
BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
|
||||
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
|
||||
fi
|
||||
|
||||
;;
|
||||
|
@ -12400,6 +12401,7 @@ esac
|
|||
echo "${ECHO_T}$enable_toolbox_glue" >&6; }
|
||||
|
||||
|
||||
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
Darwin/[01567]\..*)
|
||||
OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
|
||||
|
@ -12746,6 +12748,7 @@ fi
|
|||
echo "${ECHO_T}$LINKFORSHARED" >&6; }
|
||||
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
|
||||
echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
|
||||
if test ! "$LIBRARY" = "$LDLIBRARY"
|
||||
|
@ -15309,6 +15312,58 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
|
||||
echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <Carbon/Carbon.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
FSIORefNum fRef = 0
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_OSX105_SDK 1
|
||||
_ACEOF
|
||||
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
# Check for --with-doc-strings
|
||||
{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
|
||||
echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
|
||||
|
|
10
configure.in
10
configure.in
|
@ -918,6 +918,7 @@ yes)
|
|||
|
||||
|
||||
BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
|
||||
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
|
||||
fi
|
||||
|
||||
;;
|
||||
|
@ -1456,6 +1457,7 @@ yes)
|
|||
esac
|
||||
AC_MSG_RESULT($enable_toolbox_glue)
|
||||
|
||||
|
||||
AC_SUBST(OTHER_LIBTOOL_OPT)
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
Darwin/@<:@01567@:>@\..*)
|
||||
|
@ -1781,6 +1783,7 @@ then
|
|||
fi
|
||||
AC_MSG_RESULT($LINKFORSHARED)
|
||||
|
||||
|
||||
AC_SUBST(CFLAGSFORSHARED)
|
||||
AC_MSG_CHECKING(CFLAGSFORSHARED)
|
||||
if test ! "$LIBRARY" = "$LDLIBRARY"
|
||||
|
@ -2297,6 +2300,13 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for OSX 10.5 SDK or later)
|
||||
AC_TRY_COMPILE([#include <Carbon/Carbon.h>], FSIORefNum fRef = 0,
|
||||
AC_DEFINE(HAVE_OSX105_SDK, 1, Define if compiling using MacOS X 10.5 SDK or later.)
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
# Check for --with-doc-strings
|
||||
AC_MSG_CHECKING(for --with-doc-strings)
|
||||
AC_ARG_WITH(doc-strings,
|
||||
|
|
|
@ -426,6 +426,9 @@
|
|||
/* Define to 1 if you have the `openpty' function. */
|
||||
#undef HAVE_OPENPTY
|
||||
|
||||
/* Define if compiling using MacOS X 10.5 SDK or later. */
|
||||
#undef HAVE_OSX105_SDK
|
||||
|
||||
/* Define to 1 if you have the `pathconf' function. */
|
||||
#undef HAVE_PATHCONF
|
||||
|
||||
|
@ -489,9 +492,6 @@
|
|||
/* Define if you have readline 4.2 */
|
||||
#undef HAVE_RL_COMPLETION_MATCHES
|
||||
|
||||
/* Define when using libedit's readline emulation */
|
||||
#undef HAVE_RL_DISPM_VFUNC
|
||||
|
||||
/* Define if you have readline 4.0 */
|
||||
#undef HAVE_RL_PRE_INPUT_HOOK
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue