Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/lib/libc/time pull up revs 1.10 and 1.11, approved by t...



details:   https://anonhg.NetBSD.org/src/rev/3b0b6fde97f4
branches:  netbsd-1-5
changeset: 489404:3b0b6fde97f4
user:      taca <taca%NetBSD.org@localhost>
date:      Thu Sep 07 14:52:32 2000 +0000

description:
pull up revs 1.10 and 1.11, approved by thorpej:

> - Fix strftime(3) not to ignore tm_zone filed of last parameter,
>   and "%Z" in format string is converted as proper time zone.
>   This was taken from tzcode2000f.  Fix PR lib/10950.

diffstat:

 lib/libc/time/strftime.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r a8e7d00d51e4 -r 3b0b6fde97f4 lib/libc/time/strftime.c
--- a/lib/libc/time/strftime.c  Thu Sep 07 07:04:42 2000 +0000
+++ b/lib/libc/time/strftime.c  Thu Sep 07 14:52:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strftime.c,v 1.10 2000/01/15 16:59:05 kleink Exp $     */
+/*     $NetBSD: strftime.c,v 1.10.4.1 2000/09/07 14:52:32 taca Exp $   */
 
 /*
  * Copyright (c) 1989 The Regents of the University of California.
@@ -38,11 +38,12 @@
 #if 0
 static char *sccsid = "@(#)strftime.c  5.11 (Berkeley) 2/24/91";
 #else
-__RCSID("$NetBSD: strftime.c,v 1.10 2000/01/15 16:59:05 kleink Exp $");
+__RCSID("$NetBSD: strftime.c,v 1.10.4.1 2000/09/07 14:52:32 taca Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
+#include "private.h"
 #include <sys/localedef.h>
 #include <locale.h>
 #include <string.h>
@@ -348,6 +349,12 @@
                                        return (0);
                                continue;
                        case 'Z':
+#ifdef TM_ZONE
+                               if (t->TM_ZONE != NULL) {
+                                       if (!_add(t->TM_ZONE, pt, ptlim))
+                                               return (0);
+                               } else
+#endif /* TM_ZONE */
                                if (tzname[t->tm_isdst ? 1 : 0] &&
                                    !_add(tzname[t->tm_isdst ? 1 : 0], pt,
                                    ptlim))



Home | Main Index | Thread Index | Old Index