20 #pragma GCC system_header 30 #if (((defined __need_time_t || defined __need_clock_t \ 31 || defined __need_timespec) \ 32 && !defined __MINGW32__) \ 33 || defined _GL_TIME_H) 35 # include_next <time.h> 41 # include_next <time.h> 51 #if defined __cplusplus && defined GNULIB_NAMESPACE 52 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 53 # define _GL_END_NAMESPACE } 55 # define _GL_BEGIN_NAMESPACE 56 # define _GL_END_NAMESPACE 120 #if defined __cplusplus 121 # define _GL_EXTERN_C extern "C" 123 # define _GL_EXTERN_C extern 133 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 134 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 135 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 136 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 145 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 146 _GL_EXTERN_C rettype func parameters_and_attributes 157 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 158 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 159 #if defined __cplusplus && defined GNULIB_NAMESPACE 160 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 161 namespace GNULIB_NAMESPACE \ 163 static const struct _gl_ ## func ## _wrapper \ 165 typedef rettype (*type) parameters; \ 166 inline type rpl () const { return ::rpl_func; } \ 167 inline operator type () const { return rpl (); } \ 170 _GL_EXTERN_C int _gl_cxxalias_dummy 172 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 173 _GL_EXTERN_C int _gl_cxxalias_dummy 181 #if defined __cplusplus && defined GNULIB_NAMESPACE 182 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 183 namespace GNULIB_NAMESPACE \ 185 static const struct _gl_ ## func ## _wrapper \ 187 typedef rettype (*type) parameters; \ 188 inline type rpl () const \ 189 { return reinterpret_cast<type>(::rpl_func); } \ 190 inline operator type () const { return rpl (); } \ 193 _GL_EXTERN_C int _gl_cxxalias_dummy 195 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 196 _GL_EXTERN_C int _gl_cxxalias_dummy 209 #if defined __cplusplus && defined GNULIB_NAMESPACE 210 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 211 namespace GNULIB_NAMESPACE \ 213 static const struct _gl_ ## func ## _wrapper \ 215 typedef rettype (*type) parameters; \ 216 inline type rpl () const { return ::func; } \ 217 inline operator type () const { return rpl (); } \ 220 _GL_EXTERN_C int _gl_cxxalias_dummy 222 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 223 _GL_EXTERN_C int _gl_cxxalias_dummy 231 #if defined __cplusplus && defined GNULIB_NAMESPACE 232 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 233 namespace GNULIB_NAMESPACE \ 235 static const struct _gl_ ## func ## _wrapper \ 237 typedef rettype (*type) parameters; \ 238 inline type rpl () const \ 239 { return reinterpret_cast<type>(::func); } \ 240 inline operator type () const { return rpl (); }\ 243 _GL_EXTERN_C int _gl_cxxalias_dummy 245 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 246 _GL_EXTERN_C int _gl_cxxalias_dummy 255 #if defined __cplusplus && defined GNULIB_NAMESPACE 261 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 262 namespace GNULIB_NAMESPACE \ 264 static const struct _gl_ ## func ## _wrapper \ 266 typedef rettype (*type) parameters; \ 268 inline type rpl () const \ 269 { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\ 271 inline operator type () const { return rpl (); } \ 274 _GL_EXTERN_C int _gl_cxxalias_dummy 276 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 277 _GL_EXTERN_C int _gl_cxxalias_dummy 284 #if defined __cplusplus && defined GNULIB_NAMESPACE 285 # define _GL_CXXALIASWARN(func) \ 286 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 287 # define _GL_CXXALIASWARN_1(func,namespace) \ 288 _GL_CXXALIASWARN_2 (func, namespace) 292 # define _GL_CXXALIASWARN_2(func,namespace) \ 293 _GL_WARN_ON_USE (func, \ 294 "The symbol ::" #func " refers to the system function. " \ 295 "Use " #namespace "::" #func " instead.") 296 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 297 # define _GL_CXXALIASWARN_2(func,namespace) \ 298 extern __typeof__ (func) func 300 # define _GL_CXXALIASWARN_2(func,namespace) \ 301 _GL_EXTERN_C int _gl_cxxalias_dummy 304 # define _GL_CXXALIASWARN(func) \ 305 _GL_EXTERN_C int _gl_cxxalias_dummy 311 #if defined __cplusplus && defined GNULIB_NAMESPACE 312 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 313 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 315 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 316 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 320 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 321 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 322 "The symbol ::" #func " refers to the system function. " \ 323 "Use " #namespace "::" #func " instead.") 324 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 325 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 326 extern __typeof__ (func) func 328 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 329 _GL_EXTERN_C int _gl_cxxalias_dummy 332 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 333 _GL_EXTERN_C int _gl_cxxalias_dummy 342 #ifndef _GL_ARG_NONNULL 343 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 344 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 346 # define _GL_ARG_NONNULL(params) 351 #ifndef _GL_WARN_ON_USE 353 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 355 # define _GL_WARN_ON_USE(function, message) \ 356 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 357 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 359 # define _GL_WARN_ON_USE(function, message) \ 360 extern __typeof__ (function) function 362 # define _GL_WARN_ON_USE(function, message) \ 363 _GL_WARN_EXTERN_C int _gl_warn_on_use 373 #ifndef _GL_WARN_ON_USE_CXX 374 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 375 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 376 extern rettype function parameters_and_attributes \ 377 __attribute__ ((__warning__ (msg))) 378 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 380 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 381 extern rettype function parameters_and_attributes 383 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 384 _GL_WARN_EXTERN_C int _gl_warn_on_use 390 #ifndef _GL_WARN_EXTERN_C 391 # if defined __cplusplus 392 # define _GL_WARN_EXTERN_C extern "C" 394 # define _GL_WARN_EXTERN_C extern 406 # include <pthread.h> 415 # if !GNULIB_defined_struct_timespec 417 # define timespec rpl_timespec 423 # define GNULIB_defined_struct_timespec 1 433 # if !GNULIB_defined_struct_time_t_must_be_integral 442 # define GNULIB_defined_struct_time_t_must_be_integral 1 449 # if GNULIB_PORTCHECK 450 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 451 # define nanosleep rpl_nanosleep 454 (
struct timespec
const *__rqtp,
struct timespec *__rmtp)
457 (
struct timespec
const *__rqtp,
struct timespec *__rmtp));
461 (
struct timespec
const *__rqtp,
struct timespec *__rmtp)
465 (
struct timespec
const *__rqtp,
struct timespec *__rmtp));
472 # if GNULIB_PORTCHECK 473 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 474 # define mktime rpl_mktime 488 # if GNULIB_PORTCHECK 489 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 491 # define localtime_r rpl_localtime_r 510 # if GNULIB_PORTCHECK 511 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 513 # define gmtime_r rpl_gmtime_r 539 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 541 # define localtime rpl_localtime 554 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 556 # define gmtime rpl_gmtime 583 # if defined _GNU_SOURCE && 0 && ! 0 584 typedef struct tm_zone *timezone_t;
590 (timezone_t __tz, time_t
const *
restrict __timer,
593 (timezone_t __tz, time_t
const *
restrict __timer,
596 (timezone_t __tz,
struct tm *
restrict __result)
599 (timezone_t __tz,
struct tm *
restrict __result));
604 # if GNULIB_PORTCHECK 605 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 607 # define timegm rpl_timegm 623 # if defined GNULIB_POSIXCHECK 625 _GL_WARN_ON_USE (asctime,
"asctime can overrun buffers in some cases - " 626 "better use strftime (or even sprintf) instead");
628 # if defined GNULIB_POSIXCHECK 630 _GL_WARN_ON_USE (asctime,
"asctime_r can overrun buffers in some cases - " 631 "better use strftime (or even sprintf) instead");
633 # if defined GNULIB_POSIXCHECK 636 "better use strftime (or even sprintf) instead");
638 # if defined GNULIB_POSIXCHECK 640 _GL_WARN_ON_USE (asctime,
"ctime_r can overrun buffers in some cases - " 641 "better use strftime (or even sprintf) instead");
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
#define _GL_ARG_NONNULL(params)
#define _GL_WARN_ON_USE(function, message)
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_CXXALIASWARN(func)
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
unsigned int __floating_time_t_unsupported