mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-26 18:01:03 +02:00
23270: fix strptime() on Solaris
This commit is contained in:
parent
aeaf47aeeb
commit
fc615adad7
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-04-12 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 23270: Src/system.h: #define _STRPTIME_DONTZERO to get Solaris
|
||||
strptime() to work properly.
|
||||
|
||||
2007-04-05 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 23264: Src/Modules/pcre.c: don't add the -pcre-match
|
||||
|
|
12
Src/system.h
12
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
|
||||
|
|
Loading…
Reference in a new issue