From fc615adad738c1a7de77c90446fef49afac31302 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 12 Apr 2007 15:28:49 +0000 Subject: 23270: fix strptime() on Solaris --- Src/system.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Src') diff --git a/Src/system.h b/Src/system.h index 2f3dcd32a..fafa5dd01 100644 --- a/Src/system.h +++ b/Src/system.h @@ -52,6 +52,18 @@ # undef HAVE_SYS_UTSNAME_H #endif +/* + * Solaris by default zeroes all elements of the tm structure in + * strptime(). Unfortunately that gives us no way of telling whether + * the tm_isdst element has been set from the input pattern. If it + * hasn't we want it to be -1 (undetermined) on input to mktime(). So + * we stop strptime() zeroing the struct tm and instead set all the + * elements ourselves. + * + * This is likely to be harmless everywhere else. + */ +#define _STRPTIME_DONTZERO + #ifdef PROTOTYPES # define _(Args) Args #else -- cgit 1.4.1