Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-08-24 17:38:32 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-08-24 17:38:32 +0400
commitc9e60624d3b6663d76ccdb43a1c33198564fb16b (patch)
tree8c41ab5adcbb4e981eaabb64637eff2ed42abc2f
parentb84aabf695f2b8d30b2be2867781c5108dbf9c29 (diff)
* libc/time/mktm_r.c (_mktm_r): Fix computing tm_year.
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/time/mktm_r.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index f3f6a96c8..b9fbc82e6 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2011-08-24 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/time/mktm_r.c (_mktm_r): Fix computing tm_year.
+
2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index".
diff --git a/newlib/libc/time/mktm_r.c b/newlib/libc/time/mktm_r.c
index 4d4b4fab0..9b9b411a5 100644
--- a/newlib/libc/time/mktm_r.c
+++ b/newlib/libc/time/mktm_r.c
@@ -182,7 +182,7 @@ _DEFUN (_mktm_r, (tim_p, res, is_gmtime),
{
res->tm_mon = 11;
res->tm_year -= 1;
- res->tm_yday = 365 + isleap(res->tm_year);
+ res->tm_yday = 364 + isleap(res->tm_year);
}
res->tm_mday = ip[res->tm_mon];
}