Change all variadic macros to C99 style
This commit is contained in:
parent
c53bad01cf
commit
2b0f1ed109
@ -106,11 +106,11 @@
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG
|
||||
# define message(format, arg...) dbg(format, ##arg)
|
||||
# define err(format, arg...) dbg(format, ##arg)
|
||||
# define message(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define err(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define message(format, arg...) printf(format, ##arg)
|
||||
# define err(format, arg...) fprintf(stderr, format, ##arg)
|
||||
# define message(format, ...) printf(format, ##__VA_ARGS__)
|
||||
# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_DEBUG
|
||||
|
@ -102,11 +102,11 @@
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG
|
||||
# define message(format, arg...) dbg(format, ##arg)
|
||||
# define err(format, arg...) dbg(format, ##arg)
|
||||
# define message(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define err(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define message(format, arg...) printf(format, ##arg)
|
||||
# define err(format, arg...) fprintf(stderr, format, ##arg)
|
||||
# define message(format, ...) printf(format, ##__VA_ARGS__)
|
||||
# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_DEBUG
|
||||
|
@ -109,11 +109,11 @@
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG
|
||||
# define message(format, arg...) dbg(format, ##arg)
|
||||
# define err(format, arg...) dbg(format, ##arg)
|
||||
# define message(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define err(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define message(format, arg...) printf(format, ##arg)
|
||||
# define err(format, arg...) fprintf(stderr, format, ##arg)
|
||||
# define message(format, ...) printf(format, ##__VA_ARGS__)
|
||||
# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_DEBUG
|
||||
|
@ -63,10 +63,10 @@
|
||||
|
||||
#ifdef CONFIG_THTTPD_FDWATCH_DEBUG
|
||||
# ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define fwdbg(format, arg...) ndbg(format, ##arg)
|
||||
# define fwlldbg(format, arg...) nlldbg(format, ##arg)
|
||||
# define fwvdbg(format, arg...) nvdbg(format, ##arg)
|
||||
# define fwllvdbg(format, arg...) nllvdbg(format, ##arg)
|
||||
# define fwdbg(format, ...) ndbg(format, ##__VA_ARGS__)
|
||||
# define fwlldbg(format, ...) nlldbg(format, ##__VA_ARGS__)
|
||||
# define fwvdbg(format, ...) nvdbg(format, ##__VA_ARGS__)
|
||||
# define fwllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__)
|
||||
# else
|
||||
# define fwdbg ndbg
|
||||
# define fwlldbg nlldbg
|
||||
|
@ -63,7 +63,7 @@
|
||||
#define nsh_exit(v,s) (v)->exit(v,s)
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define nsh_output(v, fmt...) (v)->output(v, ##fmt)
|
||||
# define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
|
||||
#else
|
||||
# define nsh_output vtbl->output
|
||||
#endif
|
||||
|
@ -107,15 +107,15 @@
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 0
|
||||
# define cledbg(format, arg...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
|
||||
# define cledbg(format, ...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define cledbg(x...)
|
||||
# endif
|
||||
|
||||
# if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 1
|
||||
# define clevdbg(format, arg...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
|
||||
# define clevdbg(format, ...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define clevdbg(x...)
|
||||
# endif
|
||||
|
@ -124,9 +124,9 @@
|
||||
/* Output is via printf but can be changed using this macro */
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define i2c_output(v, fmt...) printf(v, ##fmt)
|
||||
# define i2c_output(v, ...) printf(v, ##__VA_ARGS__)
|
||||
#else
|
||||
# define i2c_output printf
|
||||
# define i2c_output printf
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -62,15 +62,15 @@
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 0
|
||||
# define inidbg(format, arg...) \
|
||||
printf(EXTRA_FMT format EXTRA_ARG, ##arg)
|
||||
# define inidbg(format, ...) \
|
||||
printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define inidbg(x...)
|
||||
# endif
|
||||
|
||||
# if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 1
|
||||
# define inivdbg(format, arg...) \
|
||||
printf(EXTRA_FMT format EXTRA_ARG, ##arg)
|
||||
# define inivdbg(format, ...) \
|
||||
printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define inivdbg(x...)
|
||||
# endif
|
||||
|
@ -149,8 +149,8 @@
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# if CONFIG_SYSTEM_VI_DEBUGLEVEL > 0
|
||||
# define vidbg(format, arg...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
|
||||
# define vidbg(format, ...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# define vvidbg(format, ap) \
|
||||
vsyslog(format, ap)
|
||||
# else
|
||||
@ -159,8 +159,8 @@
|
||||
# endif
|
||||
|
||||
# if CONFIG_SYSTEM_VI_DEBUGLEVEL > 1
|
||||
# define vivdbg(format, arg...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
|
||||
# define vivdbg(format, ...) \
|
||||
syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define vivdbg(x...)
|
||||
# endif
|
||||
|
@ -229,16 +229,16 @@
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_ZMODEM
|
||||
# define zmprintf(format, arg...) fprintf(stderr, format, ##arg)
|
||||
# define zmdbg(format, arg...) fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##arg)
|
||||
# define zmprintf(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
|
||||
# define zmdbg(format, ...) fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
#else
|
||||
# undef CONFIG_SYSTEM_ZMODEM_DUMPBUFFER
|
||||
# ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define zmprintf(x...)
|
||||
# define zmdbg(x...)
|
||||
# else
|
||||
# define zmprintf (void)
|
||||
# define zmdbg (void)
|
||||
# define zmprintf (void)
|
||||
# define zmdbg (void)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user