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/ColorPickermodule.c b/Mac/Modules/ColorPickermodule.c
index 688c468..060ce24 100644
--- a/Mac/Modules/ColorPickermodule.c
+++ b/Mac/Modules/ColorPickermodule.c
@@ -28,7 +28,7 @@
 /* ----------------------------------------------------- */
 
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
 
 static char cp_GetColor__doc__[] =
 "GetColor(prompt, (r, g, b)) -> (r, g, b), ok"
@@ -49,14 +49,14 @@
 
     return Py_BuildValue("O&h", QdRGB_New, &outColor, ok);
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 /* List of methods defined in the module */
 
 static struct PyMethodDef cp_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"GetColor",        (PyCFunction)cp_GetColor,       METH_VARARGS,   cp_GetColor__doc__},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL,                      (PyCFunction)NULL,                      0,                              NULL}           /* sentinel */
 };
 
@@ -87,4 +87,3 @@
     if (PyErr_Occurred())
         Py_FatalError("can't initialize module ColorPicker");
 }
-
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,
diff --git a/Mac/Modules/OSATerminology.c b/Mac/Modules/OSATerminology.c
index 2114d07..ce924a4 100644
--- a/Mac/Modules/OSATerminology.c
+++ b/Mac/Modules/OSATerminology.c
@@ -14,7 +14,7 @@
 
 #include <Carbon/Carbon.h>
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
 static PyObject *
 PyOSA_GetAppTerminology(PyObject* self, PyObject* args)
 {
@@ -73,14 +73,14 @@
     if (err) return PyMac_Error(err);
     return Py_BuildValue("O&", AEDesc_New, &theDesc);
 }
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 /*
  * List of methods defined in the module
  */
 static struct PyMethodDef OSATerminology_methods[] =
 {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"GetAppTerminology",
         (PyCFunction) PyOSA_GetAppTerminology,
         METH_VARARGS,
@@ -89,7 +89,7 @@
         (PyCFunction) PyOSA_GetSysTerminology,
         METH_VARARGS,
         "Get the AppleScript language's terminology. GetSysTerminology() --> AEDesc"},
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, (PyCFunction) NULL, 0, NULL}
 };
 
diff --git a/Mac/Modules/app/_Appmodule.c b/Mac/Modules/app/_Appmodule.c
index c791807..a175fae 100644
--- a/Mac/Modules/app/_Appmodule.c
+++ b/Mac/Modules/app/_Appmodule.c
@@ -2,13 +2,11 @@
 /* ========================== Module _App =========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-    /* Carbon GUI stuff, not available in 64-bit mode */
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+    /* Carbon GUI stuff, not available in 64-bit mode */
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -1806,13 +1804,13 @@
 void init_App(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
     m = Py_InitModule("_App", App_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     App_Error = PyMac_GetOSErrException();
     if (App_Error == NULL ||
@@ -1825,7 +1823,7 @@
     /* Backward-compatible name */
     Py_INCREF(&ThemeDrawingState_Type);
     PyModule_AddObject(m, "ThemeDrawingStateType", (PyObject *)&ThemeDrawingState_Type);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _App ========================= */
diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
index 30d40c9..2323a14 100644
--- a/Mac/Modules/carbonevt/_CarbonEvtmodule.c
+++ b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
@@ -2,11 +2,11 @@
 /* ======================= Module _CarbonEvt ======================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -2128,27 +2128,27 @@
     {NULL, NULL, 0}
 };
 
-#else /* __LP64__ */
+#else /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef CarbonEvents_methods[] = {
     {NULL, NULL, 0}
 };
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
 
 void init_CarbonEvt(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
-#endif /* !__LP64__ */
+#endif /* !APPLE_SUPPORTS_QUICKTIME */
 
 
     m = Py_InitModule("_CarbonEvt", CarbonEvents_methods);
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     myEventHandlerUPP = NewEventHandlerUPP(myEventHandler);
     d = PyModule_GetDict(m);
     CarbonEvents_Error = PyMac_GetOSErrException();
@@ -2211,7 +2211,7 @@
     /* Backward-compatible name */
     Py_INCREF(&EventHotKeyRef_Type);
     PyModule_AddObject(m, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type);
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ===================== End module _CarbonEvt ====================== */
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
index a959eb4..e06a25f 100644
--- a/Mac/Modules/ctl/_Ctlmodule.c
+++ b/Mac/Modules/ctl/_Ctlmodule.c
@@ -2,12 +2,12 @@
 /* ========================== Module _Ctl =========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -5766,19 +5766,19 @@
     return (ControlPartCode)c_rv;
 }
 
-#else /* __LP64__ */
+#else /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef Ctl_methods[] = {
     {NULL, NULL, 0}
 };
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 void init_Ctl(void)
 {
     PyObject *m;
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
     mytracker_upp = NewControlActionUPP(mytracker);
@@ -5791,11 +5791,11 @@
     mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc);
     PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
     PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
     m = Py_InitModule("_Ctl", Ctl_methods);
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Ctl_Error = PyMac_GetOSErrException();
     if (Ctl_Error == NULL ||
@@ -5808,8 +5808,7 @@
     /* Backward-compatible name */
     Py_INCREF(&Control_Type);
     PyModule_AddObject(m, "ControlType", (PyObject *)&Control_Type);
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _Ctl ========================= */
-
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
index c4d66a9..14d1cea 100644
--- a/Mac/Modules/dlg/_Dlgmodule.c
+++ b/Mac/Modules/dlg/_Dlgmodule.c
@@ -2,12 +2,10 @@
 /* ========================== Module _Dlg =========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -1577,7 +1575,7 @@
 void init_Dlg(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
 
@@ -1585,11 +1583,11 @@
         PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New);
         PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog);
         PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert);
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
     m = Py_InitModule("_Dlg", Dlg_methods);
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Dlg_Error = PyMac_GetOSErrException();
     if (Dlg_Error == NULL ||
@@ -1602,7 +1600,7 @@
     /* Backward-compatible name */
     Py_INCREF(&Dialog_Type);
     PyModule_AddObject(m, "DialogType", (PyObject *)&Dialog_Type);
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _Dlg ========================= */
diff --git a/Mac/Modules/drag/_Dragmodule.c b/Mac/Modules/drag/_Dragmodule.c
index aa87690..855ff54 100644
--- a/Mac/Modules/drag/_Dragmodule.c
+++ b/Mac/Modules/drag/_Dragmodule.c
@@ -2,12 +2,10 @@
 /* ========================== Module _Drag ========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -1117,18 +1115,18 @@
 void init_Drag(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
 
 
         PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New);
         PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert);
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
     m = Py_InitModule("_Drag", Drag_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Drag_Error = PyMac_GetOSErrException();
     if (Drag_Error == NULL ||
@@ -1150,7 +1148,7 @@
     dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing);
 #endif
 
-#endif /* !__LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 }
 
diff --git a/Mac/Modules/help/_Helpmodule.c b/Mac/Modules/help/_Helpmodule.c
index eaa2e8a..4d25c9e 100644
--- a/Mac/Modules/help/_Helpmodule.c
+++ b/Mac/Modules/help/_Helpmodule.c
@@ -2,12 +2,10 @@
 /* ========================== Module _Help ========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -145,10 +143,10 @@
     return _res;
 }
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef Help_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"HMGetHelpMenu", (PyCFunction)Help_HMGetHelpMenu, 1,
      PyDoc_STR("() -> (MenuRef outHelpMenu, MenuItemIndex outFirstCustomItemIndex)")},
     {"HMAreHelpTagsDisplayed", (PyCFunction)Help_HMAreHelpTagsDisplayed, 1,
@@ -165,31 +163,30 @@
      PyDoc_STR("(DialogPtr inDialog, SInt16 inHdlgRsrcID, SInt16 inItemStart) -> None")},
     {"HMHideTag", (PyCFunction)Help_HMHideTag, 1,
      PyDoc_STR("() -> None")},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, NULL, 0}
 };
 
 
 
-
 void init_Help(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
 
 
     m = Py_InitModule("_Help", Help_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Help_Error = PyMac_GetOSErrException();
     if (Help_Error == NULL ||
         PyDict_SetItemString(d, "Error", Help_Error) != 0)
         return;
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _Help ======================== */
diff --git a/Mac/Modules/ibcarbon/_IBCarbon.c b/Mac/Modules/ibcarbon/_IBCarbon.c
index 2a65f42..a947572 100644
--- a/Mac/Modules/ibcarbon/_IBCarbon.c
+++ b/Mac/Modules/ibcarbon/_IBCarbon.c
@@ -2,12 +2,12 @@
 /* ======================== Module _IBCarbon ======================== */
 
 #include "Python.h"
+#include "pymactoolbox.h"
 
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
 
 #include <Carbon/Carbon.h>
-#include "pymactoolbox.h"
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern int _CFStringRefObj_Convert(PyObject *, CFStringRef *);
@@ -225,13 +225,13 @@
                          IBNibRefObj_New, outNibRef);
     return _res;
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef IBCarbon_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"CreateNibReference", (PyCFunction)IBCarbon_CreateNibReference, 1,
      PyDoc_STR("(CFStringRef inNibName) -> (IBNibRef outNibRef)")},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, NULL, 0}
 };
 
@@ -241,16 +241,16 @@
 void init_IBCarbon(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
 
 
 
     m = Py_InitModule("_IBCarbon", IBCarbon_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     IBCarbon_Error = PyMac_GetOSErrException();
     if (IBCarbon_Error == NULL ||
@@ -263,7 +263,7 @@
     /* Backward-compatible name */
     Py_INCREF(&IBNibRef_Type);
     PyModule_AddObject(m, "IBNibRefType", (PyObject *)&IBNibRef_Type);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ====================== End module _IBCarbon ====================== */
diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c
index 6967ae4..88e2064 100644
--- a/Mac/Modules/icn/_Icnmodule.c
+++ b/Mac/Modules/icn/_Icnmodule.c
@@ -2,12 +2,12 @@
 /* ========================== Module _Icn =========================== */
 
 #include "Python.h"
-
-
-#ifndef __LP64__
-
 #include "pymactoolbox.h"
 
+
+#if APPLE_SUPPORTS_QUICKTIME
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -1448,10 +1448,10 @@
     _res = Py_None;
     return _res;
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef Icn_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"GetCIcon", (PyCFunction)Icn_GetCIcon, 1,
      PyDoc_STR("(SInt16 iconID) -> (CIconHandle _rv)")},
     {"PlotCIcon", (PyCFunction)Icn_PlotCIcon, 1,
@@ -1576,7 +1576,7 @@
      PyDoc_STR("(FSRef ref) -> (IconFamilyHandle iconFamily)")},
     {"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
      PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, NULL, 0}
 };
 
@@ -1586,21 +1586,21 @@
 void init_Icn(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
 
 
     m = Py_InitModule("_Icn", Icn_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Icn_Error = PyMac_GetOSErrException();
     if (Icn_Error == NULL ||
         PyDict_SetItemString(d, "Error", Icn_Error) != 0)
         return;
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _Icn ========================= */
diff --git a/Mac/Modules/list/_Listmodule.c b/Mac/Modules/list/_Listmodule.c
index 9e63686..811045e 100644
--- a/Mac/Modules/list/_Listmodule.c
+++ b/Mac/Modules/list/_Listmodule.c
@@ -2,12 +2,11 @@
 /* ========================== Module _List ========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -1032,10 +1031,10 @@
     return _res;
 
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef List_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"CreateCustomList", (PyCFunction)List_CreateCustomList, 1,
      PyDoc_STR("(Rect rView, Rect dataBounds, Point cellSize, ListDefSpec theSpec, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle outList)")},
     {"LNew", (PyCFunction)List_LNew, 1,
@@ -1058,11 +1057,11 @@
      PyDoc_STR("(ListHandle list, OptionBits selectionFlags) -> None")},
     {"as_List", (PyCFunction)List_as_List, 1,
      PyDoc_STR("(Resource)->List.\nReturns List object (which is not auto-freed!)")},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, NULL, 0}
 };
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
 
 
 static void myListDefFunction(SInt16 message,
@@ -1100,13 +1099,13 @@
         Py_DECREF(rv);
     }
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
 void init_List(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
 
@@ -1115,11 +1114,11 @@
 
     PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New);
     PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
     m = Py_InitModule("_List", List_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     List_Error = PyMac_GetOSErrException();
     if (List_Error == NULL ||
@@ -1132,7 +1131,7 @@
     /* Backward-compatible name */
     Py_INCREF(&List_Type);
     PyModule_AddObject(m, "ListType", (PyObject *)&List_Type);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _List ======================== */
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
index cd698f4..759d1bc 100644
--- a/Mac/Modules/mlte/_Mltemodule.c
+++ b/Mac/Modules/mlte/_Mltemodule.c
@@ -2,12 +2,11 @@
 /* ========================== Module _Mlte ========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -1623,10 +1622,10 @@
 
 }
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef Mlte_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1,
      PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")},
     {"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1,
@@ -1643,7 +1642,7 @@
      PyDoc_STR("() -> (TXNVersionValue _rv, TXNFeatureBits oFeatureFlags)")},
     {"TXNInitTextension", (PyCFunction)Mlte_TXNInitTextension, 1,
      PyDoc_STR("(TXNInitOptions) -> None")},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, NULL, 0}
 };
 
@@ -1653,17 +1652,17 @@
 void init_Mlte(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
 
 
     //      PyMac_INIT_TOOLBOX_OBJECT_NEW(xxxx);
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
     m = Py_InitModule("_Mlte", Mlte_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Mlte_Error = PyMac_GetOSErrException();
     if (Mlte_Error == NULL ||
@@ -1683,7 +1682,7 @@
     /* Backward-compatible name */
     Py_INCREF(&TXNFontMenuObject_Type);
     PyModule_AddObject(m, "TXNFontMenuObjectType", (PyObject *)&TXNFontMenuObject_Type);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _Mlte ======================== */
diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c
index bf67cda..393b025 100644
--- a/Mac/Modules/qt/_Qtmodule.c
+++ b/Mac/Modules/qt/_Qtmodule.c
@@ -2,12 +2,12 @@
 /* =========================== Module _Qt =========================== */
 
 #include "Python.h"
-
-
-#ifndef __LP64__
-
 #include "pymactoolbox.h"
 
+
+#if APPLE_SUPPORTS_QUICKTIME
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -26295,10 +26295,10 @@
     _res = Py_None;
     return _res;
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef Qt_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
      PyDoc_STR("() -> None")},
     {"ExitMovies", (PyCFunction)Qt_ExitMovies, 1,
@@ -27991,7 +27991,7 @@
      PyDoc_STR("(WindowPtr wp, Point startPt, Rect boundsRect) -> None")},
     {"MoviesTask", (PyCFunction)Qt_MoviesTask, 1,
      PyDoc_STR("(long maxMilliSecToUse) -> None")},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, NULL, 0}
 };
 
@@ -28001,7 +28001,7 @@
 void init_Qt(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
 
@@ -28018,11 +28018,11 @@
         PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert);
         PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New);
         PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 
     m = Py_InitModule("_Qt", Qt_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Qt_Error = PyMac_GetOSErrException();
     if (Qt_Error == NULL ||
@@ -28084,7 +28084,7 @@
     /* Backward-compatible name */
     Py_INCREF(&SGOutput_Type);
     PyModule_AddObject(m, "SGOutputType", (PyObject *)&SGOutput_Type);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ========================= End module _Qt ========================= */
diff --git a/Mac/Modules/te/_TEmodule.c b/Mac/Modules/te/_TEmodule.c
index a998fc8..c3018e8 100644
--- a/Mac/Modules/te/_TEmodule.c
+++ b/Mac/Modules/te/_TEmodule.c
@@ -2,12 +2,12 @@
 /* =========================== Module _TE =========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -1268,10 +1268,10 @@
                          TEObj_New, _rv);
     return _res;
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef TE_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"TEScrapHandle", (PyCFunction)TE_TEScrapHandle, 1,
      PyDoc_STR("() -> (Handle _rv)")},
     {"TEGetScrapLength", (PyCFunction)TE_TEGetScrapLength, 1,
@@ -1298,7 +1298,7 @@
      PyDoc_STR("(UInt8 value) -> None")},
     {"as_TE", (PyCFunction)TE_as_TE, 1,
      PyDoc_STR("(Handle h) -> (TEHandle _rv)")},
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
     {NULL, NULL, 0}
 };
 
@@ -1308,7 +1308,7 @@
 void init_TE(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
 
@@ -1316,10 +1316,10 @@
         PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
         PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
     m = Py_InitModule("_TE", TE_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     TE_Error = PyMac_GetOSErrException();
     if (TE_Error == NULL ||
@@ -1332,7 +1332,7 @@
     /* Backward-compatible name */
     Py_INCREF(&TE_Type);
     PyModule_AddObject(m, "TEType", (PyObject *)&TE_Type);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ========================= End module _TE ========================= */
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
index 89233ed..6eca86e 100644
--- a/Mac/Modules/win/_Winmodule.c
+++ b/Mac/Modules/win/_Winmodule.c
@@ -2,11 +2,11 @@
 /* ========================== Module _Win =========================== */
 
 #include "Python.h"
-
-#ifndef __LP64__
-
 #include "pymactoolbox.h"
 
+#if APPLE_SUPPORTS_QUICKTIME
+
+
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
     PyErr_SetString(PyExc_NotImplementedError, \
@@ -3147,10 +3147,10 @@
                          WinObj_WhichWindow, theWindow);
     return _res;
 }
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 static PyMethodDef Win_methods[] = {
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
      PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")},
     {"NewWindow", (PyCFunction)Win_NewWindow, 1,
@@ -3202,12 +3202,12 @@
     {"FindWindow", (PyCFunction)Win_FindWindow, 1,
      PyDoc_STR("(Point thePoint) -> (short _rv, WindowPtr theWindow)")},
     {NULL, NULL, 0}
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 };
 
 
 
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
 /* Return the object corresponding to the window, or NULL */
 
 PyObject *
@@ -3230,22 +3230,22 @@
     return it;
 }
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
 void init_Win(void)
 {
     PyObject *m;
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     PyObject *d;
 
     PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New);
     PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow);
     PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
 
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 
     m = Py_InitModule("_Win", Win_methods);
-#ifndef __LP64__
+#if APPLE_SUPPORTS_QUICKTIME
     d = PyModule_GetDict(m);
     Win_Error = PyMac_GetOSErrException();
     if (Win_Error == NULL ||
@@ -3258,7 +3258,7 @@
     /* Backward-compatible name */
     Py_INCREF(&Window_Type);
     PyModule_AddObject(m, "WindowType", (PyObject *)&Window_Type);
-#endif /* __LP64__ */
+#endif /* APPLE_SUPPORTS_QUICKTIME */
 }
 
 /* ======================== End module _Win ========================= */