Blame lib/mktime-internal.h

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