Correct Windows support in number of tests

The following are all supported on Windows:

FCNTL_H
SYS_STAT_H
IN6_ADDR
STRUCT_SOCKADDR_IN6
STRUCT_SOCKADDR_STORAGE
STRUCT_SOCKADDR_STORAGE_SS_FAMILY
This commit is contained in:
Fred Helmesjö 2022-09-02 12:32:46 +02:00 committed by Boris Kolpackov
parent fb04684043
commit ed2375e397
6 changed files with 34 additions and 22 deletions

View File

@ -6,10 +6,15 @@
#undef HAVE_FCNTL_H
#if defined(__linux__) || \
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(BUILD2_AUTOCONF_MACOS)
/* Note that there is <fcntl.h> on Windows (both MSVC and MinGW) though its
* declarations are not the same as on POSIX. But it does exist.
*/
#if defined(__linux__) || \
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(BUILD2_AUTOCONF_MACOS) || \
defined(_WIN32)
# define HAVE_FCNTL_H 1
#endif

View File

@ -6,12 +6,13 @@
#undef HAVE_STRUCT_IN6_ADDR
/* Since Linux/glibc 2.1, OpenBSD 2.9, FreeBSD 3.5, NetBSD 1.5, and Mac OS X
/* Since Linux/glibc 2.1, OpenBSD 2.9, FreeBSD 3.5, NetBSD 1.5, and Mac OS X, Windows
*/
#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 5)|| \
BUILD2_AUTOCONF_OPENBSD_PREREQ(200106) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 5) || \
defined(BUILD2_AUTOCONF_MACOS)
#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 5) || \
BUILD2_AUTOCONF_OPENBSD_PREREQ(200106) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 5) || \
defined(BUILD2_AUTOCONF_MACOS) || \
defined(_WIN32)
# define HAVE_STRUCT_IN6_ADDR 1
#endif

View File

@ -6,11 +6,12 @@
#undef HAVE_STRUCT_SOCKADDR_IN6
/* Since OpenBSD ~4.2, FreeBSD ~7.0, NetBSD 2.1, Mac OS X 10.6
/* Since OpenBSD ~4.2, FreeBSD ~7.0, NetBSD 2.1, Mac OS X 10.6, Windows
*/
#if BUILD2_AUTOCONF_OPENBSD_PREREQ(200705) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(7, 0) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(2, 1) || \
BUILD2_AUTOCONF_MACOS_PREREQ(10, 6)
BUILD2_AUTOCONF_MACOS_PREREQ(10, 6) || \
defined(_WIN32)
# define HAVE_STRUCT_SOCKADDR_IN6 1
#endif

View File

@ -6,12 +6,13 @@
#undef HAVE_STRUCT_SOCKADDR_STORAGE
/* Linux/glibc 2.1.1, Since 4.2BSD (~1983)
/* Linux/glibc 2.1.1, Since 4.2BSD (~1983), Windows
*/
#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 2) || \
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(BUILD2_AUTOCONF_MACOS)
defined(BUILD2_AUTOCONF_MACOS) || \
defined(_WIN32)
# define HAVE_STRUCT_SOCKADDR_STORAGE 1
#endif

View File

@ -6,7 +6,9 @@
#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
/* Since Linux/glibc 2.3, OpenBSD >=2.7, FreeBSD >=4.0, NetBSD >=1.5, Mac OS X 10.0
/* Since Linux/glibc 2.3, OpenBSD >=2.7, FreeBSD >=4.0, NetBSD >=1.5, Mac OS X 10.0,
* Windows
*
* NOTE: RFC2553 (<1999) - defines __ss_len & __ss_family
* XNET draft (>1999) - defines ss_len & ss_family
*/
@ -14,6 +16,7 @@
BUILD2_AUTOCONF_OPENBSD_PREREQ(200015) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(4, 0) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 5) || \
BUILD2_AUTOCONF_MACOS_PREREQ(10, 0)
BUILD2_AUTOCONF_MACOS_PREREQ(10, 0) || \
defined(_WIN32)
# define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
#endif

View File

@ -7,10 +7,11 @@
#undef HAVE_SYS_STAT_H
/* Since 4.2BSD (~1983)
*/
#if defined(__linux__) || \
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(BUILD2_AUTOCONF_MACOS)
#if defined(__linux__) || \
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(BUILD2_AUTOCONF_MACOS) || \
defined(_WIN32)
# define HAVE_SYS_STAT_H 1
#endif