mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
Add _ to the beginning of all debug macros to avoid name collisions
This commit is contained in:
+6
-6
@@ -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 *","..."
|
||||
|
||||
|
@@ -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
@@ -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 */
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user