add front demo in this project

This commit is contained in:
lnk
2025-06-20 16:20:59 +08:00
parent 768eebbc2b
commit e14e3f9678
208 changed files with 54655 additions and 114 deletions

View File

@@ -0,0 +1,247 @@
#ifndef LOG4CPLUS_CONFIG_DEFINES_HXX
#define LOG4CPLUS_CONFIG_DEFINES_HXX
/* */
#undef LOG4CPLUS_HAVE_SYSLOG_H
/* */
#undef LOG4CPLUS_HAVE_ARPA_INET_H
/* */
#undef LOG4CPLUS_HAVE_NETINET_IN_H
/* */
#undef LOG4CPLUS_HAVE_NETINET_TCP_H
/* */
#undef LOG4CPLUS_HAVE_SYS_TIMEB_H
/* */
#undef LOG4CPLUS_HAVE_SYS_TIME_H
/* */
#undef LOG4CPLUS_HAVE_SYS_TYPES_H
/* */
#undef LOG4CPLUS_HAVE_SYS_STAT_H
/* */
#undef LOG4CPLUS_HAVE_SYS_SYSCALL_H
/* */
#undef LOG4CPLUS_HAVE_SYS_FILE_H
/* */
#undef LOG4CPLUS_HAVE_TIME_H
/* */
#undef LOG4CPLUS_HAVE_SYS_SOCKET_H
/* */
#undef LOG4CPLUS_HAVE_NETDB_H
/* */
#undef LOG4CPLUS_HAVE_UNISTD_H
/* */
#undef LOG4CPLUS_HAVE_FCNTL_H
/* */
#undef LOG4CPLUS_HAVE_STDARG_H
/* */
#undef LOG4CPLUS_HAVE_STDIO_H
/* */
#undef LOG4CPLUS_HAVE_STDLIB_H
/* */
#undef LOG4CPLUS_HAVE_ERRNO_H
/* */
#undef LOG4CPLUS_HAVE_WCHAR_H
/* */
#undef LOG4CPLUS_HAVE_ICONV_H
/* */
#undef LOG4CPLUS_HAVE_LIMITS_H
/* */
#undef LOG4CPLUS_HAVE_FTIME
/* */
#undef LOG4CPLUS_HAVE_GETADDRINFO
/* */
#undef LOG4CPLUS_HAVE_GETHOSTBYNAME_R
/* */
#undef LOG4CPLUS_HAVE_GETPID
/* */
#undef LOG4CPLUS_HAVE_GMTIME_R
/* */
#undef LOG4CPLUS_HAVE_HTONL
/* */
#undef LOG4CPLUS_HAVE_HTONS
/* */
#undef LOG4CPLUS_HAVE_LOCALTIME_R
/* */
#undef LOG4CPLUS_HAVE_LSTAT
/* */
#undef LOG4CPLUS_HAVE_FCNTL
/* */
#undef LOG4CPLUS_HAVE_LOCKF
/* */
#undef LOG4CPLUS_HAVE_FLOCK
/* */
#undef LOG4CPLUS_HAVE_NTOHL
/* */
#undef LOG4CPLUS_HAVE_NTOHS
/* Define to 1 if you have the `shutdown' function. */
#undef LOG4CPLUS_HAVE_SHUTDOWN
/* */
#undef LOG4CPLUS_HAVE_PIPE
/* */
#undef LOG4CPLUS_HAVE_PIPE2
/* */
#undef LOG4CPLUS_HAVE_POLL
/* */
#undef LOG4CPLUS_HAVE_POLL_H
/* */
#undef LOG4CPLUS_HAVE_STAT
/* Define if this is a single-threaded library. */
#undef LOG4CPLUS_SINGLE_THREADED
/* */
#undef LOG4CPLUS_USE_PTHREADS
/* Define for compilers/standard libraries that support more than just the "C"
locale. */
#undef LOG4CPLUS_WORKING_LOCALE
/* Define for C99 compilers/standard libraries that support more than just the
"C" locale. */
#undef LOG4CPLUS_WORKING_C_LOCALE
/* Define to int if undefined. */
#undef socklen_t
/* Defined for --enable-debugging builds. */
#undef LOG4CPLUS_DEBUGGING
/* Defined if the compiler understands __declspec(dllexport) or
__attribute__((visibility("default"))) construct. */
#undef LOG4CPLUS_DECLSPEC_EXPORT
/* Defined if the compiler understands __declspec(dllimport) or
__attribute__((visibility("default"))) construct. */
#undef LOG4CPLUS_DECLSPEC_IMPORT
/* Defined if the compiler understands
__attribute__((visibility("hidden"))) construct. */
#undef LOG4CPLUS_DECLSPEC_PRIVATE
/* */
#undef LOG4CPLUS_HAVE_TLS_SUPPORT
/* */
#undef LOG4CPLUS_THREAD_LOCAL_VAR
/* Defined if the host OS provides ENAMETOOLONG errno value. */
#undef LOG4CPLUS_HAVE_ENAMETOOLONG
/* */
#undef LOG4CPLUS_HAVE_VSNPRINTF
/* Define to 1 if you have the `vsnwprintf' function. */
#undef LOG4CPLUS_HAVE_VSNWPRINTF
/* Define to 1 if you have the `_vsnwprintf' function. */
#undef LOG4CPLUS_HAVE__VSNWPRINTF
/* */
#undef LOG4CPLUS_HAVE__VSNPRINTF
/* Define to 1 if you have the `vfprintf_s' function. */
#undef LOG4CPLUS_HAVE_VFPRINTF_S
/* Define to 1 if you have the `vfwprintf_s' function. */
#undef LOG4CPLUS_HAVE_VFWPRINTF_S
/* Define to 1 if you have the `vsprintf_s' function. */
#undef LOG4CPLUS_HAVE_VSPRINTF_S
/* Define to 1 if you have the `vswprintf_s' function. */
#undef LOG4CPLUS_HAVE_VSWPRINTF_S
/* Define to 1 if you have the `_vsnprintf_s' function. */
#undef LOG4CPLUS_HAVE__VSNPRINTF_S
/* Define to 1 if you have the `_vsnwprintf_s' function. */
#undef LOG4CPLUS_HAVE__VSNWPRINTF_S
/* Defined if the compiler supports __FUNCTION__ macro. */
#undef LOG4CPLUS_HAVE_FUNCTION_MACRO
/* Defined if the compiler supports __PRETTY_FUNCTION__ macro. */
#undef LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO
/* Defined if the compiler supports __func__ symbol. */
#undef LOG4CPLUS_HAVE_FUNC_SYMBOL
/* Define to 1 if you have the `mbstowcs' function. */
#undef LOG4CPLUS_HAVE_MBSTOWCS
/* Define to 1 if you have the `wcstombs' function. */
#undef LOG4CPLUS_HAVE_WCSTOMBS
/* Define to 1 if you have Linux style syscall(SYS_gettid). */
#undef LOG4CPLUS_HAVE_GETTID
/* Define when iconv() is available. */
#undef LOG4CPLUS_WITH_ICONV
/* Define to 1 if you have the `iconv' function. */
#undef LOG4CPLUS_HAVE_ICONV
/* Define to 1 if you have the `iconv_close' function. */
#undef LOG4CPLUS_HAVE_ICONV_CLOSE
/* Define to 1 if you have the `iconv_open' function. */
#undef LOG4CPLUS_HAVE_ICONV_OPEN
/* Define to 1 if you have the `OutputDebugString' function. */
#undef LOG4CPLUS_HAVE_OUTPUTDEBUGSTRING
/* Define to 1 if the system has the `constructor' function attribute
with priority */
#undef LOG4CPLUS_HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR_PRIORITY
/* Define to 1 if the system has the `constructor' function attribute */
#undef LOG4CPLUS_HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
/* Define to 1 if the system has the `init_priority' variable attribute */
#undef LOG4CPLUS_HAVE_VAR_ATTRIBUTE_INIT_PRIORITY
/* Defined to enable unit tests. */
#undef LOG4CPLUS_WITH_UNIT_TESTS
#endif // LOG4CPLUS_CONFIG_DEFINES_HXX

View File

@@ -0,0 +1,37 @@
// -*- C++ -*-
// Module: Log4CPLUS
// File: config-macosx.h
// Created: 7/2003
// Author: Christopher R. Bailey
//
//
// Copyright 2003-2017 Christopher R. Bailey
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file */
#ifndef LOG4CPLUS_CONFIG_MACOSX_HEADER_
#define LOG4CPLUS_CONFIG_MACOSX_HEADER_
#if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
#pragma once
#endif
#if (defined(__APPLE__) || (defined(__MWERKS__) && defined(__MACOS__)))
#define LOG4CPLUS_HAVE_GETTIMEOFDAY 1
#define socklen_t int
#endif // MACOSX
#endif // LOG4CPLUS_CONFIG_MACOSX_HEADER_

View File

@@ -0,0 +1,194 @@
// -*- C++ -*-
// Module: Log4CPLUS
// File: config-win32.h
// Created: 4/2003
// Author: Tad E. Smith
//
//
// Copyright 2003-2017 Tad E. Smith
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file */
#ifndef LOG4CPLUS_CONFIG_WIN32_HEADER_
#define LOG4CPLUS_CONFIG_WIN32_HEADER_
#if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
#pragma once
#endif
#if defined (__MINGW32__) || defined (__MINGW64__)
# include <_mingw.h>
#endif
#ifdef _WIN32
#if (defined (_MSC_VER) && _MSC_VER > 1400) \
|| (defined (__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 3)
# define LOG4CPLUS_HAVE_INTRIN_H
#endif
// Time related functions and headers.
#define LOG4CPLUS_HAVE_TIME_H
#define LOG4CPLUS_HAVE_SYS_TIMEB_H
#define LOG4CPLUS_HAVE_FTIME
#if defined (_MSC_VER) || defined (__BORLANDC__)
#define LOG4CPLUS_HAVE_GMTIME_S
#endif
// Use Winsock on Windows.
#define LOG4CPLUS_USE_WINSOCK
// Enable Win32DebugAppender
#define LOG4CPLUS_HAVE_OUTPUTDEBUGSTRING
// Enable Win32ConsoleAppender.
#define LOG4CPLUS_HAVE_WIN32_CONSOLE
#define LOG4CPLUS_HAVE_SYS_TYPES_H
#define LOG4CPLUS_HAVE_SYS_LOCKING_H
#define LOG4CPLUS_HAVE_FCNTL_H
#define LOG4CPLUS_HAVE_IO_H
#define LOG4CPLUS_HAVE_STDIO_H
#define LOG4CPLUS_HAVE_WCHAR_H
#define LOG4CPLUS_HAVE_STDARG_H
#define LOG4CPLUS_HAVE_STDLIB_H
#define LOG4CPLUS_HAVE_ERRNO_H
#define LOG4CPLUS_HAVE_SYS_STAT_H
#define LOG4CPLUS_HAVE_TIME_H
#define LOG4CPLUS_HAVE_STDLIB_H
#define LOG4CPLUS_HAVE_DIRECT_H
// MSVC has both and so does MinGW.
#define LOG4CPLUS_HAVE_VSNPRINTF
#define LOG4CPLUS_HAVE__VSNPRINTF
#define LOG4CPLUS_HAVE__VSNWPRINTF
// Limit the use of foo_s() functions to builds using Visual Studio
// 2005 and its run time library. In MinGW land, limit the foo_s()
// functions to MinGw-w64 toolchain and __MSVCRT_VERSION__ >= 0x0900.
#if (defined (_MSC_VER) && _MSC_VER >= 1400) \
|| (defined (__MSVCRT_VERSION__) && __MSVCRT_VERSION__ >= 0x0900 \
&& defined (__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 2)
// MS secure versions of vprintf().
# define LOG4CPLUS_HAVE_VSPRINTF_S
# define LOG4CPLUS_HAVE_VSWPRINTF_S
// MS secure versions of vfprintf().
# define LOG4CPLUS_HAVE_VFPRINTF_S
# define LOG4CPLUS_HAVE_VFWPRINTF_S
// MS secure versions of vsnprintf().
# define LOG4CPLUS_HAVE_VSNPRINTF_S
# define LOG4CPLUS_HAVE__VSNPRINTF_S
# define LOG4CPLUS_HAVE__VSNWPRINTF_S
// MS secure version of _tsopen().
# define LOG4CPLUS_HAVE__TSOPEN_S
#endif
#if defined (_MSC_VER) && _MSC_VER >= 1400
// MS printf-like functions supporting positional parameters.
# define LOG4CPLUS_HAVE__VSPRINTF_P
# define LOG4CPLUS_HAVE__VSWPRINTF_P
#endif
#if defined (_MSC_VER)
# define LOG4CPLUS_HAVE_LOCALTIME_S
#endif
#define LOG4CPLUS_HAVE__TSOPEN
#define LOG4CPLUS_DLLMAIN_HINSTANCE HINSTANCE
#define LOG4CPLUS_HAVE_NT_EVENT_LOG
// log4cplus_EXPORTS is used by the CMake build system. DLL_EXPORT is
// used by the autotools build system.
#if (defined (log4cplus_EXPORTS) || defined (log4cplusU_EXPORTS) \
|| (defined (DLL_EXPORT) && defined (INSIDE_LOG4CPLUS))) \
&& ! defined (LOG4CPLUS_STATIC)
# undef LOG4CPLUS_BUILD_DLL
# define LOG4CPLUS_BUILD_DLL
#endif
#if ! defined (LOG4CPLUS_BUILD_DLL)
# undef LOG4CPLUS_STATIC
# define LOG4CPLUS_STATIC
#endif
#if defined (LOG4CPLUS_STATIC) && defined (LOG4CPLUS_BUILD_DLL)
# error LOG4CPLUS_STATIC and LOG4CPLUS_BUILD_DLL cannot be defined both.
#endif
#if defined (LOG4CPLUS_BUILD_DLL)
# if defined (INSIDE_LOG4CPLUS)
# define LOG4CPLUS_EXPORT __declspec(dllexport)
# else
# define LOG4CPLUS_EXPORT __declspec(dllimport)
# endif
#else
# define LOG4CPLUS_EXPORT
#endif
#ifndef LOG4CPLUS_SINGLE_THREADED
# define LOG4CPLUS_USE_WIN32_THREADS
#endif
#if defined(_MSC_VER)
// Warning about: identifier was truncated to '255' characters in the debug information
# pragma warning( disable : 4786 )
// Warning about: <type1> needs to have dll-interface to be used by clients of class <type2>
# pragma warning( disable : 4251 )
# define LOG4CPLUS_INLINES_ARE_EXPORTED
# if _MSC_VER >= 1400
# define LOG4CPLUS_WORKING_LOCALE
# define LOG4CPLUS_HAVE_FUNCTION_MACRO
# define LOG4CPLUS_HAVE_FUNCSIG_MACRO
# define LOG4CPLUS_ATTRIBUTE_NORETURN __declspec(noreturn)
# endif
#endif
#if defined (__GNUC__)
# undef LOG4CPLUS_INLINES_ARE_EXPORTED
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO
# define LOG4CPLUS_HAVE_FUNC_SYMBOL
# endif
// This has worked for some versions of MinGW with GCC 4.7+ but it
// appears to be broken again in 4.8.x. Thus, we disable this for GCC
// completely forever.
//
//# define LOG4CPLUS_INLINES_ARE_EXPORTED
# define LOG4CPLUS_HAVE_FUNCTION_MACRO
# if defined (__MINGW32__)
# define LOG4CPLUS_WORKING_C_LOCALE
# endif
#endif
#if defined (__BORLANDC__) && __BORLANDC__ >= 0x0650
# define LOG4CPLUS_HAVE_FUNCTION_MACRO
#endif // __BORLANDC__
#if ! defined (LOG4CPLUS_DISABLE_DLL_RUNTIME_WARNING)
# if defined (LOG4CPLUS_STATIC) && defined (_MSC_VER) && ! defined (_DLL)
# pragma message("You are not using DLL C run time library. " \
"You must call log4cplus::initialize() once before " \
"you use any other log4cplus API.")
# endif
#endif
#endif // _WIN32
#endif // LOG4CPLUS_CONFIG_WIN32_HEADER_

View File

@@ -0,0 +1,42 @@
// -*- C++ -*-
// Module: Log4CPLUS
// File: windowsh-inc.h
// Created: 9/2018
// Author: Vaclav Haisman
//
//
// Copyright (C) 2018, Vaclav Haisman. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modifica-
// tion, 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.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
// APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
// DING, 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.
// NOTE: This file is a fragment intentionally left without include guards.
#if defined (_WIN32)
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#if defined (LOG4CPLUS_HAVE_INTRIN_H)
#include <intrin.h>
#endif
#endif
// NOTE: This file is a fragment intentionally left without include guards.

View File

@@ -0,0 +1,159 @@
// -*- C++ -*-
// Module: Log4CPLUS
// File: windowsh-inc.h
// Created: 4/2010
// Author: Vaclav Zeman
//
//
// Copyright (C) 2010-2017, Vaclav Zeman. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modifica-
// tion, 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.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
// APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
// DING, 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.
// NOTE: This file is a fragment intentionally left without include guards.
#if defined (_WIN32)
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#undef NOGDICAPMASKS
#define NOGDICAPMASKS
#undef NOVIRTUALKEYCODES
#define NOVIRTUALKEYCODES
#undef NOWINMESSAGES
#define NOWINMESSAGES
#undef NOWINSTYLES
#define NOWINSTYLES
#undef NOSYSMETRICS
#define NOSYSMETRICS
#undef NOMENUS
#define NOMENUS
#undef NOICONS
#define NOICONS
#undef NOKEYSTATES
#define NOKEYSTATES
#undef NOSYSCOMMANDS
#define NOSYSCOMMANDS
#undef NORASTEROPS
#define NORASTEROPS
#undef NOSHOWWINDOW
#define NOSHOWWINDOW
#undef NOATOM
#define NOATOM
#undef NOCLIPBOARD
#define NOCLIPBOARD
#undef NOCOLOR
#define NOCOLOR
#undef NOCTLMGR
#define NOCTLMGR
#undef NODRAWTEXT
#define NODRAWTEXT
#undef NOGDI
#define NOGDI
#undef NOKERNEL
#define NOKERNEL
#undef NOUSER
#define NOUSER
#undef NONLS
#define NONLS
#undef NOMB
#define NOMB
#undef NOMEMMGR
#define NOMEMMGR
#undef NOMETAFILE
#define NOMETAFILE
#undef NOMINMAX
#define NOMINMAX
#undef NOMSG
#define NOMSG
#undef NOOPENFILE
#define NOOPENFILE
#undef NOSCROLL
#define NOSCROLL
#undef NOSERVICE
#define NOSERVICE
#undef NOSOUND
#define NOSOUND
#undef NOTEXTMETRIC
#define NOTEXTMETRIC
#undef NOWH
#define NOWH
#undef NOWINOFFSETS
#define NOWINOFFSETS
#undef NOCOMM
#define NOCOMM
#undef NOKANJI
#define NOKANJI
#undef NOHELP
#define NOHELP
#undef NOPROFILER
#define NOPROFILER
#undef NODEFERWINDOWPOS
#define NODEFERWINDOWPOS
#undef NOMCX
#define NOMCX
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#if defined (LOG4CPLUS_HAVE_INTRIN_H)
#include <intrin.h>
#endif
#endif
// NOTE: This file is a fragment intentionally left without include guards.