summaryrefslogtreecommitdiff
path: root/unix.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-03-22 13:06:50 +0000
committerbjarni <bjarni@openttd.org>2006-03-22 13:06:50 +0000
commit0b102f0e007a93209206c0fd898d725c402e16b2 (patch)
treeeda101e579e395fa1de8cb0fac3a661484c4946f /unix.c
parentadab6f643878284b20eba0dff535923f6c1d8d8b (diff)
downloadopenttd-0b102f0e007a93209206c0fd898d725c402e16b2.tar.xz
(svn r4019) -Fix: [OSX] stopped using iconv for 10.2.8, since it was added in 10.3
this have the sideeffect that 10.2.8 will still have the "failure to save with certain chars in the filename bug", but at least it can compile again
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/unix.c b/unix.c
index 291e90110..29ddec090 100644
--- a/unix.c
+++ b/unix.c
@@ -43,8 +43,6 @@ ULONG __stack = (1024*1024)*2; // maybe not that much is needed actually ;)
#endif
#if defined(__APPLE__)
- #include <iconv.h>
- #include <locale.h>
#if defined(WITH_SDL)
//the mac implementation needs this file included in the same file as main()
#include <SDL.h>
@@ -606,12 +604,15 @@ void CSleep(int milliseconds)
#endif // __AMIGA__
}
-#ifdef __APPLE__
+#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
/* FYI: This is not thread-safe.
Assumptions:
- the 'from' charset is ISO-8859-15
- the 'to' charset is either the same, or UTF-8
+NOTE: iconv was added in OSX 10.3. 10.2.x will still have the invalid char issues. There aren't any easy fix for this
*/
+#include <iconv.h>
+#include <locale.h>
const char *convert_to_fs_charset(const char *filename)
{
static char statout[1024], statin[1024];