diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-07-19 08:42:32 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-07-19 08:42:32 -0700 |
commit | ff7334a2ce536b7f4b1f6d6f93ff4e285a3bd45a (patch) | |
tree | 40598b8f0f09fbc6ddc9e6e22802ba400528e300 /com32/include/dprintf.h | |
parent | 7cc3ba019aee913d09e7bf0b6711da2e1f6b2db4 (diff) | |
download | syslinux-ff7334a2ce536b7f4b1f6d6f93ff4e285a3bd45a.tar.gz |
Only compile dprintf/vdprintf if DEBUG_PORT is defined
We really, really don't want to accidentally spew output to a debug
port in production, so make it obligatory to define DEBUG_PORT or
DEBUG_STDIO in order for the debugging code to be compiled in. Since
DEBUG_STDIO just turns the debugging code into stdio references, we
only need to compile the code for the DEBUG_PORT case.
Add a commented-out line to mk/devel.mk to make it easier for users.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/include/dprintf.h')
-rw-r--r-- | com32/include/dprintf.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/com32/include/dprintf.h b/com32/include/dprintf.h index b8a3b84c..26ca734b 100644 --- a/com32/include/dprintf.h +++ b/com32/include/dprintf.h @@ -5,6 +5,10 @@ #ifndef _DPRINTF_H #define _DPRINTF_H +#if !defined(DEBUG_PORT) && !defined(DEBUG_STDIO) +# undef DEBUG +#endif + #ifdef DEBUG # include <stdio.h> |