From: Masaki Muranaka Date: Sat, 9 Jan 2010 06:41:31 +0000 (+0900) Subject: buildfix on MacOS X-Git-Tag: v0.4.0-rc2~118 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aafd3877e6fbc1745dbfc5d4f54a2c7efe8cc3d6;p=openocd buildfix on MacOS Recent Apple gcc versions use __APPLE__ instead of __DARWIN__; accept that too. Also use #warning, not #warn; neither is standard, but most CPP versions require it to be spelled out. Signed-off-by: David Brownell --- diff --git a/src/helper/command.c b/src/helper/command.c index ab827859..0ddcd019 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -1361,7 +1361,7 @@ struct command_context* command_init(const char *startup_tcl, Jim_Interp *interp HostOs = "winxx"; #elif defined(__linux__) HostOs = "linux"; -#elif defined(__DARWIN__) +#elif defined(__APPLE__) || defined(__DARWIN__) HostOs = "darwin"; #elif defined(__CYGWIN__) HostOs = "cygwin"; @@ -1370,7 +1370,7 @@ struct command_context* command_init(const char *startup_tcl, Jim_Interp *interp #elif defined(__ECOS) HostOs = "ecos"; #else -#warn unrecognized host OS... +#warning "Unrecognized host OS..." HostOs = "other"; #endif Jim_SetGlobalVariableStr(interp, "ocd_HOSTOS",