Fix messaging logic for case of debu disabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1944 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
fdecac3ce3
commit
dab4ec9849
@ -38,6 +38,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
@ -96,12 +97,22 @@
|
||||
* output will be synchronous with the debug output.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
# define message dbg
|
||||
# define err dbg
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG
|
||||
# define message(format, arg...) dbg(format, ##arg)
|
||||
# define err(format, arg...) dbg(format, ##arg)
|
||||
# else
|
||||
# define message(format, arg...) printf(format, ##arg)
|
||||
# define err(format, arg...) fprintf(stderr, format, ##arg)
|
||||
# endif
|
||||
#else
|
||||
# define message printf
|
||||
# define err fprintf(stderr,
|
||||
# ifdef CONFIG_DEBUG
|
||||
# define message dbg
|
||||
# define err dbg
|
||||
# else
|
||||
# define message printf
|
||||
# define err printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user