21 #ifndef _GL_SYS_TIME_H 24 #pragma GCC system_header 33 #if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ 34 # include_next <sys/time.h> 39 # include_next <sys/time.h> 42 #ifndef _GL_SYS_TIME_H 43 #define _GL_SYS_TIME_H 53 #if (defined _MSC_VER || 0) && 0 && !defined _GL_INCLUDING_WINSOCK2_H 54 # define _GL_INCLUDING_WINSOCK2_H 55 # include <winsock2.h> 56 # undef _GL_INCLUDING_WINSOCK2_H 64 #if defined __cplusplus && defined GNULIB_NAMESPACE 65 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 66 # define _GL_END_NAMESPACE } 68 # define _GL_BEGIN_NAMESPACE 69 # define _GL_END_NAMESPACE 133 #if defined __cplusplus 134 # define _GL_EXTERN_C extern "C" 136 # define _GL_EXTERN_C extern 146 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 147 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 148 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 149 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 158 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 159 _GL_EXTERN_C rettype func parameters_and_attributes 170 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 171 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 172 #if defined __cplusplus && defined GNULIB_NAMESPACE 173 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 174 namespace GNULIB_NAMESPACE \ 176 static const struct _gl_ ## func ## _wrapper \ 178 typedef rettype (*type) parameters; \ 179 inline type rpl () const { return ::rpl_func; } \ 180 inline operator type () const { return rpl (); } \ 183 _GL_EXTERN_C int _gl_cxxalias_dummy 185 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 186 _GL_EXTERN_C int _gl_cxxalias_dummy 194 #if defined __cplusplus && defined GNULIB_NAMESPACE 195 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 196 namespace GNULIB_NAMESPACE \ 198 static const struct _gl_ ## func ## _wrapper \ 200 typedef rettype (*type) parameters; \ 201 inline type rpl () const \ 202 { return reinterpret_cast<type>(::rpl_func); } \ 203 inline operator type () const { return rpl (); } \ 206 _GL_EXTERN_C int _gl_cxxalias_dummy 208 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 209 _GL_EXTERN_C int _gl_cxxalias_dummy 222 #if defined __cplusplus && defined GNULIB_NAMESPACE 223 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 224 namespace GNULIB_NAMESPACE \ 226 static const struct _gl_ ## func ## _wrapper \ 228 typedef rettype (*type) parameters; \ 229 inline type rpl () const { return ::func; } \ 230 inline operator type () const { return rpl (); } \ 233 _GL_EXTERN_C int _gl_cxxalias_dummy 235 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 236 _GL_EXTERN_C int _gl_cxxalias_dummy 244 #if defined __cplusplus && defined GNULIB_NAMESPACE 245 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 246 namespace GNULIB_NAMESPACE \ 248 static const struct _gl_ ## func ## _wrapper \ 250 typedef rettype (*type) parameters; \ 251 inline type rpl () const \ 252 { return reinterpret_cast<type>(::func); } \ 253 inline operator type () const { return rpl (); }\ 256 _GL_EXTERN_C int _gl_cxxalias_dummy 258 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 259 _GL_EXTERN_C int _gl_cxxalias_dummy 268 #if defined __cplusplus && defined GNULIB_NAMESPACE 274 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 275 namespace GNULIB_NAMESPACE \ 277 static const struct _gl_ ## func ## _wrapper \ 279 typedef rettype (*type) parameters; \ 281 inline type rpl () const \ 282 { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\ 284 inline operator type () const { return rpl (); } \ 287 _GL_EXTERN_C int _gl_cxxalias_dummy 289 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 290 _GL_EXTERN_C int _gl_cxxalias_dummy 297 #if defined __cplusplus && defined GNULIB_NAMESPACE 298 # define _GL_CXXALIASWARN(func) \ 299 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 300 # define _GL_CXXALIASWARN_1(func,namespace) \ 301 _GL_CXXALIASWARN_2 (func, namespace) 305 # define _GL_CXXALIASWARN_2(func,namespace) \ 306 _GL_WARN_ON_USE (func, \ 307 "The symbol ::" #func " refers to the system function. " \ 308 "Use " #namespace "::" #func " instead.") 309 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 310 # define _GL_CXXALIASWARN_2(func,namespace) \ 311 extern __typeof__ (func) func 313 # define _GL_CXXALIASWARN_2(func,namespace) \ 314 _GL_EXTERN_C int _gl_cxxalias_dummy 317 # define _GL_CXXALIASWARN(func) \ 318 _GL_EXTERN_C int _gl_cxxalias_dummy 324 #if defined __cplusplus && defined GNULIB_NAMESPACE 325 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 326 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 328 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 329 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 333 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 334 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 335 "The symbol ::" #func " refers to the system function. " \ 336 "Use " #namespace "::" #func " instead.") 337 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 338 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 339 extern __typeof__ (func) func 341 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 342 _GL_EXTERN_C int _gl_cxxalias_dummy 345 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 346 _GL_EXTERN_C int _gl_cxxalias_dummy 355 #ifndef _GL_ARG_NONNULL 356 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 357 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 359 # define _GL_ARG_NONNULL(params) 364 #ifndef _GL_WARN_ON_USE 366 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 368 # define _GL_WARN_ON_USE(function, message) \ 369 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 370 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 372 # define _GL_WARN_ON_USE(function, message) \ 373 extern __typeof__ (function) function 375 # define _GL_WARN_ON_USE(function, message) \ 376 _GL_WARN_EXTERN_C int _gl_warn_on_use 386 #ifndef _GL_WARN_ON_USE_CXX 387 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 388 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 389 extern rettype function parameters_and_attributes \ 390 __attribute__ ((__warning__ (msg))) 391 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 393 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 394 extern rettype function parameters_and_attributes 396 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 397 _GL_WARN_EXTERN_C int _gl_warn_on_use 403 #ifndef _GL_WARN_EXTERN_C 404 # if defined __cplusplus 405 # define _GL_WARN_EXTERN_C extern "C" 407 # define _GL_WARN_EXTERN_C extern 418 # define timeval rpl_timeval 421 # if !GNULIB_defined_struct_timeval 427 # define GNULIB_defined_struct_timeval 1 438 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 440 # define gettimeofday rpl_gettimeofday 459 # if defined __cplusplus && defined GNULIB_NAMESPACE 460 namespace GNULIB_NAMESPACE {
466 #elif defined GNULIB_POSIXCHECK 468 # if HAVE_RAW_DECL_GETTIMEOFDAY 470 "use gnulib module gettimeofday for portability");
476 #if defined _MSC_VER && 0 477 # if !defined _GL_UNISTD_H 478 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 480 # define close close_used_without_including_unistd_h 483 "close() used without including <unistd.h>");
485 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 487 # define gethostname gethostname_used_without_including_unistd_h 490 "gethostname() used without including <unistd.h>");
493 # if !defined _GL_SYS_SOCKET_H 494 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 496 # define socket socket_used_without_including_sys_socket_h 498 # define connect connect_used_without_including_sys_socket_h 500 # define accept accept_used_without_including_sys_socket_h 502 # define bind bind_used_without_including_sys_socket_h 504 # define getpeername getpeername_used_without_including_sys_socket_h 506 # define getsockname getsockname_used_without_including_sys_socket_h 508 # define getsockopt getsockopt_used_without_including_sys_socket_h 510 # define listen listen_used_without_including_sys_socket_h 512 # define recv recv_used_without_including_sys_socket_h 514 # define send send_used_without_including_sys_socket_h 516 # define recvfrom recvfrom_used_without_including_sys_socket_h 518 # define sendto sendto_used_without_including_sys_socket_h 520 # define setsockopt setsockopt_used_without_including_sys_socket_h 522 # define shutdown shutdown_used_without_including_sys_socket_h 525 "socket() used without including <sys/socket.h>");
527 "connect() used without including <sys/socket.h>");
529 "accept() used without including <sys/socket.h>");
531 "bind() used without including <sys/socket.h>");
533 "getpeername() used without including <sys/socket.h>");
535 "getsockname() used without including <sys/socket.h>");
537 "getsockopt() used without including <sys/socket.h>");
539 "listen() used without including <sys/socket.h>");
541 "recv() used without including <sys/socket.h>");
543 "send() used without including <sys/socket.h>");
545 "recvfrom() used without including <sys/socket.h>");
547 "sendto() used without including <sys/socket.h>");
549 "setsockopt() used without including <sys/socket.h>");
551 "shutdown() used without including <sys/socket.h>");
554 # if !defined _GL_SYS_SELECT_H 555 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 557 # define select select_used_without_including_sys_select_h 560 "select() used without including <sys/select.h>");
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
#define _GL_CXXALIASWARN(func)
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_WARN_ON_USE(function, message)
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
#define _GL_ARG_NONNULL(params)