dhcpd-pools  2.28
ISC dhcpd lease usage analyser
time.h
Go to the documentation of this file.
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* A more-standard <time.h>.
3 
4  Copyright (C) 2007-2015 Free Software Foundation, Inc.
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 3, or (at your option)
9  any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, see <http://www.gnu.org/licenses/>. */
18 
19 #if __GNUC__ >= 3
20 #pragma GCC system_header
21 #endif
22 
23 
24 /* Don't get in the way of glibc when it includes time.h merely to
25  declare a few standard symbols, rather than to declare all the
26  symbols. (However, skip this for MinGW as it treats __need_time_t
27  incompatibly.) Also, Solaris 8 <time.h> eventually includes itself
28  recursively; if that is happening, just include the system <time.h>
29  without adding our own declarations. */
30 #if (((defined __need_time_t || defined __need_clock_t \
31  || defined __need_timespec) \
32  && !defined __MINGW32__) \
33  || defined _GL_TIME_H)
34 
35 # include_next <time.h>
36 
37 #else
38 
39 # define _GL_TIME_H
40 
41 # include_next <time.h>
42 
43 /* NetBSD 5.0 mis-defines NULL. */
44 # include <stddef.h>
45 
46 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
47 #ifndef _GL_CXXDEFS_H
48 #define _GL_CXXDEFS_H
49 
50 /* The three most frequent use cases of these macros are:
51 
52  * For providing a substitute for a function that is missing on some
53  platforms, but is declared and works fine on the platforms on which
54  it exists:
55 
56  #if @GNULIB_FOO@
57  # if !@HAVE_FOO@
58  _GL_FUNCDECL_SYS (foo, ...);
59  # endif
60  _GL_CXXALIAS_SYS (foo, ...);
61  _GL_CXXALIASWARN (foo);
62  #elif defined GNULIB_POSIXCHECK
63  ...
64  #endif
65 
66  * For providing a replacement for a function that exists on all platforms,
67  but is broken/insufficient and needs to be replaced on some platforms:
68 
69  #if @GNULIB_FOO@
70  # if @REPLACE_FOO@
71  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
72  # undef foo
73  # define foo rpl_foo
74  # endif
75  _GL_FUNCDECL_RPL (foo, ...);
76  _GL_CXXALIAS_RPL (foo, ...);
77  # else
78  _GL_CXXALIAS_SYS (foo, ...);
79  # endif
80  _GL_CXXALIASWARN (foo);
81  #elif defined GNULIB_POSIXCHECK
82  ...
83  #endif
84 
85  * For providing a replacement for a function that exists on some platforms
86  but is broken/insufficient and needs to be replaced on some of them and
87  is additionally either missing or undeclared on some other platforms:
88 
89  #if @GNULIB_FOO@
90  # if @REPLACE_FOO@
91  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
92  # undef foo
93  # define foo rpl_foo
94  # endif
95  _GL_FUNCDECL_RPL (foo, ...);
96  _GL_CXXALIAS_RPL (foo, ...);
97  # else
98  # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
99  _GL_FUNCDECL_SYS (foo, ...);
100  # endif
101  _GL_CXXALIAS_SYS (foo, ...);
102  # endif
103  _GL_CXXALIASWARN (foo);
104  #elif defined GNULIB_POSIXCHECK
105  ...
106  #endif
107 */
108 
109 /* _GL_EXTERN_C declaration;
110  performs the declaration with C linkage. */
111 #if defined __cplusplus
112 # define _GL_EXTERN_C extern "C"
113 #else
114 # define _GL_EXTERN_C extern
115 #endif
116 
117 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
118  declares a replacement function, named rpl_func, with the given prototype,
119  consisting of return type, parameters, and attributes.
120  Example:
121  _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
122  _GL_ARG_NONNULL ((1)));
123  */
124 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
125  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
126 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
127  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
128 
129 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
130  declares the system function, named func, with the given prototype,
131  consisting of return type, parameters, and attributes.
132  Example:
133  _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
134  _GL_ARG_NONNULL ((1)));
135  */
136 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
137  _GL_EXTERN_C rettype func parameters_and_attributes
138 
139 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
140  declares a C++ alias called GNULIB_NAMESPACE::func
141  that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
142  Example:
143  _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
144  */
145 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
146  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
147 #if defined __cplusplus && defined GNULIB_NAMESPACE
148 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
149  namespace GNULIB_NAMESPACE \
150  { \
151  rettype (*const func) parameters = ::rpl_func; \
152  } \
153  _GL_EXTERN_C int _gl_cxxalias_dummy
154 #else
155 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
156  _GL_EXTERN_C int _gl_cxxalias_dummy
157 #endif
158 
159 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
160  is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
161  except that the C function rpl_func may have a slightly different
162  declaration. A cast is used to silence the "invalid conversion" error
163  that would otherwise occur. */
164 #if defined __cplusplus && defined GNULIB_NAMESPACE
165 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
166  namespace GNULIB_NAMESPACE \
167  { \
168  rettype (*const func) parameters = \
169  reinterpret_cast<rettype(*)parameters>(::rpl_func); \
170  } \
171  _GL_EXTERN_C int _gl_cxxalias_dummy
172 #else
173 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
174  _GL_EXTERN_C int _gl_cxxalias_dummy
175 #endif
176 
177 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
178  declares a C++ alias called GNULIB_NAMESPACE::func
179  that redirects to the system provided function func, if GNULIB_NAMESPACE
180  is defined.
181  Example:
182  _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
183  */
184 #if defined __cplusplus && defined GNULIB_NAMESPACE
185  /* If we were to write
186  rettype (*const func) parameters = ::func;
187  like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
188  better (remove an indirection through a 'static' pointer variable),
189  but then the _GL_CXXALIASWARN macro below would cause a warning not only
190  for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
191 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
192  namespace GNULIB_NAMESPACE \
193  { \
194  static rettype (*func) parameters = ::func; \
195  } \
196  _GL_EXTERN_C int _gl_cxxalias_dummy
197 #else
198 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
199  _GL_EXTERN_C int _gl_cxxalias_dummy
200 #endif
201 
202 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
203  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
204  except that the C function func may have a slightly different declaration.
205  A cast is used to silence the "invalid conversion" error that would
206  otherwise occur. */
207 #if defined __cplusplus && defined GNULIB_NAMESPACE
208 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
209  namespace GNULIB_NAMESPACE \
210  { \
211  static rettype (*func) parameters = \
212  reinterpret_cast<rettype(*)parameters>(::func); \
213  } \
214  _GL_EXTERN_C int _gl_cxxalias_dummy
215 #else
216 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
217  _GL_EXTERN_C int _gl_cxxalias_dummy
218 #endif
219 
220 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
221  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
222  except that the C function is picked among a set of overloaded functions,
223  namely the one with rettype2 and parameters2. Two consecutive casts
224  are used to silence the "cannot find a match" and "invalid conversion"
225  errors that would otherwise occur. */
226 #if defined __cplusplus && defined GNULIB_NAMESPACE
227  /* The outer cast must be a reinterpret_cast.
228  The inner cast: When the function is defined as a set of overloaded
229  functions, it works as a static_cast<>, choosing the designated variant.
230  When the function is defined as a single variant, it works as a
231  reinterpret_cast<>. The parenthesized cast syntax works both ways. */
232 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
233  namespace GNULIB_NAMESPACE \
234  { \
235  static rettype (*func) parameters = \
236  reinterpret_cast<rettype(*)parameters>( \
237  (rettype2(*)parameters2)(::func)); \
238  } \
239  _GL_EXTERN_C int _gl_cxxalias_dummy
240 #else
241 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
242  _GL_EXTERN_C int _gl_cxxalias_dummy
243 #endif
244 
245 /* _GL_CXXALIASWARN (func);
246  causes a warning to be emitted when ::func is used but not when
247  GNULIB_NAMESPACE::func is used. func must be defined without overloaded
248  variants. */
249 #if defined __cplusplus && defined GNULIB_NAMESPACE
250 # define _GL_CXXALIASWARN(func) \
251  _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
252 # define _GL_CXXALIASWARN_1(func,namespace) \
253  _GL_CXXALIASWARN_2 (func, namespace)
254 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
255  we enable the warning only when not optimizing. */
256 # if !__OPTIMIZE__
257 # define _GL_CXXALIASWARN_2(func,namespace) \
258  _GL_WARN_ON_USE (func, \
259  "The symbol ::" #func " refers to the system function. " \
260  "Use " #namespace "::" #func " instead.")
261 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
262 # define _GL_CXXALIASWARN_2(func,namespace) \
263  extern __typeof__ (func) func
264 # else
265 # define _GL_CXXALIASWARN_2(func,namespace) \
266  _GL_EXTERN_C int _gl_cxxalias_dummy
267 # endif
268 #else
269 # define _GL_CXXALIASWARN(func) \
270  _GL_EXTERN_C int _gl_cxxalias_dummy
271 #endif
272 
273 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
274  causes a warning to be emitted when the given overloaded variant of ::func
275  is used but not when GNULIB_NAMESPACE::func is used. */
276 #if defined __cplusplus && defined GNULIB_NAMESPACE
277 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
278  _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
279  GNULIB_NAMESPACE)
280 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
281  _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
282 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
283  we enable the warning only when not optimizing. */
284 # if !__OPTIMIZE__
285 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
286  _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
287  "The symbol ::" #func " refers to the system function. " \
288  "Use " #namespace "::" #func " instead.")
289 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
290 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
291  extern __typeof__ (func) func
292 # else
293 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
294  _GL_EXTERN_C int _gl_cxxalias_dummy
295 # endif
296 #else
297 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
298  _GL_EXTERN_C int _gl_cxxalias_dummy
299 #endif
300 
301 #endif /* _GL_CXXDEFS_H */
302 
303 /* The definition of _GL_ARG_NONNULL is copied here. */
304 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
305  that the values passed as arguments n, ..., m must be non-NULL pointers.
306  n = 1 stands for the first argument, n = 2 for the second argument etc. */
307 #ifndef _GL_ARG_NONNULL
308 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
309 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
310 # else
311 # define _GL_ARG_NONNULL(params)
312 # endif
313 #endif
314 
315 /* The definition of _GL_WARN_ON_USE is copied here. */
316 #ifndef _GL_WARN_ON_USE
317 
318 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
319 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
320 # define _GL_WARN_ON_USE(function, message) \
321 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
322 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
323 /* Verify the existence of the function. */
324 # define _GL_WARN_ON_USE(function, message) \
325 extern __typeof__ (function) function
326 # else /* Unsupported. */
327 # define _GL_WARN_ON_USE(function, message) \
328 _GL_WARN_EXTERN_C int _gl_warn_on_use
329 # endif
330 #endif
331 
332 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
333  is like _GL_WARN_ON_USE (function, "string"), except that the function is
334  declared with the given prototype, consisting of return type, parameters,
335  and attributes.
336  This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
337  not work in this case. */
338 #ifndef _GL_WARN_ON_USE_CXX
339 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
340 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
341 extern rettype function parameters_and_attributes \
342  __attribute__ ((__warning__ (msg)))
343 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
344 /* Verify the existence of the function. */
345 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
346 extern rettype function parameters_and_attributes
347 # else /* Unsupported. */
348 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
349 _GL_WARN_EXTERN_C int _gl_warn_on_use
350 # endif
351 #endif
352 
353 /* _GL_WARN_EXTERN_C declaration;
354  performs the declaration with C linkage. */
355 #ifndef _GL_WARN_EXTERN_C
356 # if defined __cplusplus
357 # define _GL_WARN_EXTERN_C extern "C"
358 # else
359 # define _GL_WARN_EXTERN_C extern
360 # endif
361 #endif
362 
363 /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
364  Or they define it with the wrong member names or define it in <sys/time.h>
365  (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it,
366  but the pthreads-win32 library defines it in <pthread.h>. */
367 # if ! 1
368 # if 0
369 # include <sys/time.h>
370 # elif 0
371 # include <pthread.h>
372 # elif 0
373 # include <unistd.h>
374 # else
375 
376 # ifdef __cplusplus
377 extern "C" {
378 # endif
379 
380 # if !GNULIB_defined_struct_timespec
381 # undef timespec
382 # define timespec rpl_timespec
383 struct timespec
384 {
385  time_t tv_sec;
386  long int tv_nsec;
387 };
388 # define GNULIB_defined_struct_timespec 1
389 # endif
390 
391 # ifdef __cplusplus
392 }
393 # endif
394 
395 # endif
396 # endif
397 
398 # if !GNULIB_defined_struct_time_t_must_be_integral
399 /* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
400  time_t to be an integer type, even though C99 permits floating
401  point. We don't know of any implementation that uses floating
402  point, and it is much easier to write code that doesn't have to
403  worry about that corner case, so we force the issue. */
405  unsigned int __floating_time_t_unsupported : (time_t) 1;
406 };
407 # define GNULIB_defined_struct_time_t_must_be_integral 1
408 # endif
409 
410 /* Sleep for at least RQTP seconds unless interrupted, If interrupted,
411  return -1 and store the remaining time into RMTP. See
412  <http://www.opengroup.org/susv3xsh/nanosleep.html>. */
413 # if 0
414 # if GNULIB_PORTCHECK
415 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
416 # define nanosleep rpl_nanosleep
417 # endif
418 _GL_FUNCDECL_RPL (nanosleep, int,
419  (struct timespec const *__rqtp, struct timespec *__rmtp)
420  _GL_ARG_NONNULL ((1)));
421 _GL_CXXALIAS_RPL (nanosleep, int,
422  (struct timespec const *__rqtp, struct timespec *__rmtp));
423 # else
424 # if ! 1
425 _GL_FUNCDECL_SYS (nanosleep, int,
426  (struct timespec const *__rqtp, struct timespec *__rmtp)
427  _GL_ARG_NONNULL ((1)));
428 # endif
429 _GL_CXXALIAS_SYS (nanosleep, int,
430  (struct timespec const *__rqtp, struct timespec *__rmtp));
431 # endif
432 _GL_CXXALIASWARN (nanosleep);
433 # endif
434 
435 /* Return the 'time_t' representation of TP and normalize TP. */
436 # if 1
437 # if 1
438 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
439 # define mktime rpl_mktime
440 # endif
441 _GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1)));
442 _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
443 # else
444 _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
445 # endif
447 # endif
448 
449 /* Convert TIMER to RESULT, assuming local time and UTC respectively. See
450  <http://www.opengroup.org/susv3xsh/localtime_r.html> and
451  <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
452 # if 1
453 # if 0
454 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
455 # undef localtime_r
456 # define localtime_r rpl_localtime_r
457 # endif
458 _GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
459  struct tm *restrict __result)
460  _GL_ARG_NONNULL ((1, 2)));
461 _GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
462  struct tm *restrict __result));
463 # else
464 # if ! 1
465 _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
466  struct tm *restrict __result)
467  _GL_ARG_NONNULL ((1, 2)));
468 # endif
469 _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
470  struct tm *restrict __result));
471 # endif
472 # if 1
474 # endif
475 # if 0
476 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
477 # undef gmtime_r
478 # define gmtime_r rpl_gmtime_r
479 # endif
480 _GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
481  struct tm *restrict __result)
482  _GL_ARG_NONNULL ((1, 2)));
483 _GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
484  struct tm *restrict __result));
485 # else
486 # if ! 1
487 _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
488  struct tm *restrict __result)
489  _GL_ARG_NONNULL ((1, 2)));
490 # endif
491 _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
492  struct tm *restrict __result));
493 # endif
494 # if 1
496 # endif
497 # endif
498 
499 /* Convert TIMER to RESULT, assuming local time and UTC respectively. See
500  <http://www.opengroup.org/susv3xsh/localtime.html> and
501  <http://www.opengroup.org/susv3xsh/gmtime.html>. */
502 # if 1
503 # if 0
504 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
505 # undef localtime
506 # define localtime rpl_localtime
507 # endif
508 _GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
509  _GL_ARG_NONNULL ((1)));
510 _GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
511 # else
512 _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
513 # endif
514 _GL_CXXALIASWARN (localtime);
515 # endif
516 
517 # if 1
518 # if 0
519 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
520 # undef gmtime
521 # define gmtime rpl_gmtime
522 # endif
523 _GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
524  _GL_ARG_NONNULL ((1)));
525 _GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
526 # else
527 _GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
528 # endif
529 _GL_CXXALIASWARN (gmtime);
530 # endif
531 
532 /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
533  the resulting broken-down time into TM. See
534  <http://www.opengroup.org/susv3xsh/strptime.html>. */
535 # if 0
536 # if ! 1
537 _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
538  char const *restrict __format,
539  struct tm *restrict __tm)
540  _GL_ARG_NONNULL ((1, 2, 3)));
541 # endif
542 _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
543  char const *restrict __format,
544  struct tm *restrict __tm));
545 _GL_CXXALIASWARN (strptime);
546 # endif
547 
548 # if defined _GNU_SOURCE && 1 && ! 0
549 typedef struct tm_zone *timezone_t;
550 _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
551 _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
552 _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
553 _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
554 _GL_FUNCDECL_SYS (localtime_rz, struct tm *,
555  (timezone_t __tz, time_t const *restrict __timer,
556  struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
557 _GL_CXXALIAS_SYS (localtime_rz, struct tm *,
558  (timezone_t __tz, time_t const *restrict __timer,
559  struct tm *restrict __result));
560 _GL_FUNCDECL_SYS (mktime_z, time_t,
561  (timezone_t __tz, struct tm *restrict __result)
562  _GL_ARG_NONNULL ((2)));
563 _GL_CXXALIAS_SYS (mktime_z, time_t,
564  (timezone_t __tz, struct tm *restrict __result));
565 # endif
566 
567 /* Convert TM to a time_t value, assuming UTC. */
568 # if 1
569 # if 0
570 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
571 # undef timegm
572 # define timegm rpl_timegm
573 # endif
574 _GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
575 _GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm));
576 # else
577 # if ! 1
578 _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
579 # endif
580 _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
581 # endif
583 # endif
584 
585 /* Encourage applications to avoid unsafe functions that can overrun
586  buffers when given outlandish struct tm values. Portable
587  applications should use strftime (or even sprintf) instead. */
588 # if defined GNULIB_POSIXCHECK
589 # undef asctime
590 _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
591  "better use strftime (or even sprintf) instead");
592 # endif
593 # if defined GNULIB_POSIXCHECK
594 # undef asctime_r
595 _GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
596  "better use strftime (or even sprintf) instead");
597 # endif
598 # if defined GNULIB_POSIXCHECK
599 # undef ctime
600 _GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
601  "better use strftime (or even sprintf) instead");
602 # endif
603 # if defined GNULIB_POSIXCHECK
604 # undef ctime_r
605 _GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
606  "better use strftime (or even sprintf) instead");
607 # endif
608 
609 #endif
Definition: time-internal.h:21
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: time.h:145
long int tv_nsec
Definition: time.in.h:74
time_t mktime_z(timezone_t tz, struct tm *tm)
Definition: time_rz.c:300
time_t tv_sec
Definition: time.in.h:73
#define _GL_ARG_NONNULL(params)
Definition: time.h:311
timezone_t tzalloc(char const *name)
Definition: time_rz.c:95
#define _GL_WARN_ON_USE(function, message)
Definition: time.h:327
struct tm * localtime_r(time_t const *restrict t, struct tm *restrict tp)
Definition: time_r.c:41
void tzfree(timezone_t tz)
Definition: time_rz.c:190
Definition: time.h:404
#define mktime
Definition: time.h:439
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: time.h:136
#define _GL_CXXALIASWARN(func)
Definition: time.h:269
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: time.h:124
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: time.h:198
time_t timegm(struct tm *tmp)
Definition: timegm.c:33
struct tm * gmtime_r(time_t const *restrict t, struct tm *restrict tp)
Definition: time_r.c:35
Definition: time.in.h:71
struct tm * localtime_rz(timezone_t tz, time_t const *t, struct tm *tm)
Definition: time_rz.c:281
#define restrict
Definition: config.h:1761
unsigned int __floating_time_t_unsupported
Definition: time.h:405