Blame lib/mktime-internal.h

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