summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMasaki Muranaka <monaka@monami-software.com>2010-01-09 15:41:31 +0900
committerDavid Brownell <dbrownell@users.sourceforge.net>2010-01-09 00:10:18 -0800
commitaafd3877e6fbc1745dbfc5d4f54a2c7efe8cc3d6 (patch)
treef3cca05e6c8c0b74a3e2d632349091046fbb1a22 /src
parent973cd9a299d904ab22bb089319beab65c339d783 (diff)
downloadopenocd+libswd-aafd3877e6fbc1745dbfc5d4f54a2c7efe8cc3d6.tar.gz
openocd+libswd-aafd3877e6fbc1745dbfc5d4f54a2c7efe8cc3d6.tar.bz2
openocd+libswd-aafd3877e6fbc1745dbfc5d4f54a2c7efe8cc3d6.tar.xz
openocd+libswd-aafd3877e6fbc1745dbfc5d4f54a2c7efe8cc3d6.zip
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 <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/helper/command.c4
1 files changed, 2 insertions, 2 deletions
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",