usleep tests: Avoid failure due to known Cygwin 3.5.3 bug.
[gnulib.git] / tests / test-year2038.c
blob3e80d930824d1f19c98c1f29b8be3371c6761d9b
1 /* Test of year2038 module.
2 Copyright (C) 2023-2024 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2023. */
19 /* This test fails if AC_SYS_YEAR2038 could not arrange for a time_t
20 that supports values > 2147483647.
21 This can happen
22 - on systems that are not year 2038 safe, or
23 - if the user specified --disable-year2038 at configure time.
24 It is intended that this test fails in these circumstances. */
26 #include <config.h>
28 #include <sys/types.h>
29 #include "intprops.h"
31 /* Although this test could be done with static_assert, the test
32 harness prefers dynamic checking. */
34 int
35 main (void)
37 /* Check the range of time_t. */
38 return TYPE_MAXIMUM (time_t) >> 31 == 0;