logo

utils-std

Collection of commonly available Unix tools
commit: fed38b90845e0ec5fb0b021280d4d9795ad0da3f
parent 56aae959a7499c5703be088b875b85a9306ab19c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 16 Mar 2024 20:54:58 +0100

cmd/seq: Add -lm, remainder → fmod

Diffstat:

MMakefile2+-
Mcmd/seq.c4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -86,4 +86,4 @@ cmd/chmod: cmd/chmod.c lib/mode.c lib/symbolize_mode.c Makefile cmd/seq: cmd/seq.c lib/absu.h Makefile rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno} - $(CC) -std=c99 $(CFLAGS) -o $@ cmd/seq.c $(LDFLAGS) $(LDSTATIC) + $(CC) -std=c99 $(CFLAGS) -o $@ cmd/seq.c -lm $(LDFLAGS) $(LDSTATIC) diff --git a/cmd/seq.c b/cmd/seq.c @@ -140,8 +140,8 @@ getopt_end: if(opt_w) { - double f_mod = remainder(first, step); - double l_mod = remainder(last, step); + double f_mod = fmod(first, step); + double l_mod = fmod(last, step); g_last = last - l_mod + f_mod;