26 @PRAGMA_SYSTEM_HEADER@
30 #if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H 37 #@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ 42 #ifndef _@GUARD_PREFIX@_SYS_SOCKET_H 44 #if @HAVE_SYS_SOCKET_H@ 46 # define _GL_ALREADY_INCLUDING_SYS_SOCKET_H 57 # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ 59 # undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H 63 #ifndef _@GUARD_PREFIX@_SYS_SOCKET_H 64 #define _@GUARD_PREFIX@_SYS_SOCKET_H 66 #ifndef _GL_INLINE_HEADER_BEGIN 67 #error "Please include config.h first." 70 #ifndef _GL_SYS_SOCKET_INLINE 71 # define _GL_SYS_SOCKET_INLINE _GL_INLINE 80 #if !@HAVE_SA_FAMILY_T@ 81 # if !GNULIB_defined_sa_family_t 83 # if !defined __KLIBC__ || defined TCPV40HDRS 88 # define GNULIB_defined_sa_family_t 1 92 #if @HAVE_STRUCT_SOCKADDR_STORAGE@ 94 # if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ 96 # define ss_family __ss_family 100 # include <stdalign.h> 103 # define __ss_aligntype unsigned long int 104 # define _SS_SIZE 256 105 # define _SS_PADSIZE \ 106 (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ 107 ? sizeof (sa_family_t) \ 108 : alignof (__ss_aligntype)) \ 109 + sizeof (__ss_aligntype))) 111 # if !GNULIB_defined_struct_sockaddr_storage 118 # define GNULIB_defined_struct_sockaddr_storage 1 125 #if ! defined __GLIBC__ 129 #if @HAVE_SYS_SOCKET_H@ 134 # if !defined SHUT_RD 137 # if !defined SHUT_WR 140 # if !defined SHUT_RDWR 146 # define CMSG_SPACE(length) _CMSG_SPACE(length) 149 # define CMSG_LEN(length) _CMSG_LEN(length) 156 # error "Cygwin does have a sys/socket.h, doesn't it?!?" 176 # if @HAVE_WINSOCK2_H@ 177 # include <winsock2.h> 179 # if @HAVE_WS2TCPIP_H@ 180 # include <ws2tcpip.h> 184 # if !defined SHUT_RD && defined SD_RECEIVE 185 # define SHUT_RD SD_RECEIVE 187 # if !defined SHUT_WR && defined SD_SEND 188 # define SHUT_WR SD_SEND 190 # if !defined SHUT_RDWR && defined SD_BOTH 191 # define SHUT_RDWR SD_BOTH 194 # if @HAVE_WINSOCK2_H@ 199 # if !GNULIB_defined_socklen_t 200 typedef int socklen_t;
201 # define GNULIB_defined_socklen_t 1 220 #if @HAVE_WINSOCK2_H@ 222 # if !GNULIB_defined_rpl_fd_isset 227 rpl_fd_isset (SOCKET fd, fd_set *
set)
233 for (i = 0; i <
set->fd_count; i++)
234 if (set->fd_array[i] == fd)
240 # define GNULIB_defined_rpl_fd_isset 1 244 # define FD_ISSET(fd, set) rpl_fd_isset(fd, set) 250 #if @HAVE_WINSOCK2_H@ 251 # if !defined _@GUARD_PREFIX@_UNISTD_H 252 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 254 # define close close_used_without_including_unistd_h 257 "close() used without including <unistd.h>");
259 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 261 # define gethostname gethostname_used_without_including_unistd_h 264 "gethostname() used without including <unistd.h>");
267 # if !defined _@GUARD_PREFIX@_SYS_SELECT_H 268 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 270 # define select select_used_without_including_sys_select_h 273 "select() used without including <sys/select.h>");
281 # if @HAVE_WINSOCK2_H@ 282 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 284 # define socket rpl_socket 292 #elif @HAVE_WINSOCK2_H@ 294 # define socket socket_used_without_requesting_gnulib_module_socket 295 #elif defined GNULIB_POSIXCHECK 297 # if HAVE_RAW_DECL_SOCKET 299 "use gnulib module socket for portability");
304 # if @HAVE_WINSOCK2_H@ 305 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 307 # define connect rpl_connect 310 (
int fd,
const struct sockaddr *addr, socklen_t addrlen)
313 (
int fd,
const struct sockaddr *addr, socklen_t addrlen));
319 const struct sockaddr *addr, socklen_t addrlen));
322 #elif @HAVE_WINSOCK2_H@ 324 # define connect socket_used_without_requesting_gnulib_module_connect 325 #elif defined GNULIB_POSIXCHECK 327 # if HAVE_RAW_DECL_CONNECT 329 "use gnulib module connect for portability");
334 # if @HAVE_WINSOCK2_H@ 335 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 337 # define accept rpl_accept 340 (
int fd,
struct sockaddr *addr, socklen_t *addrlen));
342 (
int fd,
struct sockaddr *addr, socklen_t *addrlen));
347 (
int fd,
struct sockaddr *addr, socklen_t *addrlen));
350 #elif @HAVE_WINSOCK2_H@ 352 # define accept accept_used_without_requesting_gnulib_module_accept 353 #elif defined GNULIB_POSIXCHECK 355 # if HAVE_RAW_DECL_ACCEPT 357 "use gnulib module accept for portability");
362 # if @HAVE_WINSOCK2_H@ 363 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 365 # define bind rpl_bind 368 (
int fd,
const struct sockaddr *addr, socklen_t addrlen)
371 (
int fd,
const struct sockaddr *addr, socklen_t addrlen));
377 const struct sockaddr *addr, socklen_t addrlen));
380 #elif @HAVE_WINSOCK2_H@ 382 # define bind bind_used_without_requesting_gnulib_module_bind 383 #elif defined GNULIB_POSIXCHECK 385 # if HAVE_RAW_DECL_BIND 387 "use gnulib module bind for portability");
391 #if @GNULIB_GETPEERNAME@ 392 # if @HAVE_WINSOCK2_H@ 393 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 395 # define getpeername rpl_getpeername 398 (
int fd,
struct sockaddr *addr, socklen_t *addrlen)
401 (
int fd,
struct sockaddr *addr, socklen_t *addrlen));
406 (
int fd,
struct sockaddr *addr, socklen_t *addrlen));
409 #elif @HAVE_WINSOCK2_H@ 411 # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername 412 #elif defined GNULIB_POSIXCHECK 414 # if HAVE_RAW_DECL_GETPEERNAME 415 _GL_WARN_ON_USE (getpeername,
"getpeername is not always POSIX compliant - " 416 "use gnulib module getpeername for portability");
420 #if @GNULIB_GETSOCKNAME@ 421 # if @HAVE_WINSOCK2_H@ 422 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 424 # define getsockname rpl_getsockname 427 (
int fd,
struct sockaddr *addr, socklen_t *addrlen)
430 (
int fd,
struct sockaddr *addr, socklen_t *addrlen));
435 (
int fd,
struct sockaddr *addr, socklen_t *addrlen));
438 #elif @HAVE_WINSOCK2_H@ 440 # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname 441 #elif defined GNULIB_POSIXCHECK 443 # if HAVE_RAW_DECL_GETSOCKNAME 444 _GL_WARN_ON_USE (getsockname,
"getsockname is not always POSIX compliant - " 445 "use gnulib module getsockname for portability");
449 #if @GNULIB_GETSOCKOPT@ 450 # if @HAVE_WINSOCK2_H@ 451 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 453 # define getsockopt rpl_getsockopt 456 void *optval, socklen_t *optlen)
459 void *optval, socklen_t *optlen));
464 void *optval, socklen_t *optlen));
467 #elif @HAVE_WINSOCK2_H@ 469 # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt 470 #elif defined GNULIB_POSIXCHECK 472 # if HAVE_RAW_DECL_GETSOCKOPT 473 _GL_WARN_ON_USE (getsockopt,
"getsockopt is not always POSIX compliant - " 474 "use gnulib module getsockopt for portability");
479 # if @HAVE_WINSOCK2_H@ 480 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 482 # define listen rpl_listen 490 #elif @HAVE_WINSOCK2_H@ 492 # define listen listen_used_without_requesting_gnulib_module_listen 493 #elif defined GNULIB_POSIXCHECK 495 # if HAVE_RAW_DECL_LISTEN 497 "use gnulib module listen for portability");
502 # if @HAVE_WINSOCK2_H@ 503 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 505 # define recv rpl_recv 509 _GL_CXXALIAS_RPL (recv, ssize_t, (
int fd,
void *buf,
size_t len,
int flags));
511 _GL_CXXALIAS_SYS (recv, ssize_t, (
int fd,
void *buf,
size_t len,
int flags));
514 #elif @HAVE_WINSOCK2_H@ 516 # define recv recv_used_without_requesting_gnulib_module_recv 517 #elif defined GNULIB_POSIXCHECK 519 # if HAVE_RAW_DECL_RECV 521 "use gnulib module recv for portability");
526 # if @HAVE_WINSOCK2_H@ 527 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 529 # define send rpl_send 532 (
int fd,
const void *buf,
size_t len,
int flags)
535 (
int fd,
const void *buf,
size_t len,
int flags));
538 (
int fd,
const void *buf,
size_t len,
int flags));
541 #elif @HAVE_WINSOCK2_H@ 543 # define send send_used_without_requesting_gnulib_module_send 544 #elif defined GNULIB_POSIXCHECK 546 # if HAVE_RAW_DECL_SEND 548 "use gnulib module send for portability");
552 #if @GNULIB_RECVFROM@ 553 # if @HAVE_WINSOCK2_H@ 554 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 556 # define recvfrom rpl_recvfrom 559 (
int fd,
void *buf,
size_t len,
int flags,
560 struct sockaddr *from, socklen_t *fromlen)
563 (
int fd,
void *buf,
size_t len,
int flags,
564 struct sockaddr *from, socklen_t *fromlen));
569 (
int fd,
void *buf,
size_t len,
int flags,
570 struct sockaddr *from, socklen_t *fromlen));
573 #elif @HAVE_WINSOCK2_H@ 575 # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom 576 #elif defined GNULIB_POSIXCHECK 578 # if HAVE_RAW_DECL_RECVFROM 580 "use gnulib module recvfrom for portability");
585 # if @HAVE_WINSOCK2_H@ 586 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 588 # define sendto rpl_sendto 591 (
int fd,
const void *buf,
size_t len,
int flags,
592 const struct sockaddr *to, socklen_t tolen)
595 (
int fd,
const void *buf,
size_t len,
int flags,
596 const struct sockaddr *to, socklen_t tolen));
601 (
int fd,
const void *buf,
size_t len,
int flags,
602 const struct sockaddr *to, socklen_t tolen));
605 #elif @HAVE_WINSOCK2_H@ 607 # define sendto sendto_used_without_requesting_gnulib_module_sendto 608 #elif defined GNULIB_POSIXCHECK 610 # if HAVE_RAW_DECL_SENDTO 612 "use gnulib module sendto for portability");
616 #if @GNULIB_SETSOCKOPT@ 617 # if @HAVE_WINSOCK2_H@ 618 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 620 # define setsockopt rpl_setsockopt 623 const void * optval, socklen_t optlen)
626 const void * optval, socklen_t optlen));
631 (
int fd,
int level,
int optname,
632 const void * optval, socklen_t optlen));
635 #elif @HAVE_WINSOCK2_H@ 637 # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt 638 #elif defined GNULIB_POSIXCHECK 640 # if HAVE_RAW_DECL_SETSOCKOPT 641 _GL_WARN_ON_USE (setsockopt,
"setsockopt is not always POSIX compliant - " 642 "use gnulib module setsockopt for portability");
646 #if @GNULIB_SHUTDOWN@ 647 # if @HAVE_WINSOCK2_H@ 648 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 650 # define shutdown rpl_shutdown 658 #elif @HAVE_WINSOCK2_H@ 660 # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown 661 #elif defined GNULIB_POSIXCHECK 663 # if HAVE_RAW_DECL_SHUTDOWN 665 "use gnulib module shutdown for portability");
676 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 677 # define accept4 rpl_accept4 680 (
int sockfd,
struct sockaddr *addr, socklen_t *addrlen,
683 (
int sockfd,
struct sockaddr *addr, socklen_t *addrlen,
687 (
int sockfd,
struct sockaddr *addr, socklen_t *addrlen,
690 (
int sockfd,
struct sockaddr *addr, socklen_t *addrlen,
694 #elif defined GNULIB_POSIXCHECK 696 # if HAVE_RAW_DECL_ACCEPT4 698 "use gnulib module accept4 for portability");
#define _GL_SYS_SOCKET_INLINE
Definition: sys_socket.in.h:71
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
Definition: inet.h:278
unsigned short sa_family_t
Definition: sys_socket.in.h:84
Definition: sys_socket.in.h:208
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: inet.h:168
#define _SS_PADSIZE
Definition: sys_socket.in.h:105
struct iovec * msg_iov
Definition: sys_socket.in.h:211
__ss_aligntype __ss_align
Definition: sys_socket.in.h:115
sa_family_t ss_family
Definition: sys_socket.in.h:114
socklen_t msg_namelen
Definition: sys_socket.in.h:210
void * msg_name
Definition: sys_socket.in.h:209
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: inet.h:180
int msg_iovlen
Definition: sys_socket.in.h:212
Definition: sys_socket.in.h:112
#define NULL
Definition: stddef.in.h:72
#define _GL_CXXALIASWARN(func)
Definition: inet.h:337
Definition: sys_uio.in.h:49
#define __ss_aligntype
Definition: sys_socket.in.h:103
int msg_flags
Definition: sys_socket.in.h:213
#define _GL_INLINE_HEADER_BEGIN
Definition: config.h:1817
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: inet.h:253
char __ss_padding[_SS_PADSIZE]
Definition: sys_socket.in.h:116
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: inet.h:156
#define _GL_INLINE_HEADER_END
Definition: config.h:1818
#define _GL_WARN_ON_USE(function, message)
Definition: inet.h:474