1 /* Provide a sys/socket header file for systems lacking it (read: MinGW)
2 and for systems where it is incomplete.
3 Copyright (C) 2005-2012 Free Software Foundation, Inc.
4 Written by Simon Josefsson.
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)
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.
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/>. */
19 /* This file is supposed to be used on platforms that lack <sys/socket.h>,
20 on platforms where <sys/socket.h> cannot be included standalone, and on
21 platforms where <sys/socket.h> does not provide all necessary definitions.
22 It is intended to provide definitions and prototypes needed by an
26 @PRAGMA_SYSTEM_HEADER@
30 #if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H
31 /* Special invocation convention:
32 - On Cygwin 1.5.x we have a sequence of nested includes
33 <sys/socket.h> -> <cygwin/socket.h> -> <asm/socket.h> -> <cygwin/if.h>,
34 and the latter includes <sys/socket.h>. In this situation, the functions
35 are not yet declared, therefore we cannot provide the C++ aliases. */
37 #@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
40 /* Normal invocation convention. */
42 #ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
44 #if @HAVE_SYS_SOCKET_H@
46 # define _GL_ALREADY_INCLUDING_SYS_SOCKET_H
48 /* On many platforms, <sys/socket.h> assumes prior inclusion of
50 # include <sys/types.h>
52 /* On FreeBSD 6.4, <sys/socket.h> defines some macros that assume that NULL
56 /* The include_next requires a split double-inclusion guard. */
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 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
68 /* The definition of _GL_ARG_NONNULL is copied here. */
70 /* The definition of _GL_WARN_ON_USE is copied here. */
72 #if !@HAVE_SA_FAMILY_T@
73 # if !GNULIB_defined_sa_family_t
74 typedef unsigned short sa_family_t
;
75 # define GNULIB_defined_sa_family_t 1
79 #if @HAVE_STRUCT_SOCKADDR_STORAGE@
80 /* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */
81 # if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
83 # define ss_family __ss_family
87 # include <stdalign.h>
88 /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
89 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
90 # define __ss_aligntype unsigned long int
92 # define _SS_PADSIZE \
93 (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \
94 ? sizeof (sa_family_t) \
95 : alignof (__ss_aligntype)) \
96 + sizeof (__ss_aligntype)))
98 # if !GNULIB_defined_struct_sockaddr_storage
99 struct sockaddr_storage
101 sa_family_t ss_family
; /* Address family, etc. */
102 __ss_aligntype __ss_align
; /* Force desired alignment. */
103 char __ss_padding
[_SS_PADSIZE
];
105 # define GNULIB_defined_struct_sockaddr_storage 1
110 /* Get struct iovec. */
111 /* But avoid namespace pollution on glibc systems. */
112 #if ! defined __GLIBC__
113 # include <sys/uio.h>
116 #if @HAVE_SYS_SOCKET_H@
118 /* A platform that has <sys/socket.h>. */
120 /* For shutdown(). */
121 # if !defined SHUT_RD
124 # if !defined SHUT_WR
127 # if !defined SHUT_RDWR
134 # error "Cygwin does have a sys/socket.h, doesn't it?!?"
137 /* A platform that lacks <sys/socket.h>.
139 Currently only MinGW is supported. See the gnulib manual regarding
140 Windows sockets. MinGW has the header files winsock2.h and
141 ws2tcpip.h that declare the sys/socket.h definitions we need. Note
142 that you can influence which definitions you get by setting the
143 WINVER symbol before including these two files. For example,
144 getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that
145 symbol is set indirectly through WINVER). You can set this by
146 adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your
147 code may not run on older Windows releases then. My Windows 2000
148 box was not able to run the code, for example. The situation is
149 slightly confusing because
150 <http://msdn.microsoft.com/en-us/library/ms738520>
151 suggests that getaddrinfo should be available on all Windows
154 # if @HAVE_WINSOCK2_H@
155 # include <winsock2.h>
157 # if @HAVE_WS2TCPIP_H@
158 # include <ws2tcpip.h>
161 /* For shutdown(). */
162 # if !defined SHUT_RD && defined SD_RECEIVE
163 # define SHUT_RD SD_RECEIVE
165 # if !defined SHUT_WR && defined SD_SEND
166 # define SHUT_WR SD_SEND
168 # if !defined SHUT_RDWR && defined SD_BOTH
169 # define SHUT_RDWR SD_BOTH
172 # if @HAVE_WINSOCK2_H@
173 /* Include headers needed by the emulation code. */
174 # include <sys/types.h>
177 # if !GNULIB_defined_socklen_t
178 typedef int socklen_t
;
179 # define GNULIB_defined_socklen_t 1
184 /* Rudimentary 'struct msghdr'; this works as long as you don't try to
185 access msg_control or msg_controllen. */
188 socklen_t msg_namelen
;
189 struct iovec
*msg_iov
;
196 /* Fix some definitions from <winsock2.h>. */
198 #if @HAVE_WINSOCK2_H@
200 # if !GNULIB_defined_rpl_fd_isset
202 /* Re-define FD_ISSET to avoid a WSA call while we are not using
205 rpl_fd_isset (SOCKET fd
, fd_set
* set
)
211 for (i
= 0; i
< set
->fd_count
; i
++)
212 if (set
->fd_array
[i
] == fd
)
218 # define GNULIB_defined_rpl_fd_isset 1
222 # define FD_ISSET(fd, set) rpl_fd_isset(fd, set)
226 /* Hide some function declarations from <winsock2.h>. */
228 #if @HAVE_WINSOCK2_H@
229 # if !defined _@GUARD_PREFIX@_UNISTD_H
230 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
232 # define close close_used_without_including_unistd_h
234 _GL_WARN_ON_USE (close
,
235 "close() used without including <unistd.h>");
237 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
239 # define gethostname gethostname_used_without_including_unistd_h
241 _GL_WARN_ON_USE (gethostname
,
242 "gethostname() used without including <unistd.h>");
245 # if !defined _@GUARD_PREFIX@_SYS_SELECT_H
246 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
248 # define select select_used_without_including_sys_select_h
250 _GL_WARN_ON_USE (select
,
251 "select() used without including <sys/select.h>");
256 /* Wrap everything else to use libc file descriptors for sockets. */
259 # if @HAVE_WINSOCK2_H@
260 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
262 # define socket rpl_socket
264 _GL_FUNCDECL_RPL (socket
, int, (int domain
, int type
, int protocol
));
265 _GL_CXXALIAS_RPL (socket
, int, (int domain
, int type
, int protocol
));
267 _GL_CXXALIAS_SYS (socket
, int, (int domain
, int type
, int protocol
));
269 _GL_CXXALIASWARN (socket
);
270 #elif @HAVE_WINSOCK2_H@
272 # define socket socket_used_without_requesting_gnulib_module_socket
273 #elif defined GNULIB_POSIXCHECK
275 # if HAVE_RAW_DECL_SOCKET
276 _GL_WARN_ON_USE (socket
, "socket is not always POSIX compliant - "
277 "use gnulib module socket for portability");
282 # if @HAVE_WINSOCK2_H@
283 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
285 # define connect rpl_connect
287 _GL_FUNCDECL_RPL (connect
, int,
288 (int fd
, const struct sockaddr
*addr
, socklen_t addrlen
)
289 _GL_ARG_NONNULL ((2)));
290 _GL_CXXALIAS_RPL (connect
, int,
291 (int fd
, const struct sockaddr
*addr
, socklen_t addrlen
));
293 /* Need to cast, because on NonStop Kernel, the third parameter is
295 _GL_CXXALIAS_SYS_CAST (connect
, int,
297 const struct sockaddr
*addr
, socklen_t addrlen
));
299 _GL_CXXALIASWARN (connect
);
300 #elif @HAVE_WINSOCK2_H@
302 # define connect socket_used_without_requesting_gnulib_module_connect
303 #elif defined GNULIB_POSIXCHECK
305 # if HAVE_RAW_DECL_CONNECT
306 _GL_WARN_ON_USE (connect
, "connect is not always POSIX compliant - "
307 "use gnulib module connect for portability");
312 # if @HAVE_WINSOCK2_H@
313 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
315 # define accept rpl_accept
317 _GL_FUNCDECL_RPL (accept
, int,
318 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
));
319 _GL_CXXALIAS_RPL (accept
, int,
320 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
));
322 /* Need to cast, because on Solaris 10 systems, the third parameter is
324 _GL_CXXALIAS_SYS_CAST (accept
, int,
325 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
));
327 _GL_CXXALIASWARN (accept
);
328 #elif @HAVE_WINSOCK2_H@
330 # define accept accept_used_without_requesting_gnulib_module_accept
331 #elif defined GNULIB_POSIXCHECK
333 # if HAVE_RAW_DECL_ACCEPT
334 _GL_WARN_ON_USE (accept
, "accept is not always POSIX compliant - "
335 "use gnulib module accept for portability");
340 # if @HAVE_WINSOCK2_H@
341 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
343 # define bind rpl_bind
345 _GL_FUNCDECL_RPL (bind
, int,
346 (int fd
, const struct sockaddr
*addr
, socklen_t addrlen
)
347 _GL_ARG_NONNULL ((2)));
348 _GL_CXXALIAS_RPL (bind
, int,
349 (int fd
, const struct sockaddr
*addr
, socklen_t addrlen
));
351 /* Need to cast, because on NonStop Kernel, the third parameter is
353 _GL_CXXALIAS_SYS_CAST (bind
, int,
355 const struct sockaddr
*addr
, socklen_t addrlen
));
357 _GL_CXXALIASWARN (bind
);
358 #elif @HAVE_WINSOCK2_H@
360 # define bind bind_used_without_requesting_gnulib_module_bind
361 #elif defined GNULIB_POSIXCHECK
363 # if HAVE_RAW_DECL_BIND
364 _GL_WARN_ON_USE (bind
, "bind is not always POSIX compliant - "
365 "use gnulib module bind for portability");
369 #if @GNULIB_GETPEERNAME@
370 # if @HAVE_WINSOCK2_H@
371 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
373 # define getpeername rpl_getpeername
375 _GL_FUNCDECL_RPL (getpeername
, int,
376 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
)
377 _GL_ARG_NONNULL ((2, 3)));
378 _GL_CXXALIAS_RPL (getpeername
, int,
379 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
));
381 /* Need to cast, because on Solaris 10 systems, the third parameter is
383 _GL_CXXALIAS_SYS_CAST (getpeername
, int,
384 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
));
386 _GL_CXXALIASWARN (getpeername
);
387 #elif @HAVE_WINSOCK2_H@
389 # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
390 #elif defined GNULIB_POSIXCHECK
392 # if HAVE_RAW_DECL_GETPEERNAME
393 _GL_WARN_ON_USE (getpeername
, "getpeername is not always POSIX compliant - "
394 "use gnulib module getpeername for portability");
398 #if @GNULIB_GETSOCKNAME@
399 # if @HAVE_WINSOCK2_H@
400 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
402 # define getsockname rpl_getsockname
404 _GL_FUNCDECL_RPL (getsockname
, int,
405 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
)
406 _GL_ARG_NONNULL ((2, 3)));
407 _GL_CXXALIAS_RPL (getsockname
, int,
408 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
));
410 /* Need to cast, because on Solaris 10 systems, the third parameter is
412 _GL_CXXALIAS_SYS_CAST (getsockname
, int,
413 (int fd
, struct sockaddr
*addr
, socklen_t
*addrlen
));
415 _GL_CXXALIASWARN (getsockname
);
416 #elif @HAVE_WINSOCK2_H@
418 # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
419 #elif defined GNULIB_POSIXCHECK
421 # if HAVE_RAW_DECL_GETSOCKNAME
422 _GL_WARN_ON_USE (getsockname
, "getsockname is not always POSIX compliant - "
423 "use gnulib module getsockname for portability");
427 #if @GNULIB_GETSOCKOPT@
428 # if @HAVE_WINSOCK2_H@
429 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
431 # define getsockopt rpl_getsockopt
433 _GL_FUNCDECL_RPL (getsockopt
, int, (int fd
, int level
, int optname
,
434 void *optval
, socklen_t
*optlen
)
435 _GL_ARG_NONNULL ((4, 5)));
436 _GL_CXXALIAS_RPL (getsockopt
, int, (int fd
, int level
, int optname
,
437 void *optval
, socklen_t
*optlen
));
439 /* Need to cast, because on Solaris 10 systems, the fifth parameter is
441 _GL_CXXALIAS_SYS_CAST (getsockopt
, int, (int fd
, int level
, int optname
,
442 void *optval
, socklen_t
*optlen
));
444 _GL_CXXALIASWARN (getsockopt
);
445 #elif @HAVE_WINSOCK2_H@
447 # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
448 #elif defined GNULIB_POSIXCHECK
450 # if HAVE_RAW_DECL_GETSOCKOPT
451 _GL_WARN_ON_USE (getsockopt
, "getsockopt is not always POSIX compliant - "
452 "use gnulib module getsockopt for portability");
457 # if @HAVE_WINSOCK2_H@
458 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
460 # define listen rpl_listen
462 _GL_FUNCDECL_RPL (listen
, int, (int fd
, int backlog
));
463 _GL_CXXALIAS_RPL (listen
, int, (int fd
, int backlog
));
465 _GL_CXXALIAS_SYS (listen
, int, (int fd
, int backlog
));
467 _GL_CXXALIASWARN (listen
);
468 #elif @HAVE_WINSOCK2_H@
470 # define listen listen_used_without_requesting_gnulib_module_listen
471 #elif defined GNULIB_POSIXCHECK
473 # if HAVE_RAW_DECL_LISTEN
474 _GL_WARN_ON_USE (listen
, "listen is not always POSIX compliant - "
475 "use gnulib module listen for portability");
480 # if @HAVE_WINSOCK2_H@
481 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
483 # define recv rpl_recv
485 _GL_FUNCDECL_RPL (recv
, ssize_t
, (int fd
, void *buf
, size_t len
, int flags
)
486 _GL_ARG_NONNULL ((2)));
487 _GL_CXXALIAS_RPL (recv
, ssize_t
, (int fd
, void *buf
, size_t len
, int flags
));
489 _GL_CXXALIAS_SYS (recv
, ssize_t
, (int fd
, void *buf
, size_t len
, int flags
));
491 _GL_CXXALIASWARN (recv
);
492 #elif @HAVE_WINSOCK2_H@
494 # define recv recv_used_without_requesting_gnulib_module_recv
495 #elif defined GNULIB_POSIXCHECK
497 # if HAVE_RAW_DECL_RECV
498 _GL_WARN_ON_USE (recv
, "recv is not always POSIX compliant - "
499 "use gnulib module recv for portability");
504 # if @HAVE_WINSOCK2_H@
505 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
507 # define send rpl_send
509 _GL_FUNCDECL_RPL (send
, ssize_t
,
510 (int fd
, const void *buf
, size_t len
, int flags
)
511 _GL_ARG_NONNULL ((2)));
512 _GL_CXXALIAS_RPL (send
, ssize_t
,
513 (int fd
, const void *buf
, size_t len
, int flags
));
515 _GL_CXXALIAS_SYS (send
, ssize_t
,
516 (int fd
, const void *buf
, size_t len
, int flags
));
518 _GL_CXXALIASWARN (send
);
519 #elif @HAVE_WINSOCK2_H@
521 # define send send_used_without_requesting_gnulib_module_send
522 #elif defined GNULIB_POSIXCHECK
524 # if HAVE_RAW_DECL_SEND
525 _GL_WARN_ON_USE (send
, "send is not always POSIX compliant - "
526 "use gnulib module send for portability");
530 #if @GNULIB_RECVFROM@
531 # if @HAVE_WINSOCK2_H@
532 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
534 # define recvfrom rpl_recvfrom
536 _GL_FUNCDECL_RPL (recvfrom
, ssize_t
,
537 (int fd
, void *buf
, size_t len
, int flags
,
538 struct sockaddr
*from
, socklen_t
*fromlen
)
539 _GL_ARG_NONNULL ((2)));
540 _GL_CXXALIAS_RPL (recvfrom
, ssize_t
,
541 (int fd
, void *buf
, size_t len
, int flags
,
542 struct sockaddr
*from
, socklen_t
*fromlen
));
544 /* Need to cast, because on Solaris 10 systems, the sixth parameter is
546 _GL_CXXALIAS_SYS_CAST (recvfrom
, ssize_t
,
547 (int fd
, void *buf
, size_t len
, int flags
,
548 struct sockaddr
*from
, socklen_t
*fromlen
));
550 _GL_CXXALIASWARN (recvfrom
);
551 #elif @HAVE_WINSOCK2_H@
553 # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom
554 #elif defined GNULIB_POSIXCHECK
556 # if HAVE_RAW_DECL_RECVFROM
557 _GL_WARN_ON_USE (recvfrom
, "recvfrom is not always POSIX compliant - "
558 "use gnulib module recvfrom for portability");
563 # if @HAVE_WINSOCK2_H@
564 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
566 # define sendto rpl_sendto
568 _GL_FUNCDECL_RPL (sendto
, ssize_t
,
569 (int fd
, const void *buf
, size_t len
, int flags
,
570 const struct sockaddr
*to
, socklen_t tolen
)
571 _GL_ARG_NONNULL ((2)));
572 _GL_CXXALIAS_RPL (sendto
, ssize_t
,
573 (int fd
, const void *buf
, size_t len
, int flags
,
574 const struct sockaddr
*to
, socklen_t tolen
));
576 /* Need to cast, because on NonStop Kernel, the sixth parameter is
578 _GL_CXXALIAS_SYS_CAST (sendto
, ssize_t
,
579 (int fd
, const void *buf
, size_t len
, int flags
,
580 const struct sockaddr
*to
, socklen_t tolen
));
582 _GL_CXXALIASWARN (sendto
);
583 #elif @HAVE_WINSOCK2_H@
585 # define sendto sendto_used_without_requesting_gnulib_module_sendto
586 #elif defined GNULIB_POSIXCHECK
588 # if HAVE_RAW_DECL_SENDTO
589 _GL_WARN_ON_USE (sendto
, "sendto is not always POSIX compliant - "
590 "use gnulib module sendto for portability");
594 #if @GNULIB_SETSOCKOPT@
595 # if @HAVE_WINSOCK2_H@
596 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
598 # define setsockopt rpl_setsockopt
600 _GL_FUNCDECL_RPL (setsockopt
, int, (int fd
, int level
, int optname
,
601 const void * optval
, socklen_t optlen
)
602 _GL_ARG_NONNULL ((4)));
603 _GL_CXXALIAS_RPL (setsockopt
, int, (int fd
, int level
, int optname
,
604 const void * optval
, socklen_t optlen
));
606 /* Need to cast, because on NonStop Kernel, the fifth parameter is
608 _GL_CXXALIAS_SYS_CAST (setsockopt
, int,
609 (int fd
, int level
, int optname
,
610 const void * optval
, socklen_t optlen
));
612 _GL_CXXALIASWARN (setsockopt
);
613 #elif @HAVE_WINSOCK2_H@
615 # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt
616 #elif defined GNULIB_POSIXCHECK
618 # if HAVE_RAW_DECL_SETSOCKOPT
619 _GL_WARN_ON_USE (setsockopt
, "setsockopt is not always POSIX compliant - "
620 "use gnulib module setsockopt for portability");
624 #if @GNULIB_SHUTDOWN@
625 # if @HAVE_WINSOCK2_H@
626 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
628 # define shutdown rpl_shutdown
630 _GL_FUNCDECL_RPL (shutdown
, int, (int fd
, int how
));
631 _GL_CXXALIAS_RPL (shutdown
, int, (int fd
, int how
));
633 _GL_CXXALIAS_SYS (shutdown
, int, (int fd
, int how
));
635 _GL_CXXALIASWARN (shutdown
);
636 #elif @HAVE_WINSOCK2_H@
638 # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
639 #elif defined GNULIB_POSIXCHECK
641 # if HAVE_RAW_DECL_SHUTDOWN
642 _GL_WARN_ON_USE (shutdown
, "shutdown is not always POSIX compliant - "
643 "use gnulib module shutdown for portability");
648 /* Accept a connection on a socket, with specific opening flags.
649 The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
650 and O_TEXT, O_BINARY (defined in "binary-io.h").
651 See also the Linux man page at
652 <http://www.kernel.org/doc/man-pages/online/pages/man2/accept4.2.html>. */
654 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
655 # define accept4 rpl_accept4
657 _GL_FUNCDECL_RPL (accept4
, int,
658 (int sockfd
, struct sockaddr
*addr
, socklen_t
*addrlen
,
660 _GL_CXXALIAS_RPL (accept4
, int,
661 (int sockfd
, struct sockaddr
*addr
, socklen_t
*addrlen
,
664 _GL_FUNCDECL_SYS (accept4
, int,
665 (int sockfd
, struct sockaddr
*addr
, socklen_t
*addrlen
,
667 _GL_CXXALIAS_SYS (accept4
, int,
668 (int sockfd
, struct sockaddr
*addr
, socklen_t
*addrlen
,
671 _GL_CXXALIASWARN (accept4
);
672 #elif defined GNULIB_POSIXCHECK
674 # if HAVE_RAW_DECL_ACCEPT4
675 _GL_WARN_ON_USE (accept4
, "accept4 is unportable - "
676 "use gnulib module accept4 for portability");
680 #endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
681 #endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */