Change all variadic macros to C99 style

This commit is contained in:
Gregory Nutt 2014-05-22 09:01:51 -06:00
parent c53bad01cf
commit 2b0f1ed109
10 changed files with 35 additions and 35 deletions

View File

@ -106,11 +106,11 @@
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG # ifdef CONFIG_DEBUG
# define message(format, arg...) dbg(format, ##arg) # define message(format, ...) dbg(format, ##__VA_ARGS__)
# define err(format, arg...) dbg(format, ##arg) # define err(format, ...) dbg(format, ##__VA_ARGS__)
# else # else
# define message(format, arg...) printf(format, ##arg) # define message(format, ...) printf(format, ##__VA_ARGS__)
# define err(format, arg...) fprintf(stderr, format, ##arg) # define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
# endif # endif
#else #else
# ifdef CONFIG_DEBUG # ifdef CONFIG_DEBUG

View File

@ -102,11 +102,11 @@
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG # ifdef CONFIG_DEBUG
# define message(format, arg...) dbg(format, ##arg) # define message(format, ...) dbg(format, ##__VA_ARGS__)
# define err(format, arg...) dbg(format, ##arg) # define err(format, ...) dbg(format, ##__VA_ARGS__)
# else # else
# define message(format, arg...) printf(format, ##arg) # define message(format, ...) printf(format, ##__VA_ARGS__)
# define err(format, arg...) fprintf(stderr, format, ##arg) # define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
# endif # endif
#else #else
# ifdef CONFIG_DEBUG # ifdef CONFIG_DEBUG

View File

@ -109,11 +109,11 @@
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG # ifdef CONFIG_DEBUG
# define message(format, arg...) dbg(format, ##arg) # define message(format, ...) dbg(format, ##__VA_ARGS__)
# define err(format, arg...) dbg(format, ##arg) # define err(format, ...) dbg(format, ##__VA_ARGS__)
# else # else
# define message(format, arg...) printf(format, ##arg) # define message(format, ...) printf(format, ##__VA_ARGS__)
# define err(format, arg...) fprintf(stderr, format, ##arg) # define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
# endif # endif
#else #else
# ifdef CONFIG_DEBUG # ifdef CONFIG_DEBUG

View File

@ -63,10 +63,10 @@
#ifdef CONFIG_THTTPD_FDWATCH_DEBUG #ifdef CONFIG_THTTPD_FDWATCH_DEBUG
# ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_CPP_HAVE_VARARGS
# define fwdbg(format, arg...) ndbg(format, ##arg) # define fwdbg(format, ...) ndbg(format, ##__VA_ARGS__)
# define fwlldbg(format, arg...) nlldbg(format, ##arg) # define fwlldbg(format, ...) nlldbg(format, ##__VA_ARGS__)
# define fwvdbg(format, arg...) nvdbg(format, ##arg) # define fwvdbg(format, ...) nvdbg(format, ##__VA_ARGS__)
# define fwllvdbg(format, arg...) nllvdbg(format, ##arg) # define fwllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__)
# else # else
# define fwdbg ndbg # define fwdbg ndbg
# define fwlldbg nlldbg # define fwlldbg nlldbg

View File

@ -63,7 +63,7 @@
#define nsh_exit(v,s) (v)->exit(v,s) #define nsh_exit(v,s) (v)->exit(v,s)
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# define nsh_output(v, fmt...) (v)->output(v, ##fmt) # define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
#else #else
# define nsh_output vtbl->output # define nsh_output vtbl->output
#endif #endif

View File

@ -107,15 +107,15 @@
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 0 # if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 0
# define cledbg(format, arg...) \ # define cledbg(format, ...) \
syslog(EXTRA_FMT format EXTRA_ARG, ##arg) syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else # else
# define cledbg(x...) # define cledbg(x...)
# endif # endif
# if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 1 # if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 1
# define clevdbg(format, arg...) \ # define clevdbg(format, ...) \
syslog(EXTRA_FMT format EXTRA_ARG, ##arg) syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else # else
# define clevdbg(x...) # define clevdbg(x...)
# endif # endif

View File

@ -124,9 +124,9 @@
/* Output is via printf but can be changed using this macro */ /* Output is via printf but can be changed using this macro */
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# define i2c_output(v, fmt...) printf(v, ##fmt) # define i2c_output(v, ...) printf(v, ##__VA_ARGS__)
#else #else
# define i2c_output printf # define i2c_output printf
#endif #endif
/**************************************************************************** /****************************************************************************

View File

@ -62,15 +62,15 @@
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 0 # if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 0
# define inidbg(format, arg...) \ # define inidbg(format, ...) \
printf(EXTRA_FMT format EXTRA_ARG, ##arg) printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else # else
# define inidbg(x...) # define inidbg(x...)
# endif # endif
# if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 1 # if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 1
# define inivdbg(format, arg...) \ # define inivdbg(format, ...) \
printf(EXTRA_FMT format EXTRA_ARG, ##arg) printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else # else
# define inivdbg(x...) # define inivdbg(x...)
# endif # endif

View File

@ -149,8 +149,8 @@
#ifdef CONFIG_CPP_HAVE_VARARGS #ifdef CONFIG_CPP_HAVE_VARARGS
# if CONFIG_SYSTEM_VI_DEBUGLEVEL > 0 # if CONFIG_SYSTEM_VI_DEBUGLEVEL > 0
# define vidbg(format, arg...) \ # define vidbg(format, ...) \
syslog(EXTRA_FMT format EXTRA_ARG, ##arg) syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# define vvidbg(format, ap) \ # define vvidbg(format, ap) \
vsyslog(format, ap) vsyslog(format, ap)
# else # else
@ -159,8 +159,8 @@
# endif # endif
# if CONFIG_SYSTEM_VI_DEBUGLEVEL > 1 # if CONFIG_SYSTEM_VI_DEBUGLEVEL > 1
# define vivdbg(format, arg...) \ # define vivdbg(format, ...) \
syslog(EXTRA_FMT format EXTRA_ARG, ##arg) syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else # else
# define vivdbg(x...) # define vivdbg(x...)
# endif # endif

View File

@ -229,16 +229,16 @@
*/ */
#ifdef CONFIG_DEBUG_ZMODEM #ifdef CONFIG_DEBUG_ZMODEM
# define zmprintf(format, arg...) fprintf(stderr, format, ##arg) # define zmprintf(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
# define zmdbg(format, arg...) fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##arg) # define zmdbg(format, ...) fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
#else #else
# undef CONFIG_SYSTEM_ZMODEM_DUMPBUFFER # undef CONFIG_SYSTEM_ZMODEM_DUMPBUFFER
# ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_CPP_HAVE_VARARGS
# define zmprintf(x...) # define zmprintf(x...)
# define zmdbg(x...) # define zmdbg(x...)
# else # else
# define zmprintf (void) # define zmprintf (void)
# define zmdbg (void) # define zmdbg (void)
# endif # endif
#endif #endif