musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012年05月05日 22:22:46 -0400
committerRich Felker <dalias@aerifal.cx>2012年05月05日 22:22:46 -0400
commit98c9af500125df41fdb46d7e384b00982d72493a (patch)
treecb600f99ddc0748c9a579d298f4d6de49f9fb190 /src
parentb4ccc3c1361ca611d6590dd4af288fb9fa6a843b (diff)
downloadmusl-98c9af500125df41fdb46d7e384b00982d72493a.tar.gz
fix definitions of FP_ILOGB constants
two issues: (1) the type was wrong (unsigned instead of signed int), and (2) the value of FP_ILOGBNAN should be INT_MIN rather than INT_MAX to match the ABI. this is also much more useful since INT_MAX corresponds to a valid input (infinity). the standard would allow us to set FP_ILOGB0 to -INT_MAX instead of INT_MIN, which would give us distinct values for ilogb(0) and ilogb(NAN), but the benefit seems way too small to justify ignoring the ABI. note that the macro is just a "portable" (to any twos complement system where signed and unsigned int have the same width) way to write INT_MIN without needing limits.h. it's valid to use this method since these macros are not required to work in #if directives.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月02日 19:27:42 +0000

AltStyle によって変換されたページ (->オリジナル) /