]> git.saurik.com Git - wxWidgets.git/commitdiff
Move HAVE_WCSXXX from wx/osx/config_xcode.h to wx/osx/chkconf.h.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 15 Jul 2013 16:42:10 +0000 (16:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 15 Jul 2013 16:42:10 +0000 (16:42 +0000)
The latter file is also used when building from the command line while the
former is only used in Xcode build, as its name indicates (which didn't help
me to notice it, however).

Also restore the test for wcsftime() in configure as it is available even on
older systems but do not test for strnlen() -- as it is not.

These changes amend those of r74523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
include/wx/osx/cocoa/chkconf.h
include/wx/osx/config_xcode.h

index 119a6b8e190f9c391d552b34860c2c21312b5196..7dea45934a70c3bf6c48a6aae743637065c225b1 100755 (executable)
--- a/configure
+++ b/configure
@@ -29906,12 +29906,12 @@ if test "$WCSLEN_FOUND" = 1; then
 
 fi
 
-for ac_func in strnlen
+for ac_func in wcsftime
 do :
-  ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
-if test "x$ac_cv_func_strnlen" = xyes; then :
+  ac_fn_c_check_func "$LINENO" "wcsftime" "ac_cv_func_wcsftime"
+if test "x$ac_cv_func_wcsftime" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_STRNLEN 1
+#define HAVE_WCSFTIME 1
 _ACEOF
 
 fi
@@ -29919,7 +29919,7 @@ done
 
 
 if test "$wxUSE_MAC" != 1; then
-    for ac_func in wcsdup wcsftime wcsnlen wcscasecmp wcsncasecmp
+    for ac_func in strnlen wcsdup wcsnlen wcscasecmp wcsncasecmp
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
index 6139892b0dd7254b58f053bc61532ee1eca25c57..b6d30fa16b12e23ec44f5e81092d21cb4e8f9ad3 100644 (file)
@@ -4096,15 +4096,17 @@ if test "$WCSLEN_FOUND" = 1; then
     AC_DEFINE(HAVE_WCSLEN)
 fi
 
-AC_CHECK_FUNCS(strnlen)
-
-dnl OS X provides the wide character functions starting from 10.7 so our tests
-dnl would succeed if we're configuring under 10.7 or later, yet the compiled
-dnl programs would fail if ran under 10.6 or earlier. To avoid this problem we
-dnl define the corresponding HAVE_XXX in wx/osx/config_xcode.h instead of
-dnl testing for them here.
+dnl Notice that unlike the functions below, this one seems to be present in all
+dnl support OS X versions so it's OK to test for it here.
+AC_CHECK_FUNCS(wcsftime)
+
+dnl OS X provides the wide character functions (and also strnlen(), for some
+dnl reason) only starting from 10.7 so our tests would succeed if we're
+dnl configuring under 10.7 or later, yet the compiled programs would fail if
+dnl ran under 10.6 or earlier. To avoid this problem, define the corresponding
+dnl HAVE_XXX in wx/osx/config_xcode.h instead of testing for them here.
 if test "$wxUSE_MAC" != 1; then
-    AC_CHECK_FUNCS([wcsdup wcsftime wcsnlen wcscasecmp wcsncasecmp])
+    AC_CHECK_FUNCS([strnlen wcsdup wcsnlen wcscasecmp wcsncasecmp])
 fi
 
 dnl On HP-UX aCC need this define to find mbstrtowcs() &c
index 09a16ab10e27792b200343c84d4f30b4a8c6ad34..d926cdfd880715b39b483b9dbd3aa16bff104e94 100644 (file)
 #ifndef _WX_OSX_COCOA_CHKCONF_H_
 #define _WX_OSX_COCOA_CHKCONF_H_
 
+/* Many wchar functions (and also strnlen(), for some reason) are only
+   available since 10.7 so don't use them if we want to build the applications
+   that would run under 10.6 and earlier. */
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
+#define HAVE_STRNLEN 1
+#define HAVE_WCSDUP 1
+#define HAVE_WCSNLEN 1
+#define HAVE_WCSCASECMP 1
+#define HAVE_WCSNCASECMP 1
+#endif
+
 /*
  * native (1) or emulated (0) toolbar
  */
index 006fef025bc492304a20dc083fcfe250310797e5..0174f32707e03bb3956b21ec35d3f5e4f7734856 100644 (file)
 #define HAVE_VSSCANF_DECL 1
 #define HAVE_USLEEP 1
 #define HAVE_WCSLEN 1
-
-/* Many wchar functions are only available since 10.7 so don't use them if we
-   want to build the applications that would run under 10.6 and earlier. */
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
-#define HAVE_WCSDUP 1
-#define HAVE_WCSFTIME 1
-#define HAVE_WCSNLEN 1
-#define HAVE_WCSCASECMP 1
-#define HAVE_WCSNCASECMP 1
-#endif
-
 #define SIZEOF_WCHAR_T 4
 #define SIZEOF_SHORT 2
 #define SIZEOF_INT 4