mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
Move syslog logic from libc/misc and libc/stdio to libc/syslog
This commit is contained in:
+6
-1
@@ -124,7 +124,6 @@ extern "C"
|
|||||||
#if 0 /* Not supported */
|
#if 0 /* Not supported */
|
||||||
void openlog(FAR const char *ident, int option, int facility);
|
void openlog(FAR const char *ident, int option, int facility);
|
||||||
void closelog(void);
|
void closelog(void);
|
||||||
int setlogmask(int mask);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* These low-level debug APIs are provided by the NuttX library. These are
|
/* These low-level debug APIs are provided by the NuttX library. These are
|
||||||
@@ -162,6 +161,12 @@ int lowvsyslog(int priority, FAR const char *format, va_list ap);
|
|||||||
# define lowvsyslog(p,f,a) vsyslog(p,f,a)
|
# define lowvsyslog(p,f,a) vsyslog(p,f,a)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* The setlogmask() function sets the logmask and returns the previous
|
||||||
|
* mask. If the mask argument is 0, the current logmask is not modified.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int setlogmask(int mask);
|
||||||
|
|
||||||
/* Enable or disable syslog output */
|
/* Enable or disable syslog output */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE /* Non-standard */
|
#ifdef CONFIG_SYSLOG_ENABLE /* Non-standard */
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ include stdio/Make.defs
|
|||||||
include stdlib/Make.defs
|
include stdlib/Make.defs
|
||||||
include unistd/Make.defs
|
include unistd/Make.defs
|
||||||
include sched/Make.defs
|
include sched/Make.defs
|
||||||
|
include syslog/Make.defs
|
||||||
include string/Make.defs
|
include string/Make.defs
|
||||||
include aio/Make.defs
|
include aio/Make.defs
|
||||||
include pthread/Make.defs
|
include pthread/Make.defs
|
||||||
|
|||||||
@@ -137,12 +137,6 @@ extern "C"
|
|||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug output is initially disabled */
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE
|
|
||||||
EXTERN bool g_syslogenable;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
+5
-3
@@ -59,9 +59,11 @@ endif
|
|||||||
|
|
||||||
# Add the miscellaneous C files to the build
|
# Add the miscellaneous C files to the build
|
||||||
|
|
||||||
CSRCS += lib_match.c
|
CSRCS += lib_match.c lib_crc32.c lib_crc16.c lib_dumpbuffer.c
|
||||||
CSRCS += lib_crc32.c lib_crc16.c
|
|
||||||
CSRCS += lib_dbg.c lib_dumpbuffer.c
|
ifeq ($(CONFIG_DEBUG),y)
|
||||||
|
CSRCS += lib_dbg.c
|
||||||
|
endif
|
||||||
|
|
||||||
# Keyboard driver encoder/decoder
|
# Keyboard driver encoder/decoder
|
||||||
|
|
||||||
|
|||||||
+15
-59
@@ -44,35 +44,16 @@
|
|||||||
|
|
||||||
#include "lib_internal.h"
|
#include "lib_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
#ifndef CONFIG_CPP_HAVE_VARARGS
|
||||||
* Global Variables
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* Debug output is initially disabled */
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE
|
|
||||||
bool g_syslogenable;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Global Functions
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: syslog_enable
|
* Public Functions
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Enable or disable debug output.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE
|
|
||||||
void syslog_enable(bool enable)
|
|
||||||
{
|
|
||||||
g_syslogenable = enable;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: dbg, lldbg, vdbg
|
* Name: dbg, lldbg, vdbg
|
||||||
*
|
*
|
||||||
@@ -82,22 +63,15 @@ void syslog_enable(bool enable)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_CPP_HAVE_VARARGS
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
int dbg(const char *format, ...)
|
int dbg(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE
|
va_start(ap, format);
|
||||||
ret = 0;
|
ret = vsyslog(LOG_DEBUG, format, ap);
|
||||||
if (g_syslogenable)
|
va_end(ap);
|
||||||
#endif
|
|
||||||
{
|
|
||||||
va_start(ap, format);
|
|
||||||
ret = vsyslog(LOG_DEBUG, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -108,15 +82,9 @@ int lldbg(const char *format, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE
|
va_start(ap, format);
|
||||||
ret = 0;
|
ret = lowvsyslog(LOG_DEBUG, format, ap);
|
||||||
if (g_syslogenable)
|
va_end(ap);
|
||||||
#endif
|
|
||||||
{
|
|
||||||
va_start(ap, format);
|
|
||||||
ret = lowvsyslog(LOG_DEBUG, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -128,15 +96,9 @@ int vdbg(const char *format, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE
|
va_start(ap, format);
|
||||||
ret = 0;
|
ret = vsyslog(LOG_DEBUG, format, ap);
|
||||||
if (g_syslogenable)
|
va_end(ap);
|
||||||
#endif
|
|
||||||
{
|
|
||||||
va_start(ap, format);
|
|
||||||
ret = vsyslog(LOG_DEBUG, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -147,15 +109,9 @@ int llvdbg(const char *format, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_ENABLE
|
va_start(ap, format);
|
||||||
ret = 0;
|
ret = lowvsyslog(LOG_DEBUG, format, ap);
|
||||||
if (g_syslogenable)
|
va_end(ap);
|
||||||
#endif
|
|
||||||
{
|
|
||||||
va_start(ap, format);
|
|
||||||
ret = lowvsyslog(LOG_DEBUG, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,10 +37,9 @@
|
|||||||
# This first group of C files do not depend on having file descriptors or
|
# This first group of C files do not depend on having file descriptors or
|
||||||
# C streams.
|
# C streams.
|
||||||
|
|
||||||
CSRCS += lib_fileno.c lib_printf.c lib_syslog.c lib_lowsyslog.c
|
CSRCS += lib_fileno.c lib_printf.c lib_sprintf.c lib_asprintf.c
|
||||||
CSRCS += lib_sprintf.c lib_asprintf.c lib_snprintf.c lib_libsprintf.c
|
CSRCS += lib_snprintf.c lib_libsprintf.c lib_vsprintf.c lib_avsprintf.c
|
||||||
CSRCS += lib_vsprintf.c lib_avsprintf.c lib_vsnprintf.c lib_libvsprintf.c
|
CSRCS += lib_vsnprintf.c lib_libvsprintf.c lib_dprintf.c lib_vdprintf.c
|
||||||
CSRCS += lib_dprintf.c lib_vdprintf.c
|
|
||||||
CSRCS += lib_meminstream.c lib_memoutstream.c lib_memsistream.c
|
CSRCS += lib_meminstream.c lib_memoutstream.c lib_memsistream.c
|
||||||
CSRCS += lib_memsostream.c lib_lowinstream.c lib_lowoutstream.c
|
CSRCS += lib_memsostream.c lib_lowinstream.c lib_lowoutstream.c
|
||||||
CSRCS += lib_zeroinstream.c lib_nullinstream.c lib_nulloutstream.c
|
CSRCS += lib_zeroinstream.c lib_nullinstream.c lib_nulloutstream.c
|
||||||
@@ -71,10 +70,6 @@ endif
|
|||||||
|
|
||||||
# Other support that depends on specific, configured features.
|
# Other support that depends on specific, configured features.
|
||||||
|
|
||||||
ifeq ($(CONFIG_SYSLOG),y)
|
|
||||||
CSRCS += lib_syslogstream.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y)
|
ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y)
|
||||||
CSRCS += lib_dtoa.c
|
CSRCS += lib_dtoa.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
############################################################################
|
||||||
|
# libc/syslog/Make.defs
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
# Add the internal C files to the build
|
||||||
|
|
||||||
|
CSRCS += lib_syslog.c lib_lowsyslog.c
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_SYSLOG),y)
|
||||||
|
CSRCS += lib_syslogstream.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_SYSLOG_ENABLE),y)
|
||||||
|
CSRCS += lib_syslogenable.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Add the syslog directory to the build
|
||||||
|
|
||||||
|
DEPPATH += --dep-path syslog
|
||||||
|
VPATH += :syslog
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* libc/stdio/lib_lowsyslog.c
|
* libc/syslog/lib_lowsyslog.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* libc/stdio/lib_syslog.c
|
* libc/syslog/lib_syslog.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2011-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2011-2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "lib_internal.h"
|
#include "lib_internal.h"
|
||||||
|
#include "syslog/syslog.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* libc/syslog/lib_syslogenable.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "lib_internal.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_SYSLOG_ENABLE
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Debug output is initially disabled */
|
||||||
|
|
||||||
|
bool g_syslogenable;
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: syslog_enable
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Enable or disable debug output.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void syslog_enable(bool enable)
|
||||||
|
{
|
||||||
|
g_syslogenable = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_SYSLOG_ENABLE */
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* libc/stdio/lib_syslogstream.c
|
* libc/syslog/lib_syslogstream.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
#include <nuttx/syslog/syslog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
|
|
||||||
#include "lib_internal.h"
|
#include "lib_internal.h"
|
||||||
|
#include "syslog/syslog.h"
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG
|
#ifdef CONFIG_SYSLOG
|
||||||
|
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* libc/syslog/syslog.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||||
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __LIBC_SYSLOG_SYSLOG_H
|
||||||
|
#define __LIBC_SYSLOG_SYSLOG_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Types
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EXTERN extern "C"
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
#define EXTERN extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Debug output is initially disabled */
|
||||||
|
|
||||||
|
#ifdef CONFIG_SYSLOG_ENABLE
|
||||||
|
EXTERN bool g_syslogenable;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __LIBC_SYSLOG_SYSLOG_H */
|
||||||
Reference in New Issue
Block a user