From ad176f5bd4906dad626b37159f0ba30a68b708f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Helmesj=C3=B6?= Date: Thu, 1 Sep 2022 09:57:14 +0200 Subject: [PATCH] Add HAVE_STRUCT_ADDRINFO, HAVE_STRUCT_IN6_ADDR, HAVE_STRUCT_SOCKADDR_IN6, HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN, HAVE_STRUCT_SOCKADDR_IN_SIN_LEN, HAVE_STRUCT_SOCKADDR_UN, HAVE_STRUCT_SOCKADDR_STORAGE, HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY, HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY, HAVE_STRUCT_LINGER (GH PR #34) --- .../autoconf/checks/HAVE_STRUCT_ADDRINFO.h | 20 +++++++++++++++++++ .../autoconf/checks/HAVE_STRUCT_IN6_ADDR.h | 17 ++++++++++++++++ .../autoconf/checks/HAVE_STRUCT_LINGER.h | 17 ++++++++++++++++ .../checks/HAVE_STRUCT_SOCKADDR_IN6.h | 16 +++++++++++++++ .../HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN.h | 16 +++++++++++++++ .../checks/HAVE_STRUCT_SOCKADDR_IN_SIN_LEN.h | 17 ++++++++++++++++ .../checks/HAVE_STRUCT_SOCKADDR_STORAGE.h | 17 ++++++++++++++++ .../HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.h | 19 ++++++++++++++++++ ...HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY.h | 15 ++++++++++++++ .../autoconf/checks/HAVE_STRUCT_SOCKADDR_UN.h | 17 ++++++++++++++++ 10 files changed, 171 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_ADDRINFO.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_IN6_ADDR.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_LINGER.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN_SIN_LEN.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_UN.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_ADDRINFO.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_ADDRINFO.h new file mode 100644 index 0000000..46c1e67 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_ADDRINFO.h @@ -0,0 +1,20 @@ +// HAVE_STRUCT_ADDRINFO : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_ADDRINFO + +/* Since Linux/glibc 2.4, OpenBSD 2.9, FreeBSD 3.5, NetBSD 1.5, and Mac OS + * (hard to tell but based on the manpages available online it looks like + * Tiger at the latest). + * NOTE: Assuming same as HAVE_GETADDRINFO + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 4) || \ + BUILD2_AUTOCONF_OPENBSD_PREREQ(200106) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 5) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(1, 5) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_STRUCT_ADDRINFO 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_IN6_ADDR.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_IN6_ADDR.h new file mode 100644 index 0000000..3d99d58 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_IN6_ADDR.h @@ -0,0 +1,17 @@ +// HAVE_STRUCT_IN6_ADDR : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_IN6_ADDR + +/* Since Linux/glibc 2.1, OpenBSD 2.9, FreeBSD 3.5, NetBSD 1.5, and Mac OS X + */ +#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) +# define HAVE_STRUCT_IN6_ADDR 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_LINGER.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_LINGER.h new file mode 100644 index 0000000..43ba267 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_LINGER.h @@ -0,0 +1,17 @@ +// HAVE_STRUCT_LINGER : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_LINGER + +/* Since Linux/glibc 2.1, OpenBSD 2.9, FreeBSD 3.5, NetBSD 1.5, Mac OS X + */ +#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) +# define HAVE_STRUCT_LINGER 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6.h new file mode 100644 index 0000000..3917711 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6.h @@ -0,0 +1,16 @@ +// HAVE_STRUCT_SOCKADDR_IN6 : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_SOCKADDR_IN6 + +/* Since OpenBSD ~4.2, FreeBSD ~7.0, NetBSD 2.1, Mac OS X 10.6 + */ +#if BUILD2_AUTOCONF_OPENBSD_PREREQ(200705) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(7, 0) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(2, 1) || \ + BUILD2_AUTOCONF_MACOS_PREREQ(10, 6) +# define HAVE_STRUCT_SOCKADDR_IN6 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN.h new file mode 100644 index 0000000..e319ff9 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN.h @@ -0,0 +1,16 @@ +// HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN + +/* Since OpenBSD ~4.2, FreeBSD ~7.0, NetBSD 2.1, Mac OS X 10.6 + */ +#if BUILD2_AUTOCONF_OPENBSD_PREREQ(200705) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(7, 0) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(2, 1) || \ + BUILD2_AUTOCONF_MACOS_PREREQ(10, 6) +# define HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN_SIN_LEN.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN_SIN_LEN.h new file mode 100644 index 0000000..de4af39 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_IN_SIN_LEN.h @@ -0,0 +1,17 @@ +// HAVE_STRUCT_SOCKADDR_IN_SIN_LEN : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN + +/* Since 4.3BSD (OpenBSD, FreeBSD, NetBSD, Mac OS X) + * 'The length member, sin_len, was added with 4.3BSD-Reno [..]' + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE.h new file mode 100644 index 0000000..e32b01e --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE.h @@ -0,0 +1,17 @@ +// HAVE_STRUCT_SOCKADDR_STORAGE : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_SOCKADDR_STORAGE + +/* Linux/glibc 2.1.1, Since 4.2BSD (~1983) + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 2) || \ + defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.h new file mode 100644 index 0000000..5dcabef --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.h @@ -0,0 +1,19 @@ +// HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#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 + * NOTE: RFC2553 (<1999) - defines __ss_len & __ss_family + * XNET draft (>1999) - defines ss_len & ss_family + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 3) || \ + BUILD2_AUTOCONF_OPENBSD_PREREQ(200015) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(4, 0) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(1, 5) || \ + BUILD2_AUTOCONF_MACOS_PREREQ(10, 0) +# define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY.h new file mode 100644 index 0000000..ea1f49e --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY.h @@ -0,0 +1,15 @@ +// HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY + +/* Since Linux/glibc <=2.2, OpenBSD <2.7, FreeBSD <4.0, NetBSD <1.5 + * NOTE: RFC2553 (<1999) - defines __ss_len & __ss_family + * XNET draft (>1999) - defines ss_len & ss_family + */ +#if !BUILD2_AUTOCONF_GLIBC_PREREQ(2, 3) +# define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1 +#endif \ No newline at end of file diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_UN.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_UN.h new file mode 100644 index 0000000..104e3f4 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_STRUCT_SOCKADDR_UN.h @@ -0,0 +1,17 @@ +// HAVE_STRUCT_SOCKADDR_UN : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_STRUCT_SOCKADDR_UN + +/* Linux/glibc 1.09, Since 4.4BSD (~1995) + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(1, 09) || \ + defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_STRUCT_SOCKADDR_UN 1 +#endif \ No newline at end of file