X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af80bc9294f7a1137acb41faab78dbd77cbc8416..172541f64be8fcddb08f1c121da256d08c24a70b:/src/common/datetime.cpp?ds=inline diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 99a0e3cbec..a042dd5947 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -127,6 +127,18 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter<wxDateTime> , wxFromStringCon #undef HAVE_STRPTIME #endif // broken strptime() +#if defined(HAVE_STRPTIME) && defined(__DARWIN__) && defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS + // configure detects strptime as linkable because it's in the OS X + // System library but MSL headers don't declare it. + +// char *strptime(const char *, const char *, struct tm *); + // However, we DON'T want to just provide it here because we would + // crash and/or overwrite data when strptime from OS X tries + // to fill in MW's struct tm which is two fields shorter (no TZ stuff) + // So for now let's just say we don't have strptime + #undef HAVE_STRPTIME +#endif + #if defined(__MWERKS__) && wxUSE_UNICODE #include <wtime.h> #endif @@ -3201,6 +3213,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, hour = tm.hour; min = tm.min; } + break; case _T('S'): // second as a decimal number (00-61) if ( !GetNumericToken(width, input, &num) || (num > 61) )