On 02/11/2026 20:45, Collin Funk wrote:
Not entirely related to this change, but regarding these lines in 'seq':
/* Roll our own isfinite/isnan rather than using <math.h>, so that we don't
have to worry about linking -lm just for isfinite. */
#ifndef isfinite
# define isfinite(x) ((x) * 0 == 0)
#endif
#ifndef isnan
# define isnan(x) ((x) != (x))
#endif
I wonder if it is better to use the built-ins, if available. I don't
think those require linking to libm.
Interesting. Added to my TODO list.
Maybe it is worth adding this test which also triggers the infinite
loop, but should be more portable?
$ eval $(src/getlimits);
$ timeout -v 10 seq -w $LDBL_MAX $LDBL_MAX >/dev/null
Good point, but the skip is rare enough that I'd slightly
prefer to avoid this as it would be redundant in the common case.
Pushed.
cheers,
Padraig