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