Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time add a cast for sparc64 where int_fast32_t is l...



details:   https://anonhg.NetBSD.org/src/rev/7215726adcb5
branches:  trunk
changeset: 325222:7215726adcb5
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 13 10:34:47 2013 +0000

description:
add a cast for sparc64 where int_fast32_t is long (should it be?), and
time_t is int32_t (for compat)

diffstat:

 lib/libc/time/localtime.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 058034943f61 -r 7215726adcb5 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Fri Dec 13 10:31:05 2013 +0000
+++ b/lib/libc/time/localtime.c Fri Dec 13 10:34:47 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.78 2013/09/20 19:06:54 christos Exp $  */
+/*     $NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $  */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.78 2013/09/20 19:06:54 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1108,7 +1108,7 @@
                                }
                                if (time_t_max - janfirst < yearsecs)
                                        break;
-                               janfirst += yearsecs;
+                               janfirst += (time_t)yearsecs;
                        }
                        _DIAGASSERT(__type_fit(int, atp - sp->ats));
                        sp->timecnt = (int)(atp - sp->ats);



Home | Main Index | Thread Index | Old Index