diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2011-02-24 07:18:11 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2011-02-24 07:18:11 +0000 |
commit | bc6a7eeb3252182cc48c5e4888bbffa9ed57faa4 (patch) | |
tree | 19bd11395e49e7d6d467227a290abe996e607b91 /payloads/libpayload | |
parent | 8a6186d8d16b76afd650b7f64b872556e959f780 (diff) |
libpayload: Move stdin/stdout/stderr away from headers
Otherwise they exist in several object files, confusing the linker
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6377 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload')
-rw-r--r-- | payloads/libpayload/include/curses.h | 6 | ||||
-rw-r--r-- | payloads/libpayload/include/stdio.h | 7 | ||||
-rw-r--r-- | payloads/libpayload/libc/printf.c | 7 |
3 files changed, 9 insertions, 11 deletions
diff --git a/payloads/libpayload/include/curses.h b/payloads/libpayload/include/curses.h index 6c9307a59..1859f022c 100644 --- a/payloads/libpayload/include/curses.h +++ b/payloads/libpayload/include/curses.h @@ -148,11 +148,7 @@ typedef unsigned long chtype; typedef unsigned long mmask_t; #endif -//// #include <stdio.h> -struct _IO_FILE { - // FIXME -}; -typedef struct _IO_FILE FILE; +#include <stdio.h> //// #include <ncursesw/unctrl.h> #include <stdarg.h> /* we need va_list */ //// #define va_list int // FIXME diff --git a/payloads/libpayload/include/stdio.h b/payloads/libpayload/include/stdio.h index fb40a0dc7..d39e9f854 100644 --- a/payloads/libpayload/include/stdio.h +++ b/payloads/libpayload/include/stdio.h @@ -32,14 +32,9 @@ #include <stddef.h> -struct _FILE { -} _stdout, _stdin, _stderr; - typedef struct _FILE FILE; -FILE *stdout = &_stdout; -FILE *stdin = &_stdin; -FILE *stderr = &_stderr; +extern FILE *stdout, *stdin, *stderr; /** * @defgroup printf Print functions diff --git a/payloads/libpayload/libc/printf.c b/payloads/libpayload/libc/printf.c index a1ebb1409..389d2277e 100644 --- a/payloads/libpayload/libc/printf.c +++ b/payloads/libpayload/libc/printf.c @@ -36,6 +36,13 @@ #include <libpayload.h> #include <ctype.h> +static struct _FILE { +} _stdout, _stdin, _stderr; + +FILE *stdout = &_stdout; +FILE *stdin = &_stdin; +FILE *stderr = &_stderr; + /** Structure for specifying output methods for different printf clones. */ struct printf_spec { /* Output function, returns count of printed characters or EOF. */ |