Fix undefined refs on some GNU/Linux hosts
[emacs.git] / lib / mktime-internal.h
blob2f586aef64163b482fe93e76b99fb770c7411b1c
1 /* mktime variant that also uses an offset guess
3 Copyright 2016 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 3 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public
16 License along with this program; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #include <time.h>
21 /* mktime_offset_t is a signed type wide enough to hold a UTC offset
22 in seconds, and used as part of the type of the offset-guess
23 argument to mktime_internal. Use time_t on platforms where time_t
24 is signed, to be compatible with platforms like BeOS that export
25 this implementation detail of mktime. On platforms where time_t is
26 unsigned, GNU and POSIX code can assume 'int' is at least 32 bits
27 which is wide enough for a UTC offset. */
29 #if TIME_T_IS_SIGNED
30 typedef time_t mktime_offset_t;
31 #else
32 typedef int mktime_offset_t;
33 #endif
35 time_t mktime_internal (struct tm *,
36 struct tm * (*) (time_t const *, struct tm *),
37 mktime_offset_t *);