Only compile dprintf/vdprintf if DEBUG_PORT is defined
commitff7334a2ce536b7f4b1f6d6f93ff4e285a3bd45a
authorH. Peter Anvin <hpa@zytor.com>
Thu, 19 Jul 2012 15:42:32 +0000 (19 08:42 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 19 Jul 2012 15:42:32 +0000 (19 08:42 -0700)
tree40598b8f0f09fbc6ddc9e6e22802ba400528e300
parent7cc3ba019aee913d09e7bf0b6711da2e1f6b2db4
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>
com32/include/dprintf.h
com32/lib/dprintf.c
com32/lib/vdprintf.c
mk/devel.mk