Add _ to the beginning of all debug macros to avoid name collisions

This commit is contained in:
Gregory Nutt
2016-06-16 12:33:32 -06:00
parent fdaf3d7268
commit 0c8c7fecf0
252 changed files with 1348 additions and 1374 deletions
+6 -6
View File
@@ -26,7 +26,7 @@
"dq_rem","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
"dq_remfirst","queue.h","","FAR dq_entry_t","dq_queue_t *"
"dq_remlast","queue.h","","FAR dq_entry_t","dq_queue_t *"
"err","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR)","int","const char *","..."
"_err","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR)","int","const char *","..."
"ether_ntoa","netinet/ether.h","","FAR char","FAR const struct ether_addr *"
"fclose","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fdopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","int","FAR const char *"
@@ -64,9 +64,9 @@
"lib_dumpbuffer","debug.h","","void","FAR const char *","FAR const uint8_t *","unsigned int"
"lio_listio","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *const []|FAR struct aiocb *const *","int","FAR struct sigevent *"
"llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int"
"llerr","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"llinfo","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"llwarn","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"_llerr","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"_llinfo","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"_llwarn","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"lowsyslog","syslog.h","","int","int","FAR const char *","..."
"lowvsyslog","syslog.h","","int","int","FAR const char *","va_list"
"match","nuttx/regex.h","","int","const char *","const char *"
@@ -169,11 +169,11 @@
"ub16sqr","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","ub16_t","ub16_t"
"ungetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int","FAR FILE *"
"usleep","unistd.h","!defined(CONFIG_DISABLE_SIGNALS)","int","int","FAR FILE *"
"info","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO)","int","const char *","..."
"_info","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO)","int","const char *","..."
"vfprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","const char *","va_list"
"vprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","va_list"
"vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list"
"vsprintf","stdio.h","","int","FAR char *","const char *","va_list"
"vsscanf","stdio.h","","int","char *","const char *","va_list"
"vsyslog","syslog.h","","int","int","FAR const char *","va_list"
"warn","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN)","int","const char *","..."
"_warn","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN)","int","const char *","..."
1 _inet_ntoa arpa/inet.h defined(CONFIG_NET_IPv4) && !defined(CONFIG_CAN_PASS_STRUCTS) FAR char in_addr_t
26 dq_rem queue.h void FAR dq_entry_t *
27 dq_remfirst queue.h FAR dq_entry_t dq_queue_t *
28 dq_remlast queue.h FAR dq_entry_t dq_queue_t *
29 err _err debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR) int const char *
30 ether_ntoa netinet/ether.h FAR char FAR const struct ether_addr *
31 fclose stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE *
32 fdopen stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 FAR FILE int
64 lib_dumpbuffer debug.h void FAR const char *
65 lio_listio aio.h defined(CONFIG_FS_AIO) int int
66 llabs stdlib.h defined(CONFIG_HAVE_LONG_LONG) long long int long long int
67 llerr _llerr debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR) && defined(CONFIG_ARCH_LOWPUTC) int const char *
68 llinfo _llinfo debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO) && defined(CONFIG_ARCH_LOWPUTC) int const char *
69 llwarn _llwarn debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN) && defined(CONFIG_ARCH_LOWPUTC) int const char *
70 lowsyslog syslog.h int int
71 lowvsyslog syslog.h int int
72 match nuttx/regex.h int const char *
169 ub16sqr fixedmath.h !defined(CONFIG_HAVE_LONG_LONG) ub16_t ub16_t
170 ungetc stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int int
171 usleep unistd.h !defined(CONFIG_DISABLE_SIGNALS) int int
172 info _info debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO) int const char *
173 vfprintf stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE *
174 vprintf stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR const char *
175 vsnprintf stdio.h int FAR char *
176 vsprintf stdio.h int FAR char *
177 vsscanf stdio.h int char *
178 vsyslog syslog.h int int
179 warn _warn debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN) int const char *
+8 -8
View File
@@ -51,7 +51,7 @@
****************************************************************************/
/****************************************************************************
* Name: alert, err, llerr, warn, llwarn, info, llinfo
* Name: alert, err, llerr, warn, llwarn, info, _llinfo
*
* Description:
* If the cross-compiler's pre-processor does not support variable
@@ -60,7 +60,7 @@
****************************************************************************/
#ifdef CONFIG_ARCH_LOWPUTC
int alert(const char *format, ...)
int _alert(const char *format, ...)
{
va_list ap;
int ret;
@@ -74,7 +74,7 @@ int alert(const char *format, ...)
#endif /* CONFIG_ARCH_LOWPUTC */
#ifdef CONFIG_DEBUG_FEATURES
int err(const char *format, ...)
int _err(const char *format, ...)
{
va_list ap;
int ret;
@@ -87,7 +87,7 @@ int err(const char *format, ...)
}
#ifdef CONFIG_ARCH_LOWPUTC
int llerr(const char *format, ...)
int _llerr(const char *format, ...)
{
va_list ap;
int ret;
@@ -102,7 +102,7 @@ int llerr(const char *format, ...)
#endif /* CONFIG_DEBUG_FEATURES */
#ifdef CONFIG_DEBUG_WARN
int warn(const char *format, ...)
int _warn(const char *format, ...)
{
va_list ap;
int ret;
@@ -115,7 +115,7 @@ int warn(const char *format, ...)
}
#ifdef CONFIG_ARCH_LOWPUTC
int llwarn(const char *format, ...)
int _llwarn(const char *format, ...)
{
va_list ap;
int ret;
@@ -130,7 +130,7 @@ int llwarn(const char *format, ...)
#endif /* CONFIG_DEBUG_INFO */
#ifdef CONFIG_DEBUG_INFO
int info(const char *format, ...)
int _info(const char *format, ...)
{
va_list ap;
int ret;
@@ -143,7 +143,7 @@ int info(const char *format, ...)
}
#ifdef CONFIG_ARCH_LOWPUTC
int llinfo(const char *format, ...)
int _llinfo(const char *format, ...)
{
va_list ap;
int ret;
+15 -15
View File
@@ -74,63 +74,63 @@
void posix_spawnattr_dump(posix_spawnattr_t *attr)
{
#ifdef CONFIG_DEBUG_ERROR
err("attr[%p]:\n", attr);
err(" flags: %04x\n", attr->flags);
_err("attr[%p]:\n", attr);
_err(" flags: %04x\n", attr->flags);
if (attr->flags == 0)
{
err(" None\n");
_err(" None\n");
}
else
{
if ((attr->flags & POSIX_SPAWN_RESETIDS) != 0)
{
err(" POSIX_SPAWN_RESETIDS\n");
_err(" POSIX_SPAWN_RESETIDS\n");
}
if ((attr->flags & POSIX_SPAWN_SETPGROUP) != 0)
{
err(" POSIX_SPAWN_SETPGROUP\n");
_err(" POSIX_SPAWN_SETPGROUP\n");
}
if ((attr->flags & POSIX_SPAWN_SETSCHEDPARAM) != 0)
{
err(" POSIX_SPAWN_SETSCHEDPARAM\n");
_err(" POSIX_SPAWN_SETSCHEDPARAM\n");
}
if ((attr->flags & POSIX_SPAWN_SETSCHEDULER) != 0)
{
err(" POSIX_SPAWN_SETSCHEDULER\n");
_err(" POSIX_SPAWN_SETSCHEDULER\n");
}
if ((attr->flags & POSIX_SPAWN_SETSIGDEF) != 0)
{
err(" POSIX_SPAWN_SETSIGDEF\n");
_err(" POSIX_SPAWN_SETSIGDEF\n");
}
if ((attr->flags & POSIX_SPAWN_SETSIGMASK) != 0)
{
err(" POSIX_SPAWN_SETSIGMASK\n");
_err(" POSIX_SPAWN_SETSIGMASK\n");
}
}
err(" priority: %d\n", attr->priority);
_err(" priority: %d\n", attr->priority);
err(" policy: %d\n", attr->policy);
_err(" policy: %d\n", attr->policy);
if (attr->policy == SCHED_FIFO)
{
err(" SCHED_FIFO\n");
_err(" SCHED_FIFO\n");
}
else if (attr->policy == SCHED_RR)
{
err(" SCHED_RR\n");
_err(" SCHED_RR\n");
}
else
{
err(" Unrecognized\n");
_err(" Unrecognized\n");
}
#ifndef CONFIG_DISABLE_SIGNALS
err(" sigmask: %08x\n", attr->sigmask);
_err(" sigmask: %08x\n", attr->sigmask);
#endif
#endif /* CONFIG_DEBUG_ERROR */
}
+6 -6
View File
@@ -80,10 +80,10 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions)
DEBUGASSERT(file_actions);
err("File Actions[%p->%p]:\n", file_actions, *file_actions);
_err("File Actions[%p->%p]:\n", file_actions, *file_actions);
if (!*file_actions)
{
err(" NONE\n");
_err(" NONE\n");
return;
}
@@ -100,7 +100,7 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions)
FAR struct spawn_close_file_action_s *action =
(FAR struct spawn_close_file_action_s *)entry;
err(" CLOSE: fd=%d\n", action->fd);
_err(" CLOSE: fd=%d\n", action->fd);
}
break;
@@ -109,7 +109,7 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions)
FAR struct spawn_dup2_file_action_s *action =
(FAR struct spawn_dup2_file_action_s *)entry;
err(" DUP2: %d->%d\n", action->fd1, action->fd2);
_err(" DUP2: %d->%d\n", action->fd1, action->fd2);
}
break;
@@ -118,14 +118,14 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions)
FAR struct spawn_open_file_action_s *action =
(FAR struct spawn_open_file_action_s *)entry;
err(" OPEN: path=%s oflags=%04x mode=%04x fd=%d\n",
_err(" OPEN: path=%s oflags=%04x mode=%04x fd=%d\n",
action->path, action->oflags, action->mode, action->fd);
}
break;
case SPAWN_FILE_ACTION_NONE:
default:
err(" ERROR: Unknown action: %d\n", entry->action);
_err(" ERROR: Unknown action: %d\n", entry->action);
break;
}
}