X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b4fee49300c44b2f387c56f4cee9ac3e9b87fb9..e7c9692f16127b39de2723457cdb2d46e563b383:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 6c87ccc236..77b81dda89 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -344,6 +344,12 @@ static wxString CallStrftime(const wxChar *format, const tm* tm) #ifdef HAVE_STRPTIME +// glibc2 doesn't define this in the headers unless _XOPEN_SOURCE is defined +// which, unfortunately, wreaks havoc elsewhere +#if defined(__GLIBC__) && (__GLIBC__ == 2) + extern "C" char *strptime(const char *, const char *, struct tm *); +#endif + // Unicode-friendly strptime() wrapper static const wxChar * CallStrptime(const wxChar *input, const char *fmt, tm *tm) @@ -2668,7 +2674,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, // parse the optional width size_t width = 0; - while ( isdigit(*++fmt) ) + while ( wxIsdigit(*++fmt) ) { width *= 10; width += *fmt - _T('0');