Skip to content
Commit 27b7ace9 authored by Keith Packard's avatar Keith Packard Committed by Christopher Friedt
Browse files

libc/minimal: Create "real" functions for putc and putchar



When gcc is building without -fno-builtin, it will optimize calls like
printf("\n") into a call to putchar('\n'), but it won't use a static inline
in that case, instead insisting on a real function.

To make this a bit easier, adopt the usual C library practice of making
putc and putchar macros instead of static inline functions. There's no loss
of typechecking as the parameters are directly passed to underlying
functions with the same parameter types.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 4fab10d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment