diff options
Diffstat (limited to 'tests/sys_socket.in.h')
| -rw-r--r-- | tests/sys_socket.in.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/tests/sys_socket.in.h b/tests/sys_socket.in.h index 2be98665..c19b7461 100644 --- a/tests/sys_socket.in.h +++ b/tests/sys_socket.in.h @@ -1,6 +1,6 @@ /* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. - Copyright (C) 2005-2024 Free Software Foundation, Inc. + Copyright (C) 2005-2026 Free Software Foundation, Inc. Written by Simon Josefsson. This file is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ #endif @PRAGMA_COLUMNS@ -#if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H +#if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_SYS_SOCKET_H /* Special invocation convention: - On Cygwin 1.5.x we have a sequence of nested includes <sys/socket.h> -> <cygwin/socket.h> -> <asm/socket.h> -> <cygwin/if.h>, @@ -43,7 +43,7 @@ #if @HAVE_SYS_SOCKET_H@ -# define _GL_ALREADY_INCLUDING_SYS_SOCKET_H +# define _@GUARD_PREFIX@_ALREADY_INCLUDING_SYS_SOCKET_H /* On many platforms, <sys/socket.h> assumes prior inclusion of <sys/types.h>. */ @@ -56,7 +56,7 @@ /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ -# undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H +# undef _@GUARD_PREFIX@_ALREADY_INCLUDING_SYS_SOCKET_H #endif @@ -202,6 +202,7 @@ struct sockaddr_storage /* Rudimentary 'struct msghdr'; this works as long as you don't try to access msg_control or msg_controllen. */ +# if !defined GNULIB_defined_struct_msghdr struct msghdr { void *msg_name; socklen_t msg_namelen; @@ -209,6 +210,8 @@ struct msghdr { int msg_iovlen; int msg_flags; }; +# define GNULIB_defined_struct_msghdr 1 +# endif #endif @@ -232,11 +235,10 @@ struct msghdr { _GL_SYS_SOCKET_INLINE int rpl_fd_isset (SOCKET fd, fd_set * set) { - u_int i; if (set == NULL) return 0; - for (i = 0; i < set->fd_count; i++) + for (u_int i = 0; i < set->fd_count; i++) if (set->fd_array[i] == fd) return 1; @@ -301,7 +303,6 @@ _GL_CXXALIASWARN (socket); # define socket socket_used_without_requesting_gnulib_module_socket # endif #elif defined GNULIB_POSIXCHECK -# undef socket # if HAVE_RAW_DECL_SOCKET _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " "use gnulib module socket for portability"); @@ -333,7 +334,6 @@ _GL_CXXALIASWARN (connect); # define connect connect_used_without_requesting_gnulib_module_connect # endif #elif defined GNULIB_POSIXCHECK -# undef connect # if HAVE_RAW_DECL_CONNECT _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " "use gnulib module connect for portability"); @@ -371,7 +371,6 @@ _GL_CXXALIASWARN (accept); # define accept accept_used_without_requesting_gnulib_module_accept # endif #elif defined GNULIB_POSIXCHECK -# undef accept # if HAVE_RAW_DECL_ACCEPT _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " "use gnulib module accept for portability"); @@ -403,7 +402,6 @@ _GL_CXXALIASWARN (bind); # define bind bind_used_without_requesting_gnulib_module_bind # endif #elif defined GNULIB_POSIXCHECK -# undef bind # if HAVE_RAW_DECL_BIND _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " "use gnulib module bind for portability"); @@ -439,7 +437,6 @@ _GL_CXXALIASWARN (getpeername); # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername # endif #elif defined GNULIB_POSIXCHECK -# undef getpeername # if HAVE_RAW_DECL_GETPEERNAME _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " "use gnulib module getpeername for portability"); @@ -475,7 +472,6 @@ _GL_CXXALIASWARN (getsockname); # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname # endif #elif defined GNULIB_POSIXCHECK -# undef getsockname # if HAVE_RAW_DECL_GETSOCKNAME _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " "use gnulib module getsockname for portability"); @@ -509,7 +505,6 @@ _GL_CXXALIASWARN (getsockopt); # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt # endif #elif defined GNULIB_POSIXCHECK -# undef getsockopt # if HAVE_RAW_DECL_GETSOCKOPT _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " "use gnulib module getsockopt for portability"); @@ -534,7 +529,6 @@ _GL_CXXALIASWARN (listen); # define listen listen_used_without_requesting_gnulib_module_listen # endif #elif defined GNULIB_POSIXCHECK -# undef listen # if HAVE_RAW_DECL_LISTEN _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " "use gnulib module listen for portability"); @@ -563,7 +557,6 @@ _GL_CXXALIASWARN (recv); # define recv recv_used_without_requesting_gnulib_module_recv # endif #elif defined GNULIB_POSIXCHECK -# undef recv # if HAVE_RAW_DECL_RECV _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " "use gnulib module recv for portability"); @@ -595,7 +588,6 @@ _GL_CXXALIASWARN (send); # define send send_used_without_requesting_gnulib_module_send # endif #elif defined GNULIB_POSIXCHECK -# undef send # if HAVE_RAW_DECL_SEND _GL_WARN_ON_USE (send, "send is not always POSIX compliant - " "use gnulib module send for portability"); @@ -634,7 +626,6 @@ _GL_CXXALIASWARN (recvfrom); # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom # endif #elif defined GNULIB_POSIXCHECK -# undef recvfrom # if HAVE_RAW_DECL_RECVFROM _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " "use gnulib module recvfrom for portability"); @@ -668,7 +659,6 @@ _GL_CXXALIASWARN (sendto); # define sendto sendto_used_without_requesting_gnulib_module_sendto # endif #elif defined GNULIB_POSIXCHECK -# undef sendto # if HAVE_RAW_DECL_SENDTO _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " "use gnulib module sendto for portability"); @@ -700,7 +690,6 @@ _GL_CXXALIASWARN (setsockopt); # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt # endif #elif defined GNULIB_POSIXCHECK -# undef setsockopt # if HAVE_RAW_DECL_SETSOCKOPT _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " "use gnulib module setsockopt for portability"); @@ -725,7 +714,6 @@ _GL_CXXALIASWARN (shutdown); # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown # endif #elif defined GNULIB_POSIXCHECK -# undef shutdown # if HAVE_RAW_DECL_SHUTDOWN _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " "use gnulib module shutdown for portability"); @@ -758,7 +746,6 @@ _GL_CXXALIAS_SYS (accept4, int, # endif _GL_CXXALIASWARN (accept4); #elif defined GNULIB_POSIXCHECK -# undef accept4 # if HAVE_RAW_DECL_ACCEPT4 _GL_WARN_ON_USE (accept4, "accept4 is unportable - " "use gnulib module accept4 for portability"); |
