X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fstdio.h;h=3241e2d493fa2aec9d5ef14facdbc8dae3bfc545;hb=71dfe179cd3840f56bc812131b4031b0976efbc1;hp=1939a48f0fb61fc5b86a1c806e6e5b0801b22c95;hpb=6674edaabfd271471608146806f5b6540bc76a1b;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/stdio.h b/include/stdio.h index 1939a48..3241e2d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -15,6 +15,11 @@ int tstc(void); defined(CONFIG_SPL_SERIAL)) void putc(const char c); void puts(const char *s); +#ifdef CONFIG_CONSOLE_FLUSH_SUPPORT +void flush(void); +#else +static inline void flush(void) {} +#endif int __printf(1, 2) printf(const char *fmt, ...); int vprintf(const char *fmt, va_list args); #else @@ -26,6 +31,10 @@ static inline void puts(const char *s) { } +static inline void flush(void) +{ +} + static inline int __printf(1, 2) printf(const char *fmt, ...) { return 0; @@ -48,11 +57,17 @@ static inline int vprintf(const char *fmt, va_list args) /* stderr */ #define eputc(c) fputc(stderr, c) #define eputs(s) fputs(stderr, s) +#define eflush() fflush(stderr) #define eprintf(fmt, args...) fprintf(stderr, fmt, ##args) int __printf(2, 3) fprintf(int file, const char *fmt, ...); void fputs(int file, const char *s); void fputc(int file, const char c); +#ifdef CONFIG_CONSOLE_FLUSH_SUPPORT +void fflush(int file); +#else +static inline void fflush(int file) {} +#endif int ftstc(int file); int fgetc(int file);