typedef unsigned long Time;
-#if MAC_OSX
+#ifdef HAVE_CARBON
+#undef Z
+#ifdef MAC_OSX
#undef mktime
#undef DEBUG
-#undef Z
#undef free
#undef malloc
#undef realloc
#include <Carbon/Carbon.h>
#undef mktime
#define mktime emacs_mktime
-#undef Z
-#define Z (current_buffer->text->z)
#undef free
#define free unexec_free
#undef malloc
#undef init_process
#define init_process emacs_init_process
#undef INFINITY
-#else
+#else /* not MAC_OSX */
+#undef SIGHUP
+#define OLDP2C 1
+#include <Carbon.h>
+#endif /* not MAC_OSX */
+#undef Z
+#define Z (current_buffer->text->z)
+#else /* not HAVE_CARBON */
#include <QuickDraw.h> /* for WindowPtr */
#include <QDOffscreen.h> /* for GWorldPtr */
#include <Windows.h>
#include <Gestalt.h>
-#endif
+#endif /* not HAVE_CARBON */
typedef WindowPtr Window;
typedef GWorldPtr Pixmap;