mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
endian.h: Update comments now that POSIX Issue 8 is POSIX.1-2024
Now that Issue 8 has been published, replace the informal Issue 8 language with the more typical POSIX.1-xxxx citation. Sponsored by: Netflix
This commit is contained in:
parent
1f31d43742
commit
6553c31c96
2 changed files with 7 additions and 4 deletions
|
|
@ -12,11 +12,12 @@
|
|||
#define _ENDIAN_H_
|
||||
|
||||
/*
|
||||
* POSIX Issue 8 requires that endian.h define uint{16,32,64}_t. Although POSIX
|
||||
* POSIX.1-2024 requires that endian.h define uint{16,32,64}_t. Although POSIX
|
||||
* allows stdint.h symbols here, be conservative and only define there required
|
||||
* ones. FreeBSD's sys/_endian.h doesn't need to expose those types since it
|
||||
* implements all the [bl]eXtoh hto[bl]eX interfaces as macros calling builtin
|
||||
* functions. POSIX allows functions, macros or both. We opt for macros only.
|
||||
* functions. POSIX.1-2024 allows functions, macros or both. We opt for macros
|
||||
* only.
|
||||
*/
|
||||
#include <sys/_types.h>
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ typedef __uint64_t uint64_t;
|
|||
|
||||
/*
|
||||
* FreeBSD's sys/_endian.h is very close to the interface provided on Linux by
|
||||
* glibc's endian.h as well as POSIX Issue 8's endian.h.
|
||||
* glibc's endian.h as well as POSIX.1-2024's endian.h.
|
||||
*/
|
||||
#include <sys/_endian.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,9 @@ typedef __uint64_t uint64_t;
|
|||
/*
|
||||
* Note: While tempting to try to avoid namespace pollution from this file,
|
||||
* several software packages assume these marcos are defined, even when it
|
||||
* defines _POSIX_C_SOURCE to request an unpolluted namespace.
|
||||
* defines _POSIX_C_SOURCE to request an unpolluted namespace. <sys/endian.h>
|
||||
* is not defined by any version of POSIX.1, so we don't have to be
|
||||
* careful. No POSIX.1 defined header file includes <sys/endian.h> on FreeBSD.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue