diff options
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/stime.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/stime.c b/libguile/stime.c index fa8b5851d..be5bf65af 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -44,6 +44,7 @@ #include <stdio.h> #include <errno.h> +#include <strftime.h> #include "libguile/_scm.h" #include "libguile/async.h" @@ -689,10 +690,9 @@ SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0, tzset (); #endif - /* POSIX says strftime returns 0 on buffer overrun, but old - systems (i.e. libc 4 on GNU/Linux) might return `size' in that - case. */ - while ((len = strftime (tbuf, size, myfmt, &t)) == 0 || len == size) + /* Use `nstrftime ()' from Gnulib, which supports all GNU extensions + supported by glibc. */ + while ((len = nstrftime (tbuf, size, myfmt, &t, 0, 0)) == 0) { free (tbuf); size *= 2; |