Re: sys_socket tests: Improve tests for macro definitions.

2024-07-23 Thread Collin Funk
Collin Funk writes: > I had assumed these macros were defined since sys_socket depends on > m4/sockpfaf.m4. However, the module doesn't invoke gl_SOCKET_FAMILIES. ... Sorry, I didn't see gl_SOCKET_FAMILIES only checked IPv4 & IPv6 sockets. UNIX sockets are in gl_SOCKET_FAMILY_UNIX. One line chan

Re: sys_socket tests: Improve tests for macro definitions.

2024-07-23 Thread Collin Funk
Collin Funk writes: > * All supported AF_* constants must have distinct values. Oops. Small mistake in my test for this. I wrote: switch (0) { case AF_UNSPEC: #if HAVE_IPV4 case AF_INET: #endif #if HAVE_IPV6 case AF_INET6: #endif #if HAVE_UNIXSOCKET case AF_UNIX: #endif

Re: sys_socket tests: Improve tests for macro definitions.

2024-07-23 Thread Bruno Haible
Collin Funk wrote: > Adding a few tests based on longstanding POSIX specification (i.e. not > added in 2024). > > * AF_UNSPEC should be 0. > * All supported AF_* constants must have distinct values. > * SHUT_RD, SHUT_RDWR, SHUT_WR must have distinct values. Thanks!

sys_socket tests: Improve tests for macro definitions.

2024-07-22 Thread Collin Funk
if a platform doesn't satisfy these rules. Collin >From 4f7969ccb3036e9bef5bfc2fbfef3263d5255376 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 22 Jul 2024 20:54:17 -0700 Subject: [PATCH] sys_socket tests: Improve tests for macro definitions. * modules/sys_socket-tests (Depends-on):