summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-08 23:06:41 +0000
committerrubidium <rubidium@openttd.org>2009-03-08 23:06:41 +0000
commita231ab7560cb27e5c217082dde3b4490cdc961e6 (patch)
treec5b51eac04881ff680d045e2b79320f3bf9443af /src/os
parent7b39b0c652abaeb71c1b5648bbda5920f0c3f845 (diff)
downloadopenttd-a231ab7560cb27e5c217082dde3b4490cdc961e6.tar.xz
(svn r15648) -Fix (r14773): hack around an OSX stupidity in < 10.4 w.r.t. signals by not having any signal handling support for OSX < 10.4. Thanks to PearPC and TrueBrain's OSX compiler.
Diffstat (limited to 'src/os')
-rw-r--r--src/os/macosx/macos.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/macosx/macos.h b/src/os/macosx/macos.h
index 1934d4cc9..7b579e728 100644
--- a/src/os/macosx/macos.h
+++ b/src/os/macosx/macos.h
@@ -83,4 +83,14 @@ static inline bool MacOSVersionIsAtLeast(long major, long minor, long bugfix)
return true;
}
+/*
+ * OSX 10.3.9 has blessed us with a signal with unlikable side effects.
+ * The most problematic side effect is that it makes OpenTTD 'think' that
+ * it's running on 10.4.0 or higher and thus tries to link to functions
+ * that are only defined there. So now we'll remove all and any signal
+ * handling for OSX < 10.4 and 10.3.9 works as it should at the cost of
+ * not giving a useful error when savegame loading goes wrong.
+ */
+#define signal(sig, func) (MacOSVersionIsAtLeast(10, 4, 0) ? signal(sig, func) : NULL)
+
#endif /* MACOS_H */