summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-16 14:10:39 +0900
committerTom Rini <trini@konsulko.com>2017-10-04 07:55:21 -0400
commit7fea7b1a37ad2b1c1e92bd87f7c6a1877d70e579 (patch)
tree0afa89044ca7886ed52a129f108d249b74c08aae /include/common.h
parent39dd65a059e503883dbf16d4c00ac083d15837da (diff)
stdio.h: move printf() stuff from <common.h> to <stdio.h>
<common.h> pulls in a lot of headers. Including it from every .c file is a bad idea. We need to remove contents until it contains nothing. Move printf() and friends to <stdio.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h41
1 files changed, 1 insertions, 40 deletions
diff --git a/include/common.h b/include/common.h
index aaed131671..5e841947c1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -29,6 +29,7 @@ typedef volatile unsigned char vu_char;
#include <linux/stringify.h>
#include <asm/ptrace.h>
#include <stdarg.h>
+#include <stdio.h>
#include <linux/kernel.h>
#include <part.h>
@@ -699,46 +700,6 @@ unsigned int rand_r(unsigned int *seedp);
/* serial stuff */
int serial_printf (const char *fmt, ...)
__attribute__ ((format (__printf__, 1, 2)));
-/* stdin */
-int getc(void);
-int tstc(void);
-
-/* stdout */
-#if !defined(CONFIG_SPL_BUILD) || \
- (defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_SERIAL_SUPPORT)) || \
- (defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && \
- defined(CONFIG_SPL_SERIAL_SUPPORT))
-void putc(const char c);
-void puts(const char *s);
-int printf(const char *fmt, ...)
- __attribute__ ((format (__printf__, 1, 2)));
-int vprintf(const char *fmt, va_list args);
-#else
-#define putc(...) do { } while (0)
-#define puts(...) do { } while (0)
-#define printf(...) do { } while (0)
-#define vprintf(...) do { } while (0)
-#endif
-
-/* stderr */
-#define eputc(c) fputc(stderr, c)
-#define eputs(s) fputs(stderr, s)
-#define eprintf(fmt,args...) fprintf(stderr,fmt ,##args)
-
-/*
- * FILE based functions (can only be used AFTER relocation!)
- */
-#define stdin 0
-#define stdout 1
-#define stderr 2
-#define MAX_FILES 3
-
-int fprintf(int file, const char *fmt, ...)
- __attribute__ ((format (__printf__, 2, 3)));
-void fputs(int file, const char *s);
-void fputc(int file, const char c);
-int ftstc(int file);
-int fgetc(int file);
/* lib/gzip.c */
int gzip(void *dst, unsigned long *lenp,