diff --git a/kernel/src/stdio/vfprintf.c b/kernel/src/stdio/vfprintf.c index 09e252dfcb5cacab3f20c988a56e35f73f723a5c..b721461f549ec4849f1e7140e8888ff62f0f6937 100644 --- a/kernel/src/stdio/vfprintf.c +++ b/kernel/src/stdio/vfprintf.c @@ -1,10 +1,7 @@ #include "stdio_impl.h" #include #include -/* Undef the CHAR macro definition in los_typedef.h to avoid conflicts with the following CHAR */ -#define CHAR _CHAR #include -#undef CHAR #include #include #include @@ -32,6 +29,10 @@ #define FLAGMASK (ALT_FORM|ZERO_PAD|LEFT_ADJ|PAD_POS|MARK_POS|GROUPED) +/* Redefine the CHAR type that defined in los_typedef.h and introduced + * in by limit.h to avoid conflicts with the following enum definition. */ +#define CHAR _CHAR + /* State machine to accept length modifiers + conversion specifiers. * Result is 0 on failure, or an argument type to pop on success. */