>From f55f1e8de40b38cc745a930bf5a374c73d3c67ce Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 16 Jul 2016 14:22:06 +0300 Subject: [PATCH] Fix 'strftime' for MS-Windows * libguile/stime.c (scm_strftime) [__MINGW32__]: Don't use the trick of appending "0" to the time-zone string, Windows runtime doesn't support that. --- libguile/stime.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libguile/stime.c b/libguile/stime.c index 7e6f303..745b50a 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -678,6 +678,10 @@ SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0, tbuf = scm_malloc (size); { +#ifndef __MINGW32__ + /* Don't do this for MinGW: it only supports fixed-format + TTTnnnDDD TZ specifications, and gets confused if a zero is + appended. */ #if !defined (HAVE_TM_ZONE) /* it seems the only way to tell non-GNU versions of strftime what zone to use (for the %Z format) is to set TZ in the @@ -702,6 +706,7 @@ SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0, oldenv = setzone (zone, SCM_ARG2, FUNC_NAME); } #endif +#endif #ifdef LOCALTIME_CACHE tzset (); @@ -716,6 +721,7 @@ SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0, tbuf = scm_malloc (size); } +#ifndef __MINGW32__ #if !defined (HAVE_TM_ZONE) if (have_zone) { @@ -723,6 +729,7 @@ SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0, SCM_CRITICAL_SECTION_END; } #endif +#endif } result = scm_from_utf8_string (tbuf + 1); -- 2.9.0.windows.1