[BugFix] itoa conflicts with mingw rename to itoa_buf

Change-Id: Ife361f2fd8c8946db5bb2e0e58c0981b2ed3c5f3
This commit is contained in:
William Wilgus 2025-02-18 10:34:18 -05:00
parent ee4591d9e7
commit 50da856992
9 changed files with 45 additions and 46 deletions

View file

@ -242,15 +242,14 @@ static const char * const tag_type_str[] = {
#define logf_clauses logf
#endif /* ndef LOGF_ENABLE */
#if !defined(itoa)
char *itoa(char *buf, size_t bufsz, long int i)
#if defined(PLUGIN)
char *itoa_buf(char *buf, size_t bufsz, long int i)
{
snprintf(buf, bufsz, "%ld", i);
return buf;
}
#endif
/* Status information of the tagcache. */
static struct tagcache_stat tc_stat;
@ -1931,7 +1930,7 @@ static bool get_next(struct tagcache_search *tcs, bool is_numeric, char *buf, lo
if (is_numeric)
{
itoa(buf, bufsz, tcs->position);
itoa_buf(buf, bufsz, tcs->position);
tcs->result = buf;
tcs->result_len = strlen(buf) + 1;
return true;
@ -4001,7 +4000,7 @@ bool tagcache_create_changelog(struct tagcache_search *tcs)
{
if (TAGCACHE_IS_NUMERIC(j))
{
itoa(temp, sizeof temp, (int)idx.tag_seek[j]);
itoa_buf(temp, sizeof temp, (int)idx.tag_seek[j]);
write_tag(clfd, tagcache_tag_to_str(j), temp);
continue;
}