3 ?RCS: Copyright (c) 2008 H.Merijn Brand
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
8 ?MAKE:sGMTIME_max sGMTIME_min: cat rm_try Setvar Compile run
11 ?S: This variable defines the maximum value of the time_t offset that
12 ?S: the system function gmtime () accepts
15 ?S: This variable defines the minimum value of the time_t offset that
16 ?S: the system function gmtime () accepts
19 ?C: This symbol contains the maximum value for the time_t offset that
20 ?C: the system function gmtime () accepts, and defaults to 0
23 ?C: This symbol contains the minimum value for the time_t offset that
24 ?C: the system function gmtime () accepts, and defaults to 0
26 ?H:#define GMTIME_MAX $sGMTIME_max /**/
27 ?H:#define GMTIME_MIN $sGMTIME_min /**/
32 : Check the max offset that gmtime accepts
33 echo "Checking max offset that gmtime () accepts"
36 #include <sys/types.h>
44 for (i = 0; i < 78; i++) {
45 time_t t = (1 << i) - 1;
47 if (tmp == NULL || tmp->tm_year < y) {
61 if eval $compile; then
62 sGMTIME_max=`$run ./try`
64 echo "Cannot determine sGMTIME_max"
68 echo "Checking min offset that gmtime () accepts"
71 #include <sys/types.h>
79 for (i = 0; i < 78; i++) {
80 time_t t = - (1 << i);
82 if (tmp == NULL || tmp->tm_year > y) {
96 if eval $compile; then
97 sGMTIME_min=`$run ./try`
99 echo "Cannot determine sGMTIME_min"