From: Vadim Zeitlin Date: Mon, 7 Mar 2005 22:40:51 +0000 (+0000) Subject: compilation fix for CE with Standard SDK X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e44501a0cb2073ca798fc9e1bb106a080ad188a9?ds=inline compilation fix for CE with Standard SDK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index ba9419b5c7..2a28895579 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -16,6 +16,10 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// +// TODO: for $DEITY sake, someone please fix the #ifdef __WXWINCE__ everywhere, +// the proper way to do it is to implement (subset of) wxStrftime() for +// CE instead of this horror!! + /* * Implementation notes: * @@ -2834,11 +2838,16 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date) } #ifdef __WINDOWS__ + // Get's current locale's date formatting string and stores it in fmt if // the locale is set; otherwise or in case of failure, leaves fmt unchanged -void GetLocaleDateFormat(wxString *fmt) +static void GetLocaleDateFormat(wxString *fmt) { + // there is no setlocale() under Windows CE with Standard SDK, so just + // always query the system there +#ifndef WCE_PLATFORM_STANDARDSDK if ( strcmp(setlocale(LC_ALL, NULL), "C") != 0 ) +#endif { // The locale was programatically set to non-C. We assume that this was // done using wxLocale, in which case thread's current locale is also @@ -2889,6 +2898,7 @@ void GetLocaleDateFormat(wxString *fmt) // try our luck with the default set above } } + #endif // __WINDOWS__ const wxChar *wxDateTime::ParseFormat(const wxChar *date,