diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-09 17:38:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-09 17:38:26 +0100 |
commit | 39c6c3480a9cb88e722af1142c7b31a00e9ec546 (patch) | |
tree | 3381f97f7485a14df8f2c47249d1aedfa509d205 /include | |
parent | ff6383c8e4bde31036fbd31f7961539be288d6af (diff) | |
parent | bdcdcaad8199aba9774197e6f3296f659d30c399 (diff) | |
download | barebox-39c6c3480a9cb88e722af1142c7b31a00e9ec546.tar.gz barebox-39c6c3480a9cb88e722af1142c7b31a00e9ec546.tar.xz |
Merge branch 'for-next/mxs'
Diffstat (limited to 'include')
-rw-r--r-- | include/malloc.h | 2 | ||||
-rw-r--r-- | include/printk.h | 15 | ||||
-rw-r--r-- | include/stdio.h | 20 |
3 files changed, 23 insertions, 14 deletions
diff --git a/include/malloc.h b/include/malloc.h index a36f3c0de4..0d3c9e97a0 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -11,4 +11,6 @@ void *calloc(size_t, size_t); void malloc_stats(void); void *sbrk(ptrdiff_t increment); +int mem_malloc_is_initialized(void); + #endif /* __MALLOC_H */ diff --git a/include/printk.h b/include/printk.h index 22c6c732f7..a27ad514cf 100644 --- a/include/printk.h +++ b/include/printk.h @@ -22,18 +22,23 @@ /* debugging and troubleshooting/diagnostic helpers. */ #ifndef CONFIG_CONSOLE_NONE -int pr_print(int level, const char *format, ...) - __attribute__ ((format(__printf__, 2, 3))); - int dev_printf(int level, const struct device_d *dev, const char *format, ...) __attribute__ ((format(__printf__, 3, 4))); #else -static inline int pr_print(int level, const char *format, ...) +static inline int dev_printf(int level, const struct device_d *dev, const char *format, ...) { return 0; } +#endif -static inline int dev_printf(int level, const struct device_d *dev, const char *format, ...) +#if (!defined(__PBL__) && !defined(CONFIG_CONSOLE_NONE)) || \ + (defined(__PBL__) && defined(CONFIG_PBL_CONSOLE)) +int pr_print(int level, const char *format, ...) + __attribute__ ((format(__printf__, 2, 3))); +#else +static int pr_print(int level, const char *format, ...) + __attribute__ ((format(__printf__, 2, 3))); +static inline int pr_print(int level, const char *format, ...) { return 0; } diff --git a/include/stdio.h b/include/stdio.h index 71dbae35ca..f190911762 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -29,8 +29,6 @@ int getc(void); int console_puts(unsigned int ch, const char *s); void console_flush(void); - -int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2))); int vprintf(const char *fmt, va_list args); #else static inline int tstc(void) @@ -52,13 +50,6 @@ static inline void console_putc(unsigned int ch, char c) {} static inline void console_flush(void) {} -static int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2))); -static inline int printf(const char *fmt, ...) -{ - return 0; -} - - static inline int vprintf(const char *fmt, va_list args) { return 0; @@ -74,6 +65,17 @@ static inline int ctrlc (void) #endif +#if (!defined(__PBL__) && !defined(CONFIG_CONSOLE_NONE)) || \ + (defined(__PBL__) && defined(CONFIG_PBL_CONSOLE)) +int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2))); +#else +static int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2))); +static inline int printf(const char *fmt, ...) +{ + return 0; +} +#endif + static inline int puts(const char *s) { return console_puts(CONSOLE_STDOUT, s); |