summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2013-06-26 21:17:09 +0000
committermichi_cc <michi_cc@openttd.org>2013-06-26 21:17:09 +0000
commit0150ab1bb24e351a566a98c107a57b4f25265a45 (patch)
treea0482521a5e03540e0ad557e504b61609f46281f
parent7c9f0545b45836c5fe2dbd3162f59ad6f461fa66 (diff)
downloadopenttd-0150ab1bb24e351a566a98c107a57b4f25265a45.tar.xz
(svn r25480) -Codechange: [OSX] OS X SDK versions >= 10.5 always have a non-const iconv declaration.
-rw-r--r--config.lib4
-rw-r--r--src/os/macosx/osx_stdafx.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/config.lib b/config.lib
index f2750f060..dec0dc3a7 100644
--- a/config.lib
+++ b/config.lib
@@ -1754,7 +1754,7 @@ make_cflags_and_ldflags() {
fi
fi
- if [ "$have_non_const_iconv" != "no" ]; then
+ if [ "$os" != "OSX" ] && [ "$have_non_const_iconv" != "no" ]; then
CFLAGS="$CFLAGS -DHAVE_NON_CONST_ICONV"
fi
fi
@@ -3488,7 +3488,7 @@ generate_src_osx() {
CFLAGS="-isysroot $osx_sdk_path $CFLAGS_orig"
LDFLAGS="-Wl,-syslibroot,$osx_sdk_path $LDFLAGS_orig"
fi
- CFLAGS="$CFLAGS -D_SQ64 -DHAVE_NON_CONST_ICONV -DNO_QUICKTIME -UENABLE_COCOA_QUICKDRAW"
+ CFLAGS="$CFLAGS -D_SQ64 -DNO_QUICKTIME -UENABLE_COCOA_QUICKDRAW"
LIBS="`echo $LIBS | sed 's/-framework QuickTime//'`"
fi
diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h
index 0017dc1c6..ad9c5220c 100644
--- a/src/os/macosx/osx_stdafx.h
+++ b/src/os/macosx/osx_stdafx.h
@@ -77,4 +77,9 @@ typedef unsigned int NSUInteger;
#endif /* __LP64__ */
#endif /* NSInteger */
+/* OS X SDK versions >= 10.5 have a non-const iconv. */
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+# define HAVE_NON_CONST_ICONV
+#endif
+
#endif /* MACOS_STDAFX_H */