]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r266842: netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 29 Oct 2014 23:10:48 +0000 (23:10 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 29 Oct 2014 23:10:48 +0000 (23:10 +0000)
commitd8a1af7d6cda5d559a49b7ca3fe96d90a87700ce
tree8cc89349a2300b1df09238c155ec4c6a5b5d2feb
parent2e68d97c4e01e49ae108dd4645a8a083a4abfd0d
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@273841 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netinet/in.h