diff --git a/configure b/configure index 2eeddda8af..30b5515972 100755 --- a/configure +++ b/configure @@ -36144,7 +36144,8 @@ fi -for ac_func in wcsdup strnlen wcsnlen wcscasecmp wcsncasecmp + +for ac_func in wcsdup wcsftime strnlen wcsnlen wcscasecmp wcsncasecmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/configure.in b/configure.in index b16249083a..599d996d53 100644 --- a/configure.in +++ b/configure.in @@ -4249,7 +4249,7 @@ if test "$WCSLEN_FOUND" = 1; then AC_DEFINE(HAVE_WCSLEN) fi -AC_CHECK_FUNCS([wcsdup strnlen wcsnlen wcscasecmp wcsncasecmp]) +AC_CHECK_FUNCS([wcsdup wcsftime strnlen wcsnlen wcscasecmp wcsncasecmp]) dnl On HP-UX aCC need this define to find mbstrtowcs() &c dnl Can't be used for g++ since the mbstate_t in wchar.h can conflict diff --git a/include/wx/wxcrtbase.h b/include/wx/wxcrtbase.h index dd6428c322..d9ee66261a 100644 --- a/include/wx/wxcrtbase.h +++ b/include/wx/wxcrtbase.h @@ -664,8 +664,11 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name); _xpg5_wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm * ); #define wxCRT_StrftimeW _xpg5_wcsftime #else - #ifndef __WXPALMOS__ - // assume it's always available, this does seem to be the case for now + // Assume it's always available under non-Unix systems with the exception + // of Palm OS, this does seem to be the case for now. And under Unix we + // trust configure to detect it (except for SGI special case above). + #if defined(HAVE_WCSFTIME) || \ + !(defined(__UNIX__) || defined(__WXPALMOS__)) #define wxCRT_StrftimeW wcsftime #endif /* ! __WXPALMOS__ */ #endif diff --git a/setup.h.in b/setup.h.in index 1a7de3353d..cf2a0e3909 100644 --- a/setup.h.in +++ b/setup.h.in @@ -981,6 +981,9 @@ /* Define if you have wcsdup function */ #undef HAVE_WCSDUP +/* Define if you have wcsftime() function */ +#undef HAVE_WCSFTIME + /* Define if you have strnlen() function */ #undef HAVE_STRNLEN diff --git a/setup.h_vms b/setup.h_vms index a1f602d290..8f3095a6ce 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -1068,6 +1068,9 @@ typedef pid_t GPid; /* Define if you have wcsdup function */ #undef HAVE_WCSDUP +/* Define if you have wcsftime() function */ +#define HAVE_WCSFTIME 1 + /* Define if you have strnlen() function */ #define HAVE_STRNLEN 1