]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 24 Sep 1998 15:02:06 +0000 (15:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 24 Sep 1998 15:02:06 +0000 (15:02 +0000)
1998-09-24  Paul Eggert  <eggert@twinsun.com>

* strftime.c (underlying_strftime):
Set the buffer to a nonzero value before calling
strftime, and check to see whether strftime has set the buffer to zero.
This lets us distinguish between an empty buffer and an error.

1998-09-24  Paul Eggert  <eggert@shade.twinsun.com>

* strftime.c (INT_STRLEN_BOUND): Fix typo by changing 100 to 1000.
This fix is propagated from tzcode1998g.tar.gz.

ChangeLog
time/strftime.c

index 7e6e39006339032f7bbeaec6d0f9ab96c2f09261..fb356736bd42e3c599c59a85d08b2e5ad52cdc07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+1998-09-24  Paul Eggert  <eggert@twinsun.com>
+
+       * strftime.c (underlying_strftime):
+       Set the buffer to a nonzero value before calling
+       strftime, and check to see whether strftime has set the buffer to zero.
+       This lets us distinguish between an empty buffer and an error.
+
+1998-09-24  Paul Eggert  <eggert@shade.twinsun.com>
+
+       * strftime.c (INT_STRLEN_BOUND): Fix typo by changing 100 to 1000.
+       This fix is propagated from tzcode1998g.tar.gz.
+
 1998-09-24  Mark Kettenis  <kettenis@phys.uva.nl>
 
        * sysdeps/unix/siglist.c: Make sys_siglist a weak alias for
index 0a830b0588e2af3fa81d7a84e108506f784264ea..61f688e1b2cad7e08825ae9f50110d6c30eb9e26 100644 (file)
@@ -134,7 +134,7 @@ extern char *tzname[];
    add one for integer division truncation;
    add one more for a minus sign if t is signed.  */
 #define INT_STRLEN_BOUND(t) \
 ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 100 + 1 + TYPE_SIGNED (t))
((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 + 1 + TYPE_SIGNED (t))
 
 #define TM_YEAR_BASE 1900
 
@@ -748,7 +748,7 @@ my_strftime (s, maxsize, format, tp)
            *u++ = format_char;
            *u = '\0';
            len = strftime (ubuf, sizeof ubuf, ufmt, tp);
-           if (len == 0)
+           if (len == 0 && ubuf[0] != '\0')
              return 0;
            cpy (len, ubuf);
          }