Issue #27806: Fix 32-bit builds on macOS Sierra 10.12 broken by removal of
deprecated QuickTime/QuickTime.h header file. Patch by sashk.
diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c
index 28de4f5..83c203d 100644
--- a/Mac/Modules/MacOS.c
+++ b/Mac/Modules/MacOS.c
@@ -299,7 +299,7 @@
FileInfo* finfo;
if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSRef, &ref)) {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
/* This function is documented to take an FSSpec as well,
* which only works in 32-bit mode.
*/
@@ -324,9 +324,9 @@
Py_DECREF(creator);
Py_DECREF(type);
return res;
-#else /* __LP64__ */
+#else /* APPLE_SUPPORTS_QUICKTIME */
return NULL;
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
}
err = FSGetCatalogInfo(&ref,
@@ -372,7 +372,7 @@
if (!PyArg_ParseTuple(args, "O&O&O&",
PyMac_GetFSRef, &ref, PyMac_GetOSType, &creator, PyMac_GetOSType, &type)) {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
/* Try to handle FSSpec arguments, for backward compatibility */
FSSpec fss;
FInfo info;
@@ -391,9 +391,9 @@
return PyErr_Mac(MacOS_Error, err);
Py_INCREF(Py_None);
return Py_None;
-#else /* __LP64__ */
+#else /* APPLE_SUPPORTS_QUICKTIME */
return NULL;
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
}
err = FSGetCatalogInfo(&ref,