STDBIT.H(3HEAD) | Headers | STDBIT.H(3HEAD) |
stdbit.h
— bit and
byte utilities
#include
<stdbit.h>
The <stdbit.h>
header provides support for C23 bit and byte utilities.
The <stdbit.h>
header provides the ability to determine the endian mode of the system
through a series of preprocessor macros at compilation time. For more
information and examples of how the endian ordering impacts data layout, see
endian(7).
__STDC_ENDIAN_LITTLE__
__STDC_ENDIAN_BIG__
__STDC_ENDIAN_NATIVE__
__STDC_ENDIAN_LITTLE__
or
__STDC_ENDIAN_BIG__
. While uncommon and not
supported by illumos, if the system is neither little- or big-endian, then
__STDC_ENDIAN_NATIVE__
will be defined to a
different, platform-defined value.This functionality is analogous to that found in endian.h(3HEAD), but unlike endian.h(3HEAD), this header is standardized and a part of C23.
The <stdbit.h>
header makes available a number of different families of functions which
operate on both fixed size integers and have generic forms. The generic
forms require support for at least C23 to be requested, while the
non-generic forms are always made available. These families are:
This same functionality is made available to device drivers
through <sys/stdbit.h>
.
stdc_bit_ceil(3C), stdc_bit_floor(3C), stdc_bit_width(3C), stdc_count_ones(3C), stdc_count_zeros(3C), stdc_first_leading_one(3C), stdc_first_leading_zero(3C), stdc_first_trailing_one(3C), stdc_first_trailing_zero(3C), stdc_has_single_bit(3C), stdc_leading_ones(3C), stdc_leading_zeros(3C), stdc_trailing_ones(3C), stdc_trailing_zeros(3C), endian.h(3HEAD), endian(7)
October 17, 2024 | OmniOS |