mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-06 15:26:58 +02:00
Rasmus Villemoes <ravi@prevas.dk> says: I was bitten by our limit macros not being usable in #if conditionals when building a standalone app. It turns out that the work to fix that had already been started by the inclusion of the mbedtls library, so it's something that people do hit. Let's finish the job by providing suitable limit macros for all three families: - Standard C types, char, short, ... - Kernel-style fixed-width types s8, u64, ... - POSIX/C99 fixed-width types int16_t, uint32_t, ... Please note that a naive approach like spelling out the full decimal value for the constants doesn't really work, as there is no such thing as a "negative integer constant". That is, doing #define LLONG_MIN -9223372036854775808LL would lead to the compiler complaining warning: integer constant is so large that it is unsigned and the type of that LLONG_MIN would actually be "unsigned long long", so e.g. #if LLONG_MIN >= 0 #warning "LLONG_MIN is not negative?" #endif would fire. Link: https://lore.kernel.org/r/20250707203655.613340-1-ravi@prevas.dk |
||
---|---|---|
.. | ||
byteorder | ||
clk | ||
mfd/syscon | ||
mtd | ||
soc/ti | ||
unaligned | ||
usb | ||
apm_bios.h | ||
apple-mailbox.h | ||
arm-smccc.h | ||
asn1_ber_bytecode.h | ||
asn1_decoder.h | ||
asn1.h | ||
bch.h | ||
bitfield.h | ||
bitmap.h | ||
bitops.h | ||
bitrev.h | ||
bug.h | ||
build_bug.h | ||
clk-provider.h | ||
compat.h | ||
compiler_attributes.h | ||
compiler_types.h | ||
compiler-clang.h | ||
compiler-gcc.h | ||
compiler-intel.h | ||
compiler.h | ||
completion.h | ||
const.h | ||
crc7.h | ||
crc16.h | ||
crc32.h | ||
ctype.h | ||
delay.h | ||
dma-direction.h | ||
dma-mapping.h | ||
drm_dp_helper.h | ||
edd.h | ||
err.h | ||
errno.h | ||
ethtool.h | ||
fb.h | ||
if_ether.h | ||
if_vlan.h | ||
immap_qe.h | ||
input.h | ||
intel-smc.h | ||
io.h | ||
ioctl.h | ||
iopoll.h | ||
ioport.h | ||
kbuild.h | ||
kconfig.h | ||
kernel.h | ||
libfdt_env.h | ||
libfdt.h | ||
linkage.h | ||
linux_string.h | ||
list_sort.h | ||
list.h | ||
litex.h | ||
log2.h | ||
lzo.h | ||
math64.h | ||
mbus.h | ||
mdio.h | ||
mii.h | ||
netdevice.h | ||
oid_registry.h | ||
poison.h | ||
posix_types.h | ||
printk.h | ||
pruss_driver.h | ||
psci.h | ||
rational.h | ||
rbtree_augmented.h | ||
rbtree.h | ||
screen_info.h | ||
serial_reg.h | ||
sizes.h | ||
stat.h | ||
stddef.h | ||
string.h | ||
stringify.h | ||
time.h | ||
typecheck.h | ||
types.h | ||
utf.h | ||
xxhash.h | ||
zstd_errors.h | ||
zstd_lib.h | ||
zstd.h |