19 #ifndef _GL_ARPA_INET_H 22 #pragma GCC system_header 27 # include <features.h> 39 #if defined __TANDEM && !defined __GLIBC__ 46 # include_next <arpa/inet.h> 50 #ifndef _GL_ARPA_INET_H 51 #define _GL_ARPA_INET_H 74 #if defined __cplusplus && defined GNULIB_NAMESPACE 75 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 76 # define _GL_END_NAMESPACE } 78 # define _GL_BEGIN_NAMESPACE 79 # define _GL_END_NAMESPACE 143 #if defined __cplusplus 144 # define _GL_EXTERN_C extern "C" 146 # define _GL_EXTERN_C extern 156 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 157 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 158 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 159 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 168 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 169 _GL_EXTERN_C rettype func parameters_and_attributes 180 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 181 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 182 #if defined __cplusplus && defined GNULIB_NAMESPACE 183 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 184 namespace GNULIB_NAMESPACE \ 186 static const struct _gl_ ## func ## _wrapper \ 188 typedef rettype (*type) parameters; \ 190 inline operator type () const \ 196 _GL_EXTERN_C int _gl_cxxalias_dummy 198 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 199 _GL_EXTERN_C int _gl_cxxalias_dummy 207 #if defined __cplusplus && defined GNULIB_NAMESPACE 208 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 209 namespace GNULIB_NAMESPACE \ 211 static const struct _gl_ ## func ## _wrapper \ 213 typedef rettype (*type) parameters; \ 215 inline operator type () const \ 217 return reinterpret_cast<type>(::rpl_func); \ 221 _GL_EXTERN_C int _gl_cxxalias_dummy 223 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 224 _GL_EXTERN_C int _gl_cxxalias_dummy 237 #if defined __cplusplus && defined GNULIB_NAMESPACE 238 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 239 namespace GNULIB_NAMESPACE \ 241 static const struct _gl_ ## func ## _wrapper \ 243 typedef rettype (*type) parameters; \ 245 inline operator type () const \ 251 _GL_EXTERN_C int _gl_cxxalias_dummy 253 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 254 _GL_EXTERN_C int _gl_cxxalias_dummy 262 #if defined __cplusplus && defined GNULIB_NAMESPACE 263 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 264 namespace GNULIB_NAMESPACE \ 266 static const struct _gl_ ## func ## _wrapper \ 268 typedef rettype (*type) parameters; \ 270 inline operator type () const \ 272 return reinterpret_cast<type>(::func); \ 276 _GL_EXTERN_C int _gl_cxxalias_dummy 278 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 279 _GL_EXTERN_C int _gl_cxxalias_dummy 288 #if defined __cplusplus && defined GNULIB_NAMESPACE 294 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 295 namespace GNULIB_NAMESPACE \ 297 static const struct _gl_ ## func ## _wrapper \ 299 typedef rettype (*type) parameters; \ 301 inline operator type () const \ 303 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ 307 _GL_EXTERN_C int _gl_cxxalias_dummy 309 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 310 _GL_EXTERN_C int _gl_cxxalias_dummy 317 #if defined __cplusplus && defined GNULIB_NAMESPACE 318 # define _GL_CXXALIASWARN(func) \ 319 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 320 # define _GL_CXXALIASWARN_1(func,namespace) \ 321 _GL_CXXALIASWARN_2 (func, namespace) 325 # define _GL_CXXALIASWARN_2(func,namespace) \ 326 _GL_WARN_ON_USE (func, \ 327 "The symbol ::" #func " refers to the system function. " \ 328 "Use " #namespace "::" #func " instead.") 329 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 330 # define _GL_CXXALIASWARN_2(func,namespace) \ 331 extern __typeof__ (func) func 333 # define _GL_CXXALIASWARN_2(func,namespace) \ 334 _GL_EXTERN_C int _gl_cxxalias_dummy 337 # define _GL_CXXALIASWARN(func) \ 338 _GL_EXTERN_C int _gl_cxxalias_dummy 344 #if defined __cplusplus && defined GNULIB_NAMESPACE 345 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 346 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 348 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 349 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 353 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 354 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 355 "The symbol ::" #func " refers to the system function. " \ 356 "Use " #namespace "::" #func " instead.") 357 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 358 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 359 extern __typeof__ (func) func 361 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 362 _GL_EXTERN_C int _gl_cxxalias_dummy 365 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 366 _GL_EXTERN_C int _gl_cxxalias_dummy 391 #ifndef _GL_ARG_NONNULL 392 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 393 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 395 # define _GL_ARG_NONNULL(params) 463 #ifndef _GL_WARN_ON_USE 465 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 467 # define _GL_WARN_ON_USE(function, message) \ 468 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 469 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 471 # define _GL_WARN_ON_USE(function, message) \ 472 extern __typeof__ (function) function 474 # define _GL_WARN_ON_USE(function, message) \ 475 _GL_WARN_EXTERN_C int _gl_warn_on_use 485 #ifndef _GL_WARN_ON_USE_CXX 486 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 487 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 488 extern rettype function parameters_and_attributes \ 489 __attribute__ ((__warning__ (msg))) 490 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 492 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 493 extern rettype function parameters_and_attributes 495 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 496 _GL_WARN_EXTERN_C int _gl_warn_on_use 502 #ifndef _GL_WARN_EXTERN_C 503 # if defined __cplusplus 504 # define _GL_WARN_EXTERN_C extern "C" 506 # define _GL_WARN_EXTERN_C extern 528 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 530 # define inet_ntop rpl_inet_ntop 538 char *
restrict dst, socklen_t cnt));
550 char *
restrict dst, socklen_t cnt));
553 #elif defined GNULIB_POSIXCHECK 555 # if HAVE_RAW_DECL_INET_NTOP 557 "use gnulib module inet_ntop for portability");
563 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 565 # define inet_pton rpl_inet_pton 582 #elif defined GNULIB_POSIXCHECK 584 # if HAVE_RAW_DECL_INET_PTON 586 "use gnulib module inet_pton for portability");
int inet_pton(int af, const char *restrict src, void *restrict dst)
Definition: inet_pton.c:82
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
Definition: inet.h:278
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: inet.h:168
#define _GL_ARG_NONNULL(params)
Definition: inet.h:395
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: inet.h:180
#define _GL_CXXALIASWARN(func)
Definition: inet.h:337
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: inet.h:253
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: inet.h:156
#define restrict
Definition: config.h:1858
#define _GL_WARN_ON_USE(function, message)
Definition: inet.h:474