summaryrefslogtreecommitdiffstats
path: root/gl/sys_socket.in.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-28 12:13:40 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-28 12:13:40 +0100
commitb0afb8fe0ff1d87165af9df61501197a06240dda (patch)
tree274ac6a96c53ef4c19ab4974ce24a06a233128c5 /gl/sys_socket.in.h
parent68fc05381ee5fa0aee1413118fbb3d81ca888b09 (diff)
downloadmonitoring-plugins-b0afb8fe0ff1d87165af9df61501197a06240dda.tar.gz
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
Diffstat (limited to 'gl/sys_socket.in.h')
-rw-r--r--gl/sys_socket.in.h127
1 files changed, 79 insertions, 48 deletions
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 13833c0f..8632c66d 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -1,6 +1,6 @@
1/* Provide a sys/socket header file for systems lacking it (read: MinGW) 1/* Provide a sys/socket header file for systems lacking it (read: MinGW)
2 and for systems where it is incomplete. 2 and for systems where it is incomplete.
3 Copyright (C) 2005-2024 Free Software Foundation, Inc. 3 Copyright (C) 2005-2025 Free Software Foundation, Inc.
4 Written by Simon Josefsson. 4 Written by Simon Josefsson.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@
27#endif 27#endif
28@PRAGMA_COLUMNS@ 28@PRAGMA_COLUMNS@
29 29
30#if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H 30#if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_SYS_SOCKET_H
31/* Special invocation convention: 31/* Special invocation convention:
32 - On Cygwin 1.5.x we have a sequence of nested includes 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>, 33 <sys/socket.h> -> <cygwin/socket.h> -> <asm/socket.h> -> <cygwin/if.h>,
@@ -43,7 +43,7 @@
43 43
44#if @HAVE_SYS_SOCKET_H@ 44#if @HAVE_SYS_SOCKET_H@
45 45
46# define _GL_ALREADY_INCLUDING_SYS_SOCKET_H 46# define _@GUARD_PREFIX@_ALREADY_INCLUDING_SYS_SOCKET_H
47 47
48/* On many platforms, <sys/socket.h> assumes prior inclusion of 48/* On many platforms, <sys/socket.h> assumes prior inclusion of
49 <sys/types.h>. */ 49 <sys/types.h>. */
@@ -56,7 +56,7 @@
56/* The include_next requires a split double-inclusion guard. */ 56/* The include_next requires a split double-inclusion guard. */
57# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ 57# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
58 58
59# undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H 59# undef _@GUARD_PREFIX@_ALREADY_INCLUDING_SYS_SOCKET_H
60 60
61#endif 61#endif
62 62
@@ -202,6 +202,7 @@ struct sockaddr_storage
202 202
203/* Rudimentary 'struct msghdr'; this works as long as you don't try to 203/* Rudimentary 'struct msghdr'; this works as long as you don't try to
204 access msg_control or msg_controllen. */ 204 access msg_control or msg_controllen. */
205# if !defined GNULIB_defined_struct_msghdr
205struct msghdr { 206struct msghdr {
206 void *msg_name; 207 void *msg_name;
207 socklen_t msg_namelen; 208 socklen_t msg_namelen;
@@ -209,6 +210,8 @@ struct msghdr {
209 int msg_iovlen; 210 int msg_iovlen;
210 int msg_flags; 211 int msg_flags;
211}; 212};
213# define GNULIB_defined_struct_msghdr 1
214# endif
212 215
213#endif 216#endif
214 217
@@ -289,15 +292,17 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
289# undef socket 292# undef socket
290# define socket rpl_socket 293# define socket rpl_socket
291# endif 294# endif
292_GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol)); 295_GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol), );
293_GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol)); 296_GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol));
294# else 297# else
295_GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol)); 298_GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol));
296# endif 299# endif
297_GL_CXXALIASWARN (socket); 300_GL_CXXALIASWARN (socket);
298#elif @HAVE_WINSOCK2_H@ 301#elif @HAVE_WINSOCK2_H@
299# undef socket 302# if !GNULIB_SOCKET
300# define socket socket_used_without_requesting_gnulib_module_socket 303# undef socket
304# define socket socket_used_without_requesting_gnulib_module_socket
305# endif
301#elif defined GNULIB_POSIXCHECK 306#elif defined GNULIB_POSIXCHECK
302# undef socket 307# undef socket
303# if HAVE_RAW_DECL_SOCKET 308# if HAVE_RAW_DECL_SOCKET
@@ -313,7 +318,7 @@ _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - "
313# define connect rpl_connect 318# define connect rpl_connect
314# endif 319# endif
315_GL_FUNCDECL_RPL (connect, int, 320_GL_FUNCDECL_RPL (connect, int,
316 (int fd, const struct sockaddr *addr, socklen_t addrlen) 321 (int fd, const struct sockaddr *addr, socklen_t addrlen),
317 _GL_ARG_NONNULL ((2))); 322 _GL_ARG_NONNULL ((2)));
318_GL_CXXALIAS_RPL (connect, int, 323_GL_CXXALIAS_RPL (connect, int,
319 (int fd, const struct sockaddr *addr, socklen_t addrlen)); 324 (int fd, const struct sockaddr *addr, socklen_t addrlen));
@@ -326,8 +331,10 @@ _GL_CXXALIAS_SYS_CAST (connect, int,
326# endif 331# endif
327_GL_CXXALIASWARN (connect); 332_GL_CXXALIASWARN (connect);
328#elif @HAVE_WINSOCK2_H@ 333#elif @HAVE_WINSOCK2_H@
329# undef connect 334# if !GNULIB_CONNECT
330# define connect socket_used_without_requesting_gnulib_module_connect 335# undef connect
336# define connect connect_used_without_requesting_gnulib_module_connect
337# endif
331#elif defined GNULIB_POSIXCHECK 338#elif defined GNULIB_POSIXCHECK
332# undef connect 339# undef connect
333# if HAVE_RAW_DECL_CONNECT 340# if HAVE_RAW_DECL_CONNECT
@@ -345,7 +352,7 @@ _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - "
345_GL_FUNCDECL_RPL (accept, int, 352_GL_FUNCDECL_RPL (accept, int,
346 (int fd, 353 (int fd,
347 struct sockaddr *restrict addr, 354 struct sockaddr *restrict addr,
348 socklen_t *restrict addrlen)); 355 socklen_t *restrict addrlen), );
349_GL_CXXALIAS_RPL (accept, int, 356_GL_CXXALIAS_RPL (accept, int,
350 (int fd, 357 (int fd,
351 struct sockaddr *restrict addr, 358 struct sockaddr *restrict addr,
@@ -362,8 +369,10 @@ _GL_CXXALIAS_SYS_CAST (accept, int,
362_GL_CXXALIASWARN (accept); 369_GL_CXXALIASWARN (accept);
363# endif 370# endif
364#elif @HAVE_WINSOCK2_H@ 371#elif @HAVE_WINSOCK2_H@
365# undef accept 372# if !GNULIB_ACCEPT
366# define accept accept_used_without_requesting_gnulib_module_accept 373# undef accept
374# define accept accept_used_without_requesting_gnulib_module_accept
375# endif
367#elif defined GNULIB_POSIXCHECK 376#elif defined GNULIB_POSIXCHECK
368# undef accept 377# undef accept
369# if HAVE_RAW_DECL_ACCEPT 378# if HAVE_RAW_DECL_ACCEPT
@@ -379,7 +388,7 @@ _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - "
379# define bind rpl_bind 388# define bind rpl_bind
380# endif 389# endif
381_GL_FUNCDECL_RPL (bind, int, 390_GL_FUNCDECL_RPL (bind, int,
382 (int fd, const struct sockaddr *addr, socklen_t addrlen) 391 (int fd, const struct sockaddr *addr, socklen_t addrlen),
383 _GL_ARG_NONNULL ((2))); 392 _GL_ARG_NONNULL ((2)));
384_GL_CXXALIAS_RPL (bind, int, 393_GL_CXXALIAS_RPL (bind, int,
385 (int fd, const struct sockaddr *addr, socklen_t addrlen)); 394 (int fd, const struct sockaddr *addr, socklen_t addrlen));
@@ -392,8 +401,10 @@ _GL_CXXALIAS_SYS_CAST (bind, int,
392# endif 401# endif
393_GL_CXXALIASWARN (bind); 402_GL_CXXALIASWARN (bind);
394#elif @HAVE_WINSOCK2_H@ 403#elif @HAVE_WINSOCK2_H@
395# undef bind 404# if !GNULIB_BIND
396# define bind bind_used_without_requesting_gnulib_module_bind 405# undef bind
406# define bind bind_used_without_requesting_gnulib_module_bind
407# endif
397#elif defined GNULIB_POSIXCHECK 408#elif defined GNULIB_POSIXCHECK
398# undef bind 409# undef bind
399# if HAVE_RAW_DECL_BIND 410# if HAVE_RAW_DECL_BIND
@@ -410,7 +421,7 @@ _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - "
410# endif 421# endif
411_GL_FUNCDECL_RPL (getpeername, int, 422_GL_FUNCDECL_RPL (getpeername, int,
412 (int fd, struct sockaddr *restrict addr, 423 (int fd, struct sockaddr *restrict addr,
413 socklen_t *restrict addrlen) 424 socklen_t *restrict addrlen),
414 _GL_ARG_NONNULL ((2, 3))); 425 _GL_ARG_NONNULL ((2, 3)));
415_GL_CXXALIAS_RPL (getpeername, int, 426_GL_CXXALIAS_RPL (getpeername, int,
416 (int fd, struct sockaddr *restrict addr, 427 (int fd, struct sockaddr *restrict addr,
@@ -426,8 +437,10 @@ _GL_CXXALIAS_SYS_CAST (getpeername, int,
426_GL_CXXALIASWARN (getpeername); 437_GL_CXXALIASWARN (getpeername);
427# endif 438# endif
428#elif @HAVE_WINSOCK2_H@ 439#elif @HAVE_WINSOCK2_H@
429# undef getpeername 440# if !GNULIB_GETPEERNAME
430# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername 441# undef getpeername
442# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
443# endif
431#elif defined GNULIB_POSIXCHECK 444#elif defined GNULIB_POSIXCHECK
432# undef getpeername 445# undef getpeername
433# if HAVE_RAW_DECL_GETPEERNAME 446# if HAVE_RAW_DECL_GETPEERNAME
@@ -444,7 +457,7 @@ _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - "
444# endif 457# endif
445_GL_FUNCDECL_RPL (getsockname, int, 458_GL_FUNCDECL_RPL (getsockname, int,
446 (int fd, struct sockaddr *restrict addr, 459 (int fd, struct sockaddr *restrict addr,
447 socklen_t *restrict addrlen) 460 socklen_t *restrict addrlen),
448 _GL_ARG_NONNULL ((2, 3))); 461 _GL_ARG_NONNULL ((2, 3)));
449_GL_CXXALIAS_RPL (getsockname, int, 462_GL_CXXALIAS_RPL (getsockname, int,
450 (int fd, struct sockaddr *restrict addr, 463 (int fd, struct sockaddr *restrict addr,
@@ -460,8 +473,10 @@ _GL_CXXALIAS_SYS_CAST (getsockname, int,
460_GL_CXXALIASWARN (getsockname); 473_GL_CXXALIASWARN (getsockname);
461# endif 474# endif
462#elif @HAVE_WINSOCK2_H@ 475#elif @HAVE_WINSOCK2_H@
463# undef getsockname 476# if !GNULIB_GETSOCKNAME
464# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname 477# undef getsockname
478# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
479# endif
465#elif defined GNULIB_POSIXCHECK 480#elif defined GNULIB_POSIXCHECK
466# undef getsockname 481# undef getsockname
467# if HAVE_RAW_DECL_GETSOCKNAME 482# if HAVE_RAW_DECL_GETSOCKNAME
@@ -478,7 +493,7 @@ _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - "
478# endif 493# endif
479_GL_FUNCDECL_RPL (getsockopt, int, 494_GL_FUNCDECL_RPL (getsockopt, int,
480 (int fd, int level, int optname, 495 (int fd, int level, int optname,
481 void *restrict optval, socklen_t *restrict optlen) 496 void *restrict optval, socklen_t *restrict optlen),
482 _GL_ARG_NONNULL ((4, 5))); 497 _GL_ARG_NONNULL ((4, 5)));
483_GL_CXXALIAS_RPL (getsockopt, int, 498_GL_CXXALIAS_RPL (getsockopt, int,
484 (int fd, int level, int optname, 499 (int fd, int level, int optname,
@@ -492,8 +507,10 @@ _GL_CXXALIAS_SYS_CAST (getsockopt, int,
492# endif 507# endif
493_GL_CXXALIASWARN (getsockopt); 508_GL_CXXALIASWARN (getsockopt);
494#elif @HAVE_WINSOCK2_H@ 509#elif @HAVE_WINSOCK2_H@
495# undef getsockopt 510# if !GNULIB_GETSOCKOPT
496# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt 511# undef getsockopt
512# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
513# endif
497#elif defined GNULIB_POSIXCHECK 514#elif defined GNULIB_POSIXCHECK
498# undef getsockopt 515# undef getsockopt
499# if HAVE_RAW_DECL_GETSOCKOPT 516# if HAVE_RAW_DECL_GETSOCKOPT
@@ -508,15 +525,17 @@ _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - "
508# undef listen 525# undef listen
509# define listen rpl_listen 526# define listen rpl_listen
510# endif 527# endif
511_GL_FUNCDECL_RPL (listen, int, (int fd, int backlog)); 528_GL_FUNCDECL_RPL (listen, int, (int fd, int backlog), );
512_GL_CXXALIAS_RPL (listen, int, (int fd, int backlog)); 529_GL_CXXALIAS_RPL (listen, int, (int fd, int backlog));
513# else 530# else
514_GL_CXXALIAS_SYS (listen, int, (int fd, int backlog)); 531_GL_CXXALIAS_SYS (listen, int, (int fd, int backlog));
515# endif 532# endif
516_GL_CXXALIASWARN (listen); 533_GL_CXXALIASWARN (listen);
517#elif @HAVE_WINSOCK2_H@ 534#elif @HAVE_WINSOCK2_H@
518# undef listen 535# if !GNULIB_LISTEN
519# define listen listen_used_without_requesting_gnulib_module_listen 536# undef listen
537# define listen listen_used_without_requesting_gnulib_module_listen
538# endif
520#elif defined GNULIB_POSIXCHECK 539#elif defined GNULIB_POSIXCHECK
521# undef listen 540# undef listen
522# if HAVE_RAW_DECL_LISTEN 541# if HAVE_RAW_DECL_LISTEN
@@ -531,7 +550,7 @@ _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - "
531# undef recv 550# undef recv
532# define recv rpl_recv 551# define recv rpl_recv
533# endif 552# endif
534_GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags) 553_GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags),
535 _GL_ARG_NONNULL ((2))); 554 _GL_ARG_NONNULL ((2)));
536_GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); 555_GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
537# else 556# else
@@ -542,8 +561,10 @@ _GL_CXXALIAS_SYS_CAST (recv, ssize_t, (int fd, void *buf, size_t len, int flags)
542# endif 561# endif
543_GL_CXXALIASWARN (recv); 562_GL_CXXALIASWARN (recv);
544#elif @HAVE_WINSOCK2_H@ 563#elif @HAVE_WINSOCK2_H@
545# undef recv 564# if !GNULIB_RECV
546# define recv recv_used_without_requesting_gnulib_module_recv 565# undef recv
566# define recv recv_used_without_requesting_gnulib_module_recv
567# endif
547#elif defined GNULIB_POSIXCHECK 568#elif defined GNULIB_POSIXCHECK
548# undef recv 569# undef recv
549# if HAVE_RAW_DECL_RECV 570# if HAVE_RAW_DECL_RECV
@@ -559,7 +580,7 @@ _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - "
559# define send rpl_send 580# define send rpl_send
560# endif 581# endif
561_GL_FUNCDECL_RPL (send, ssize_t, 582_GL_FUNCDECL_RPL (send, ssize_t,
562 (int fd, const void *buf, size_t len, int flags) 583 (int fd, const void *buf, size_t len, int flags),
563 _GL_ARG_NONNULL ((2))); 584 _GL_ARG_NONNULL ((2)));
564_GL_CXXALIAS_RPL (send, ssize_t, 585_GL_CXXALIAS_RPL (send, ssize_t,
565 (int fd, const void *buf, size_t len, int flags)); 586 (int fd, const void *buf, size_t len, int flags));
@@ -572,8 +593,10 @@ _GL_CXXALIAS_SYS_CAST (send, ssize_t,
572# endif 593# endif
573_GL_CXXALIASWARN (send); 594_GL_CXXALIASWARN (send);
574#elif @HAVE_WINSOCK2_H@ 595#elif @HAVE_WINSOCK2_H@
575# undef send 596# if !GNULIB_SEND
576# define send send_used_without_requesting_gnulib_module_send 597# undef send
598# define send send_used_without_requesting_gnulib_module_send
599# endif
577#elif defined GNULIB_POSIXCHECK 600#elif defined GNULIB_POSIXCHECK
578# undef send 601# undef send
579# if HAVE_RAW_DECL_SEND 602# if HAVE_RAW_DECL_SEND
@@ -591,7 +614,7 @@ _GL_WARN_ON_USE (send, "send is not always POSIX compliant - "
591_GL_FUNCDECL_RPL (recvfrom, ssize_t, 614_GL_FUNCDECL_RPL (recvfrom, ssize_t,
592 (int fd, void *restrict buf, size_t len, int flags, 615 (int fd, void *restrict buf, size_t len, int flags,
593 struct sockaddr *restrict from, 616 struct sockaddr *restrict from,
594 socklen_t *restrict fromlen) 617 socklen_t *restrict fromlen),
595 _GL_ARG_NONNULL ((2))); 618 _GL_ARG_NONNULL ((2)));
596_GL_CXXALIAS_RPL (recvfrom, ssize_t, 619_GL_CXXALIAS_RPL (recvfrom, ssize_t,
597 (int fd, void *restrict buf, size_t len, int flags, 620 (int fd, void *restrict buf, size_t len, int flags,
@@ -609,8 +632,10 @@ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t,
609_GL_CXXALIASWARN (recvfrom); 632_GL_CXXALIASWARN (recvfrom);
610# endif 633# endif
611#elif @HAVE_WINSOCK2_H@ 634#elif @HAVE_WINSOCK2_H@
612# undef recvfrom 635# if !GNULIB_RECVFROM
613# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom 636# undef recvfrom
637# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom
638# endif
614#elif defined GNULIB_POSIXCHECK 639#elif defined GNULIB_POSIXCHECK
615# undef recvfrom 640# undef recvfrom
616# if HAVE_RAW_DECL_RECVFROM 641# if HAVE_RAW_DECL_RECVFROM
@@ -627,7 +652,7 @@ _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - "
627# endif 652# endif
628_GL_FUNCDECL_RPL (sendto, ssize_t, 653_GL_FUNCDECL_RPL (sendto, ssize_t,
629 (int fd, const void *buf, size_t len, int flags, 654 (int fd, const void *buf, size_t len, int flags,
630 const struct sockaddr *to, socklen_t tolen) 655 const struct sockaddr *to, socklen_t tolen),
631 _GL_ARG_NONNULL ((2))); 656 _GL_ARG_NONNULL ((2)));
632_GL_CXXALIAS_RPL (sendto, ssize_t, 657_GL_CXXALIAS_RPL (sendto, ssize_t,
633 (int fd, const void *buf, size_t len, int flags, 658 (int fd, const void *buf, size_t len, int flags,
@@ -641,8 +666,10 @@ _GL_CXXALIAS_SYS_CAST (sendto, ssize_t,
641# endif 666# endif
642_GL_CXXALIASWARN (sendto); 667_GL_CXXALIASWARN (sendto);
643#elif @HAVE_WINSOCK2_H@ 668#elif @HAVE_WINSOCK2_H@
644# undef sendto 669# if !GNULIB_SENDTO
645# define sendto sendto_used_without_requesting_gnulib_module_sendto 670# undef sendto
671# define sendto sendto_used_without_requesting_gnulib_module_sendto
672# endif
646#elif defined GNULIB_POSIXCHECK 673#elif defined GNULIB_POSIXCHECK
647# undef sendto 674# undef sendto
648# if HAVE_RAW_DECL_SENDTO 675# if HAVE_RAW_DECL_SENDTO
@@ -658,7 +685,7 @@ _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - "
658# define setsockopt rpl_setsockopt 685# define setsockopt rpl_setsockopt
659# endif 686# endif
660_GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname, 687_GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname,
661 const void * optval, socklen_t optlen) 688 const void * optval, socklen_t optlen),
662 _GL_ARG_NONNULL ((4))); 689 _GL_ARG_NONNULL ((4)));
663_GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname, 690_GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname,
664 const void * optval, socklen_t optlen)); 691 const void * optval, socklen_t optlen));
@@ -671,8 +698,10 @@ _GL_CXXALIAS_SYS_CAST (setsockopt, int,
671# endif 698# endif
672_GL_CXXALIASWARN (setsockopt); 699_GL_CXXALIASWARN (setsockopt);
673#elif @HAVE_WINSOCK2_H@ 700#elif @HAVE_WINSOCK2_H@
674# undef setsockopt 701# if !GNULIB_SETSOCKOPT
675# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt 702# undef setsockopt
703# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt
704# endif
676#elif defined GNULIB_POSIXCHECK 705#elif defined GNULIB_POSIXCHECK
677# undef setsockopt 706# undef setsockopt
678# if HAVE_RAW_DECL_SETSOCKOPT 707# if HAVE_RAW_DECL_SETSOCKOPT
@@ -687,15 +716,17 @@ _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - "
687# undef shutdown 716# undef shutdown
688# define shutdown rpl_shutdown 717# define shutdown rpl_shutdown
689# endif 718# endif
690_GL_FUNCDECL_RPL (shutdown, int, (int fd, int how)); 719_GL_FUNCDECL_RPL (shutdown, int, (int fd, int how), );
691_GL_CXXALIAS_RPL (shutdown, int, (int fd, int how)); 720_GL_CXXALIAS_RPL (shutdown, int, (int fd, int how));
692# else 721# else
693_GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); 722_GL_CXXALIAS_SYS (shutdown, int, (int fd, int how));
694# endif 723# endif
695_GL_CXXALIASWARN (shutdown); 724_GL_CXXALIASWARN (shutdown);
696#elif @HAVE_WINSOCK2_H@ 725#elif @HAVE_WINSOCK2_H@
697# undef shutdown 726# if !GNULIB_SHUTDOWN
698# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown 727# undef shutdown
728# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
729# endif
699#elif defined GNULIB_POSIXCHECK 730#elif defined GNULIB_POSIXCHECK
700# undef shutdown 731# undef shutdown
701# if HAVE_RAW_DECL_SHUTDOWN 732# if HAVE_RAW_DECL_SHUTDOWN
@@ -716,14 +747,14 @@ _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - "
716# endif 747# endif
717_GL_FUNCDECL_RPL (accept4, int, 748_GL_FUNCDECL_RPL (accept4, int,
718 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, 749 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
719 int flags)); 750 int flags), );
720_GL_CXXALIAS_RPL (accept4, int, 751_GL_CXXALIAS_RPL (accept4, int,
721 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, 752 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
722 int flags)); 753 int flags));
723# else 754# else
724_GL_FUNCDECL_SYS (accept4, int, 755_GL_FUNCDECL_SYS (accept4, int,
725 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, 756 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
726 int flags)); 757 int flags), );
727_GL_CXXALIAS_SYS (accept4, int, 758_GL_CXXALIAS_SYS (accept4, int,
728 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, 759 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
729 int flags)); 760 int flags));