Blame src/gl/mktime-internal.h

Packit 549fdc
/* mktime variant that also uses an offset guess
Packit 549fdc
Packit 549fdc
   Copyright 2016 Free Software Foundation, Inc.
Packit 549fdc
Packit 549fdc
   This program is free software; you can redistribute it and/or
Packit 549fdc
   modify it under the terms of the GNU General Public
Packit 549fdc
   License as published by the Free Software Foundation; either
Packit 549fdc
   version 3 of the License, or (at your option) any later version.
Packit 549fdc
Packit 549fdc
   This program is distributed in the hope that it will be useful,
Packit 549fdc
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 549fdc
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 549fdc
   General Public License for more details.
Packit 549fdc
Packit 549fdc
   You should have received a copy of the GNU General Public
Packit 549fdc
   License along with this program; if not, see
Packit 549fdc
   <http://www.gnu.org/licenses/>.  */
Packit 549fdc
Packit 549fdc
#include <time.h>
Packit 549fdc
Packit 549fdc
/* mktime_offset_t is a signed type wide enough to hold a UTC offset
Packit 549fdc
   in seconds, and used as part of the type of the offset-guess
Packit 549fdc
   argument to mktime_internal.  Use time_t on platforms where time_t
Packit 549fdc
   is signed, to be compatible with platforms like BeOS that export
Packit 549fdc
   this implementation detail of mktime.  On platforms where time_t is
Packit 549fdc
   unsigned, GNU and POSIX code can assume 'int' is at least 32 bits
Packit 549fdc
   which is wide enough for a UTC offset.  */
Packit 549fdc
Packit 549fdc
#if TIME_T_IS_SIGNED
Packit 549fdc
typedef time_t mktime_offset_t;
Packit 549fdc
#else
Packit 549fdc
typedef int mktime_offset_t;
Packit 549fdc
#endif
Packit 549fdc
Packit 549fdc
time_t mktime_internal (struct tm *,
Packit 549fdc
                        struct tm * (*) (time_t const *, struct tm *),
Packit 549fdc
                        mktime_offset_t *);