HomeFreeBSD

_endian.h: Include sys/ctypes.h for visibility macros

Description

_endian.h: Include sys/ctypes.h for visibility macros

BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN will be required by the
forthcoming POSIX Issue 8. In addition, they are provided in the BSD
compilation environments. However, depending on the order includes
happend, sys/cdefs.h may or may not be included when endian.h is
included. Include it here so we can safely test __BSD_VISIBLE. Add
visibility when we're compiling in the future for issue 8, but since the
date number for issue 8 hasn't been fixed, use strictly greater than the
issue 7 date.of 200809.

This had the side effect of sometimes (in the traditional BSD
compliation environment)
#if BYTE_ORDER == LITTLE_ENDIAN
and
#if BYTE_ORDER == BIG_ENDIAN
both being true because none of these were defined. This fixes
that. It also fixes including it after <stdio.h> but not before.

PR: 269249
MFC After: 1d (build related)
Reviewed by: kib, emaste
Differential Revision: https://reviews.freebsd.org/D39176

Sponsored by: Netflix

Details

Provenance
impAuthored on Mar 22 2023, 2:25 AM
Reviewer
kib
Differential Revision
D39176: _endian.h: Include sys/ctypes.h for visibility macros
Parents
rG1ad3cafcd34e: Remove /usr/lib/dtrace/ipfw.d for WITHOUT_DTRACE.
Branches
Unknown
Tags
Unknown