]> Savannah Git Hosting - gnulib.git/commit
htonl: Fix link errors on Windows.
authorCollin Funk <collin.funk1@gmail.com>
Sun, 11 Aug 2024 20:53:48 +0000 (13:53 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Sun, 11 Aug 2024 20:53:48 +0000 (13:53 -0700)
commitc6ced39e85125619e3b91fb51c63e9c3ffe0d34b
treec761b6bb7c4d4cfa45eaa40b1a434326ceaea4fd
parent841eaf11bfc4ffe3ad0e3eb49dacdc50458e953c
htonl: Fix link errors on Windows.

Reported by Bruno Haible in:
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00066.html>.

* lib/arpa_inet.in.h (htons, htonl, ntohs, ntohl): Only define when not
declared by the system.
* m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Set default behavior for
htonl functions.
* m4/htonl.m4 (gl_FUNC_HTONL): Check if -lws2_32 is required. Only check
for declarations on POSIX systems.
* modules/arpa_inet (Makefile.am): Substitute new Makefile variables.
* modules/htonl (Files): Add m4/sys_socket_h.m4.
(Depends-on): Remove endian condition.
(Link): Add $(HOTNL_LIB).
* modules/htonl-tests: Link to @HTONL_LIB@.
ChangeLog
lib/arpa_inet.in.h
m4/arpa_inet_h.m4
m4/htonl.m4
modules/arpa_inet
modules/htonl
modules/htonl-tests