diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-05-18 14:59:15 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-05-18 14:59:15 -0700 |
commit | 68e8ee381541fa142e3cda2101255be8b376afe4 (patch) | |
tree | 3dd73e9e32183383040ca9351c25ba8343c21f06 | |
parent | fefd374ec212c2e83f59f0c633d12a1c40492780 (diff) | |
download | syslinux-68e8ee381541fa142e3cda2101255be8b376afe4.tar.gz syslinux-68e8ee381541fa142e3cda2101255be8b376afe4.tar.xz syslinux-68e8ee381541fa142e3cda2101255be8b376afe4.zip |
elflink: make dprintf() usable in the core
Make dprintf() usable in the core, as it it on the mainline branch.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | com32/lib/Makefile | 8 | ||||
-rw-r--r-- | com32/lib/dprintf.c | 6 | ||||
-rw-r--r-- | com32/lib/vdprintf.c | 8 |
3 files changed, 13 insertions, 9 deletions
diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 7bb2d3ae..8e6a73aa 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -16,7 +16,7 @@ LIBPNG_OBJS = \ libpng/pngrio.o libpng/pngwio.o libpng/pngwrite.o \ libpng/pngrtran.o libpng/pngwtran.o libpng/pngmem.o \ libpng/pngerror.o libpng/pngpread.o - + # ZIP library object files LIBZLIB_OBJS = \ zlib/adler32.o zlib/compress.o zlib/crc32.o \ @@ -79,6 +79,8 @@ LIBENTRY_OBJS = \ sys/openmem.o \ sys/isatty.o sys/fstat.o \ \ + dprintf.o vdprintf.o \ + \ syslinux/idle.o \ \ exit.o @@ -93,7 +95,7 @@ LIBGCC_OBJS = \ libgcc/__negdi2.o libgcc/__ashrdi3.o libgcc/__lshrdi3.o \ libgcc/__muldi3.o libgcc/__udivmoddi4.o libgcc/__umoddi3.o \ libgcc/__divdi3.o libgcc/__moddi3.o - + LIBCONSOLE_OBJS = \ \ sys/openconsole.o sys/line_input.o \ @@ -136,8 +138,6 @@ LIBOTHER_OBJS = \ \ lstrdup.o \ \ - dprintf.o vdprintf.o \ - \ suffix_number.o \ \ getcwd.o fdopendir.o \ diff --git a/com32/lib/dprintf.c b/com32/lib/dprintf.c index 900c0a47..869f07f0 100644 --- a/com32/lib/dprintf.c +++ b/com32/lib/dprintf.c @@ -5,8 +5,8 @@ #include <stdio.h> #include <stdarg.h> -#undef DEBUG -#define DEBUG 1 +#ifdef DEBUG + #include <dprintf.h> void dprintf(const char *format, ...) @@ -17,3 +17,5 @@ void dprintf(const char *format, ...) vdprintf(format, ap); va_end(ap); } + +#endif diff --git a/com32/lib/vdprintf.c b/com32/lib/vdprintf.c index 76da012d..df044763 100644 --- a/com32/lib/vdprintf.c +++ b/com32/lib/vdprintf.c @@ -2,6 +2,8 @@ * vdprintf.c */ +#ifdef DEBUG + #include <stdio.h> #include <string.h> #include <stdarg.h> @@ -10,8 +12,6 @@ #include <sys/io.h> #include <sys/cpu.h> -#undef DEBUG -#define DEBUG 1 #include <dprintf.h> #define BUFFER_SIZE 4096 @@ -114,5 +114,7 @@ void vdprintf(const char *format, va_list ap) while (rv--) debug_putc(*p++); - _fwrite(buffer, _rv, stdout); + /* _fwrite(buffer, _rv, stdout); */ } + +#endif /* DEBUG */ |