summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-11-22 02:46:32 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-11-22 02:46:32 +0200
commit1818da2ef3decbbed57b513480131853a3f2dadc (patch)
tree7976e9a396626aececee6bea3caf141c620a9034
parent8ee43e24f3797ed1cd2f9f9f5aafc61cce552eda (diff)
downloadmicropython-1818da2ef3decbbed57b513480131853a3f2dadc.tar.gz
micropython-1818da2ef3decbbed57b513480131853a3f2dadc.zip
lib/utils/printf: Fix issue with putchar define for some ports.
-rw-r--r--lib/utils/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/printf.c b/lib/utils/printf.c
index 6822564f35..f09047d096 100644
--- a/lib/utils/printf.c
+++ b/lib/utils/printf.c
@@ -35,6 +35,7 @@
#include "py/formatfloat.h"
#endif
+#undef putchar // Some stdlibs have a #define for putchar
int printf(const char *fmt, ...);
int vprintf(const char *fmt, va_list ap);
int putchar(int c);
@@ -72,7 +73,6 @@ int DEBUG_printf(const char *fmt, ...) {
#endif
// need this because gcc optimises printf("%c", c) -> putchar(c), and printf("a") -> putchar('a')
-#undef putchar // Some stdlibs have a #define for putchar
int putchar(int c) {
char chr = c;
mp_hal_stdout_tx_strn_cooked(&chr, 1);