HomeFreeBSD

MFC r266842: netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in

Description

MFC r266842: netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in
strict POSIX mode.

Put the htonl(), htons(), ntohl() and ntohs() declarations under
__POSIX_VISIBLE >= 200112. POSIX.1-2001 and newer require these to be
exposed from <netinet/in.h> (as well as <arpa/inet.h>).

Note that it may be unnecessary to check __POSIX_VISIBLE >= 200112 because
older versions of POSIX and the C standard do not define this header.
However, other places in the same file already perform the check.

PR: 188316
Submitted by: Christian Neukirchen

Details

Provenance
jillesAuthored on
Parents
rS273840: MFC r264628: fcntl.h: Make visible various POSIX.1-2008 features.
Branches
Unknown
Tags
Unknown

Event Timeline