* tests/test-posixtm.c (main): Don't assume wraparound semantics
after signed integer overflow. Inspired by (though it may not
fix) Bruno Haible's bug report in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00066.html>.
2012-01-04 Paul Eggert <eggert@cs.ucla.edu>
2012-01-04 Paul Eggert <eggert@cs.ucla.edu>
+ test-posixtm: don't assume signed integer wraparound
+ * tests/test-posixtm.c (main): Don't assume wraparound semantics
+ after signed integer overflow. Inspired by (though it may not
+ fix) Bruno Haible's bug report in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00066.html>.
+
Spell out "Windows 9x" and "Windows XP".
* lib/poll.c, lib/select.c: In comments, replace "Win9x" with
"Windows 9x" and "WinXP" with "Windows XP".
Spell out "Windows 9x" and "Windows XP".
* lib/poll.c, lib/select.c: In comments, replace "Win9x" with
"Windows 9x" and "WinXP" with "Windows XP".
for (i = 0; T[i].in; i++)
{
time_t t_out;
for (i = 0; T[i].in; i++)
{
time_t t_out;
- time_t t_exp = T[i].t_expected;
bool ok;
/* Some tests assume that time_t is signed.
bool ok;
/* Some tests assume that time_t is signed.
- if (T[i].valid && t_exp != T[i].t_expected)
+ if (! (TYPE_MINIMUM (time_t) <= T[i].t_expected
+ && T[i].t_expected <= TYPE_MAXIMUM (time_t)))
{
printf ("skipping %s: result is out of range of your time_t\n",
T[i].in);
continue;
}
{
printf ("skipping %s: result is out of range of your time_t\n",
T[i].in);
continue;
}
+ t_exp = T[i].t_expected;
+
/* If an input string does not specify the year number, determine
the expected output by calling posixtime with an otherwise
equivalent string that starts with the current year. */
/* If an input string does not specify the year number, determine
the expected output by calling posixtime with an otherwise
equivalent string that starts with the current year. */