# HG changeset patch # User John W. Eaton # Date 1285032190 14400 # Node ID 0de4eff677d6b5f96ef4eea771dc32b77d834cb5 # Parent 594adb99a25ed595c8440fb87d2735cd229da552 use mktime module from gnulib diff -r 594adb99a25e -r 0de4eff677d6 ChangeLog --- a/ChangeLog Mon Sep 20 20:39:56 2010 -0400 +++ b/ChangeLog Mon Sep 20 21:23:10 2010 -0400 @@ -1,3 +1,7 @@ +2010-09-20 John W. Eaton + + * bootstrap.conf (gnulib_modules): Include mktime in the list. + 2010-09-18 John W. Eaton * Makefile.am (BUILT_SOURCES): Include run-octave in the list. diff -r 594adb99a25e -r 0de4eff677d6 bootstrap.conf --- a/bootstrap.conf Mon Sep 20 20:39:56 2010 -0400 +++ b/bootstrap.conf Mon Sep 20 21:23:10 2010 -0400 @@ -31,6 +31,7 @@ lstat mkdir mkfifo + mktime nanosleep pathmax progname diff -r 594adb99a25e -r 0de4eff677d6 liboctave/ChangeLog --- a/liboctave/ChangeLog Mon Sep 20 20:39:56 2010 -0400 +++ b/liboctave/ChangeLog Mon Sep 20 21:23:10 2010 -0400 @@ -1,3 +1,8 @@ +2010-09-20 John W. Eaton + + * oct-time.cc (octave_time::octave_time, octave_strptime::init): + Call gnulib::mktime instead of mktime (may fix bug #31079). + 2010-09-15 Jaroslav Hajek * dSparse.h (SparseMatrix::SparseMatrix (const Sparse&)): diff -r 594adb99a25e -r 0de4eff677d6 liboctave/oct-time.cc --- a/liboctave/oct-time.cc Mon Sep 20 20:39:56 2010 -0400 +++ b/liboctave/oct-time.cc Mon Sep 20 21:23:10 2010 -0400 @@ -58,7 +58,7 @@ t.tm_zone = ps; #endif - ot_unix_time = mktime (&t); + ot_unix_time = gnulib::mktime (&t); #if defined (HAVE_STRUCT_TM_TM_ZONE) delete [] ps; @@ -272,7 +272,7 @@ if (t.tm_mday != 0 && t.tm_mon >= 0 && t.tm_year != INT_MIN) { t.tm_isdst = -1; - mktime (&t); + gnulib::mktime (&t); } if (t.tm_mon < 0) diff -r 594adb99a25e -r 0de4eff677d6 src/ChangeLog --- a/src/ChangeLog Mon Sep 20 20:39:56 2010 -0400 +++ b/src/ChangeLog Mon Sep 20 21:23:10 2010 -0400 @@ -1,3 +1,7 @@ +2010-09-20 John W. Eaton + + * DLD-FUNCTIONS/time.cc (Fmktime): New tests (bug #31079). + 2010-09-20 John W. Eaton Bug #31085: diff -r 594adb99a25e -r 0de4eff677d6 src/DLD-FUNCTIONS/time.cc --- a/src/DLD-FUNCTIONS/time.cc Mon Sep 20 20:39:56 2010 -0400 +++ b/src/DLD-FUNCTIONS/time.cc Mon Sep 20 21:23:10 2010 -0400 @@ -279,6 +279,12 @@ %!error mktime (1, 2, 3); +%% These tests fail on systems with mktime functions of limited +%% intelligence: +%!assert (datestr (datenum (1969, 1, 1), 0), "01-Jan-1969 00:00:00") +%!assert (datestr (datenum (1901, 1, 1), 0), "01-Jan-1901 00:00:00") +%!assert (datestr (datenum (1795, 1, 1), 0), "01-Jan-1795 00:00:00") + */ DEFUN_DLD (strftime, args, ,