From 0b00caaeae29f8f54f4c897c3e580e371017268b Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Mon, 8 Apr 2013 16:34:24 +0800 Subject: [PATCH] Extend #ifdef guards to around StandardAlert for the messagebox, fixing a missing symbol error in SCons for Mac --- arch/carbon/messagebox.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/carbon/messagebox.c b/arch/carbon/messagebox.c index eb2bd1088..a76f9d478 100644 --- a/arch/carbon/messagebox.c +++ b/arch/carbon/messagebox.c @@ -64,13 +64,15 @@ void display_mac_alert(char *message, int error) } else { + // This #if guard removes both compiler warnings + // and complications if we didn't link the (older) Mac OS X SDK that actually supports the following. +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4) Str255 error_text = "\pSorry, a critical error has occurred."; Str255 text; - -#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4) // kill warning + CopyCStringToPascal(message, text); -#endif StandardAlert(error ? kAlertStopAlert : kAlertNoteAlert, error ? error_text : text, error ? text : NULL, 0, &itemHit); +#endif } if ((wind = window_get_front()))