* modules/sys_socket-tests (Depends-on): Add intprops.
* tests/test-sys_socket.c: Check that socklen_t is at least 32 bits
wide. Check that sa_family_t is unsigned.
+2024-07-23 Collin Funk <collin.funk1@gmail.com>
+
+ sys_socket tests: Improve checks for socklen_t and sa_family_t.
+ * modules/sys_socket-tests (Depends-on): Add intprops.
+ * tests/test-sys_socket.c: Check that socklen_t is at least 32 bits
+ wide. Check that sa_family_t is unsigned.
+
2024-07-23 Bruno Haible <bruno@clisp.org>
getopt-posix, getopt-gnu tests: Avoid test failure on mingw.
Depends-on:
assert-h
+intprops
sys_socket-c++-tests
configure.ac:
#include <errno.h>
+#include "intprops.h"
+
+/* POSIX requires that 'socklen_t' is an integer type with a width of at
+ least 32 bits. */
+static_assert (32 <= TYPE_WIDTH (socklen_t));
+
+/* POSIX requires that sa_family_t is an unsigned integer type. */
+static_assert (! TYPE_SIGNED (sa_family_t));
+
+
int
main (void)
{