This is a simple patch for seq.c to rename itoa to toybox_itoa, to avoid
clashes with functions in the toolchain.
As Piraty mentioned on IIRC there are 2 different implementations of itoa in
musl alone, so this should avoid any clashes people have with implementations
in their toolchain.
-John
Sent with [ProtonMail](https://protonmail.com/) Secure Email.
From 6a5a82bd482990f0c6ad48153aaff7219ef3ec73 Mon Sep 17 00:00:00 2001
From: John <[email protected]>
Date: Thu, 17 Feb 2022 13:18:23 +0000
Subject: [PATCH] in seq.c rename itoa to toybox_itoa, to avoid clashes
---
toys/lsb/seq.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/toys/lsb/seq.c b/toys/lsb/seq.c
index 7a931c64..e3788002 100644
--- a/toys/lsb/seq.c
+++ b/toys/lsb/seq.c
@@ -54,7 +54,7 @@ static double parsef(char *s)
// fast integer conversion to decimal string
// TODO move to lib?
-static char *itoa(char *s, int i)
+static char *toybox_itoa(char *s, int i)
{
char buf[16], *ff = buf;
unsigned n = i;
@@ -112,9 +112,9 @@ void seq_main(void)
inc = increment;
ss = toybuf;
if (inc>0) for (; ii<=len; ii += inc)
- ss = flush_toybuf(itoa(ss, ii));
+ ss = flush_toybuf(toybox_itoa(ss, ii));
else if (inc<0) for (; ii>=len; ii += inc)
- ss = flush_toybuf(itoa(ss, ii));
+ ss = flush_toybuf(toybox_itoa(ss, ii));
if (ss != toybuf) xwrite(1, toybuf, ss-toybuf);
return;
--
2.32.0
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net