]> Savannah Git Hosting - gnulib.git/commit
strtof, strtod, strtold: Fix underflow behaviour of system function.
authorBruno Haible <bruno@clisp.org>
Tue, 23 Jul 2024 10:40:19 +0000 (12:40 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jul 2024 10:40:19 +0000 (12:40 +0200)
commitcb76ba0b05d382e93957b4724fe0a4c20f583d12
tree706cd35a3cd21abc609987ddab0d2185faaedb70
parentae0879dafc29a1be482c5db96ddf0e0a1791eb9a
strtof, strtod, strtold: Fix underflow behaviour of system function.

* m4/strtof.m4 (gl_FUNC_STRTOF): Test for strtof's behaviour upon
underflow. Conditionally define STRTOF_HAS_UNDERFLOW_BUG,
STRTOF_HAS_GRADUAL_UNDERFLOW_PROBLEM.
* m4/strtod.m4 (gl_FUNC_STRTOD): Test for strtod's behaviour upon
underflow. Conditionally define STRTOD_HAS_UNDERFLOW_BUG,
STRTOD_HAS_GRADUAL_UNDERFLOW_PROBLEM.
* m4/strtold.m4 (gl_FUNC_STRTOLD): Test for strtold's behaviour upon
gradual underflow. Conditionally define
STRTOLD_HAS_GRADUAL_UNDERFLOW_PROBLEM.
* lib/strtod.c (HAVE_UNDERLYING_STRTOD): Test STRTOF_HAS_UNDERFLOW_BUG,
STRTOD_HAS_UNDERFLOW_BUG.
(HAS_GRADUAL_UNDERFLOW_PROBLEM): New macro.
(SET_ERRNO_UPON_GRADUAL_UNDERFLOW): New macro.
(STRTOD): Use it.
ChangeLog
lib/strtod.c
m4/strtod.m4
m4/strtof.m4
m4/strtold.m4