Skip to content

Commit 7781442

Browse files
committed
Fixes mpaland#130: Renamed _vsnprintf -> vsnprintf_impl, to avoid a clash with stdio.h in the msys2 environment.
1 parent fb264f5 commit 7781442

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/printf/printf.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,9 +1030,9 @@ static printf_flags_t parse_flags(const char** format)
10301030
// internal vsnprintf - used for implementing _all library functions
10311031
// Note: We don't like the C standard's parameter names, so using more informative parameter names
10321032
// here instead.
1033-
static int _vsnprintf(output_gadget_t* output, const char* format, va_list args)
1033+
static int vsnprintf_impl(output_gadget_t* output, const char* format, va_list args)
10341034
{
1035-
// Note: The library only calls _vsnprintf() with output->pos being 0. However, it is
1035+
// Note: The library only calls vsnprintf_impl() with output->pos being 0. However, it is
10361036
// possible to call this function with a non-zero pos value for some "remedial printing".
10371037

10381038
while (*format)
@@ -1353,13 +1353,13 @@ static int _vsnprintf(output_gadget_t* output, const char* format, va_list args)
13531353
int vprintf_(const char* format, va_list arg)
13541354
{
13551355
output_gadget_t gadget = extern_putchar_gadget();
1356-
return _vsnprintf(&gadget, format, arg);
1356+
return vsnprintf_impl(&gadget, format, arg);
13571357
}
13581358

13591359
int vsnprintf_(char* s, size_t n, const char* format, va_list arg)
13601360
{
13611361
output_gadget_t gadget = buffer_gadget(s, n);
1362-
return _vsnprintf(&gadget, format, arg);
1362+
return vsnprintf_impl(&gadget, format, arg);
13631363
}
13641364

13651365
int vsprintf_(char* s, const char* format, va_list arg)
@@ -1370,7 +1370,7 @@ int vsprintf_(char* s, const char* format, va_list arg)
13701370
int vfctprintf(void (*out)(char c, void* extra_arg), void* extra_arg, const char* format, va_list arg)
13711371
{
13721372
output_gadget_t gadget = function_gadget(out, extra_arg);
1373-
return _vsnprintf(&gadget, format, arg);
1373+
return vsnprintf_impl(&gadget, format, arg);
13741374
}
13751375

13761376
int printf_(const char* format, ...)

0 commit comments

Comments
 (0)