Browse Source
Updated log4CPlus to latest version containing bugfixes.
Updated log4CPlus to latest version containing bugfixes.
Former-commit-id: 4b588bd66a
main
366 changed files with 1742 additions and 1286 deletions
-
6CMakeLists.txt
-
345resources/3rdparty/log4cplus-1.1.2-rc2/README
-
5resources/3rdparty/log4cplus-1.1.2-rc2/REVISION
-
480resources/3rdparty/log4cplus-1.1.2-rc2/include/log4cplus/config.h
-
1resources/3rdparty/log4cplus-1.1.2-rc2/include/log4cplus/config/stamp-h2
-
BINresources/3rdparty/log4cplus-1.1.2-rc2/msvc10/x64/bin.Debug/log4cplusSD.c.idb
-
1resources/3rdparty/log4cplus-1.1.2-rc2/msvc10/x64/bin.Debug/log4cplusSD.lib.REMOVED.git-id
-
BINresources/3rdparty/log4cplus-1.1.2-rc2/msvc10/x64/bin.Debug/log4cplussd.c.pdb
-
1resources/3rdparty/log4cplus-1.1.2-rc2/msvc10/x64/bin.Release/log4cplusS.lib.REMOVED.git-id
-
BINresources/3rdparty/log4cplus-1.1.2-rc2/msvc10/x64/bin.Release/log4cpluss.c.pdb
-
41resources/3rdparty/log4cplus-1.1.2-rc2/src/liblog4cplus.la
-
BINresources/3rdparty/log4cplus-1.1.2-rc2/src/liblog4cplus.so
-
BINresources/3rdparty/log4cplus-1.1.2-rc2/src/liblog4cplus.so.1.1.2
-
BINresources/3rdparty/log4cplus-1.1.2-rc2/src/liblog4cplus.so.7
-
15resources/3rdparty/log4cplus-1.1.3-rc1/.dir-locals.el
-
2resources/3rdparty/log4cplus-1.1.3-rc1/AUTHORS
-
59resources/3rdparty/log4cplus-1.1.3-rc1/CMakeLists.txt
-
0resources/3rdparty/log4cplus-1.1.3-rc1/COPYING
-
64resources/3rdparty/log4cplus-1.1.3-rc1/ChangeLog
-
3resources/3rdparty/log4cplus-1.1.3-rc1/ConfigureChecks.cmake
-
0resources/3rdparty/log4cplus-1.1.3-rc1/INSTALL
-
0resources/3rdparty/log4cplus-1.1.3-rc1/LICENSE
-
0resources/3rdparty/log4cplus-1.1.3-rc1/Log4CPlusCPack.cmake
-
0resources/3rdparty/log4cplus-1.1.3-rc1/Log4CPlusUtils.cmake
-
0resources/3rdparty/log4cplus-1.1.3-rc1/Makefile.am
-
1resources/3rdparty/log4cplus-1.1.3-rc1/Makefile.in
-
0resources/3rdparty/log4cplus-1.1.3-rc1/NEWS
-
424resources/3rdparty/log4cplus-1.1.3-rc1/README
-
5resources/3rdparty/log4cplus-1.1.3-rc1/REVISION
-
0resources/3rdparty/log4cplus-1.1.3-rc1/TODO
-
0resources/3rdparty/log4cplus-1.1.3-rc1/acinclude.m4
-
0resources/3rdparty/log4cplus-1.1.3-rc1/aclocal.m4
-
392resources/3rdparty/log4cplus-1.1.3-rc1/android/android.toolchain.cmake
-
0resources/3rdparty/log4cplus-1.1.3-rc1/android/scripts/cmake_android.sh
-
0resources/3rdparty/log4cplus-1.1.3-rc1/android/scripts/cmake_android_armeabi.sh
-
0resources/3rdparty/log4cplus-1.1.3-rc1/android/scripts/cmake_android_mips.sh
-
0resources/3rdparty/log4cplus-1.1.3-rc1/android/scripts/cmake_android_neon.sh
-
0resources/3rdparty/log4cplus-1.1.3-rc1/android/scripts/cmake_android_x86.sh
-
0resources/3rdparty/log4cplus-1.1.3-rc1/ar-lib
-
0resources/3rdparty/log4cplus-1.1.3-rc1/config.guess
-
0resources/3rdparty/log4cplus-1.1.3-rc1/config.sub
-
108resources/3rdparty/log4cplus-1.1.3-rc1/configure
-
58resources/3rdparty/log4cplus-1.1.3-rc1/configure.ac
-
0resources/3rdparty/log4cplus-1.1.3-rc1/cygport/configure.ac-disable-__thread-keyword.patch
-
0resources/3rdparty/log4cplus-1.1.3-rc1/cygport/configure.ac-relax-libtool-version.patch
-
12resources/3rdparty/log4cplus-1.1.3-rc1/cygport/log4cplus.cygport
-
0resources/3rdparty/log4cplus-1.1.3-rc1/depcomp
-
4resources/3rdparty/log4cplus-1.1.3-rc1/docs/doxygen.config
-
0resources/3rdparty/log4cplus-1.1.3-rc1/docs/doxygen.css
-
0resources/3rdparty/log4cplus-1.1.3-rc1/docs/release.txt
-
0resources/3rdparty/log4cplus-1.1.3-rc1/docs/unicode.txt
-
4resources/3rdparty/log4cplus-1.1.3-rc1/docs/webpage_doxygen.config
-
0resources/3rdparty/log4cplus-1.1.3-rc1/docs/webpage_footer.html
-
0resources/3rdparty/log4cplus-1.1.3-rc1/docs/webpage_header.html
-
160resources/3rdparty/log4cplus-1.1.3-rc1/iOS/ConfigureChecks.cmake
-
13resources/3rdparty/log4cplus-1.1.3-rc1/iOS/README.txt
-
193resources/3rdparty/log4cplus-1.1.3-rc1/iOS/iOS.cmake
-
18resources/3rdparty/log4cplus-1.1.3-rc1/iOS/scripts/cmake_ios_armv7.sh
-
19resources/3rdparty/log4cplus-1.1.3-rc1/iOS/scripts/cmake_ios_i386.sh
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/Makefile.am
-
1resources/3rdparty/log4cplus-1.1.3-rc1/include/Makefile.in
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/appender.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/asyncappender.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/boost/deviceappender.hxx
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/clfsappender.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/clogger.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/config.h.cmake.in
-
6resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/config.h.in
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/config.hxx
-
3resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/config/defines.hxx.in
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/config/macosx.h
-
14resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/config/win32.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/config/windowsh-inc.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/configurator.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/consoleappender.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/fileappender.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/fstreams.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/appenderattachableimpl.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/fileinfo.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/lockfile.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/loglog.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/logloguser.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/pointer.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/property.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/queue.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/sleep.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/snprintf.h
-
3resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/socket.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/socketbuffer.h
-
8resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/stringhelper.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/thread-config.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/helpers/timehelper.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/hierarchy.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/hierarchylocker.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/internal/cygwin-win32.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/internal/env.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/internal/internal.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/internal/socket.h
-
23resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/layout.h
-
0resources/3rdparty/log4cplus-1.1.3-rc1/include/log4cplus/log4judpappender.h
@ -1,345 +0,0 @@ |
|||||
Short Description |
|
||||
================= |
|
||||
|
|
||||
log4cplus is a simple to use C++ logging API providing thread-safe, |
|
||||
flexible, and arbitrarily granular control over log management and |
|
||||
configuration. It is modeled after the Java log4j API. |
|
||||
|
|
||||
|
|
||||
Latest Project Information |
|
||||
========================== |
|
||||
|
|
||||
The latest up-to-date information for this project can be found at |
|
||||
http://log4cplus.sourceforge.net. Please submit bugs, patches, |
|
||||
feature requests, etc. there. |
|
||||
|
|
||||
|
|
||||
Tested on the following platforms |
|
||||
================================= |
|
||||
|
|
||||
- Linux/AMD64 with GCC 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) |
|
||||
- Linux/AMD64 with Sun C++ 5.12 Linux_i386 2011/11/16 |
|
||||
- Linux/AMD64 with Clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) |
|
||||
(based on LLVM 3.0) |
|
||||
- Linux/AMD64 with Intel(R) C++ Intel(R) 64 Compiler XE for |
|
||||
applications running on Intel(R) 64, Version 12.1 Build 20120410 |
|
||||
- FreeBSD/AMD64 with GCC 3.4.6, 4.2.1 and 4.3.3 |
|
||||
- Windows 7 with MS Visual C++ 10.0 |
|
||||
- OpenSolaris 5.11 with Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21, |
|
||||
with -library=stlport4 |
|
||||
- Solaris 5.10 with Sun C++ 5.8 2005/10/13, with -library=stlport4 |
|
||||
- NetBSD 5.0.2/AMD64 with GCC 4.1.3 20080704 prerelease (NetBSD nb2 |
|
||||
20081120) |
|
||||
- OpenBSD 5.0/AMD64 with GCC 4.2.1 20070719 |
|
||||
|
|
||||
|
|
||||
Configure script options |
|
||||
======================== |
|
||||
|
|
||||
--enable-debugging |
|
||||
------------------ |
|
||||
|
|
||||
This option is disabled by default. This option mainly affects GCC |
|
||||
builds but it also has some limitted effect on non-GCC builds. It |
|
||||
turns on debugging information generation, undefines NDEBUG symbol, |
|
||||
adds '-fkeep-inline-functions' and '-fstack-check' (GCC). |
|
||||
|
|
||||
|
|
||||
--enable-warnings |
|
||||
----------------- |
|
||||
|
|
||||
This option is enabled by default. It adds platform / compiler |
|
||||
dependent warning options to compiler command line. |
|
||||
|
|
||||
|
|
||||
`--enable-so-version` |
|
||||
--------------------- |
|
||||
|
|
||||
This option is enabled by default. It enables SO version decoration |
|
||||
on resulting library file, e.g., the `.2.0.0` in |
|
||||
`liblog4cplus-1.2.so.2.0.0`. |
|
||||
|
|
||||
|
|
||||
`--enable-release-version` |
|
||||
-------------------------- |
|
||||
|
|
||||
This option is enabled by default. It enables release version |
|
||||
decoration on the resulting library file, e.g., the `-1.2` in |
|
||||
`liblog4cplus-1.2.so.2.0.0`. |
|
||||
|
|
||||
|
|
||||
--enable-profiling |
|
||||
------------------ |
|
||||
|
|
||||
This option is disabled by default. This option adds profiling |
|
||||
information generation compiler option -pg to GCC and Sun CC / Solaris |
|
||||
Studio builds. |
|
||||
|
|
||||
|
|
||||
--enable-threads |
|
||||
---------------- |
|
||||
|
|
||||
This option is enabled by default. It turns on detection of necessary |
|
||||
compiler and linker flags that enable POSIX threading support. |
|
||||
|
|
||||
While this detection usually works well, some platforms still need |
|
||||
help with configuration by supplying additional flags to the configure |
|
||||
script. One of the know deficiencies is Solaris Studio on Linux. See |
|
||||
one of the later note for details. |
|
||||
|
|
||||
|
|
||||
--with-working-locale |
|
||||
--------------------- |
|
||||
|
|
||||
This is one of three locale and wchar_t <-> char conversion related |
|
||||
options. It is disabled by default. |
|
||||
|
|
||||
It is know to work well with GCC on Linux. Other platforms generally |
|
||||
have lesser locale support in their implementations of the C++ |
|
||||
standard library. It is known not to work well on any *BSD. |
|
||||
|
|
||||
See also docs/unicode.txt. |
|
||||
|
|
||||
|
|
||||
--with-working-c-locale |
|
||||
----------------------- |
|
||||
|
|
||||
This is second of wchar_t <-> char conversion related options. It is |
|
||||
disabled by default. |
|
||||
|
|
||||
It is known to work well on most *NIX platforms, including recent Cygwin. |
|
||||
|
|
||||
|
|
||||
--with-iconv |
|
||||
------------ |
|
||||
|
|
||||
This is third of wchar_t <-> char conversion related options. It is |
|
||||
disabled by default. |
|
||||
|
|
||||
The conversion using iconv() function always uses "UTF-8" and |
|
||||
"WCHAR_T" as source/target encodings. It is known to work well on |
|
||||
platforms with GNU iconv. Different implementations of iconv() might |
|
||||
not support "WCHAR_T" encoding selector. |
|
||||
|
|
||||
Either system provided iconv() or library provided libiconv() are |
|
||||
detected and accepted. Also both SUSv3 and GNU iconv() function |
|
||||
signatures are accepted. |
|
||||
|
|
||||
|
|
||||
--with-qt |
|
||||
--------- |
|
||||
|
|
||||
This option is disabled by default. It enables compilation of a |
|
||||
separate shared library (liblog4cplusqt4debugappender) that implements |
|
||||
Qt4DebugAppender. It requires Qt4 and pkg-config to be installed. |
|
||||
|
|
||||
|
|
||||
Notes |
|
||||
===== |
|
||||
|
|
||||
Cygwin/MinGW |
|
||||
------------ |
|
||||
|
|
||||
Some version of GCC (3.4.x and probably some of 4.x series too) on |
|
||||
Windows (both Mingw and Cygwin) produces lots of warnings of the form |
|
||||
"warning: inline function 'void foo()' is declared as dllimport: |
|
||||
attribute ignored." This can be worked around by adding |
|
||||
-Wno-attributes option to GCC command. Unfortunatelly, not all |
|
||||
affected version of GCC have this option. |
|
||||
|
|
||||
|
|
||||
Windows and TLS |
|
||||
--------------- |
|
||||
|
|
||||
log4cplus uses thread-local storage (TLS) for NDC, MDC and to optimize |
|
||||
use of some temporary objects. On Windows there are two ways to get |
|
||||
TLS: (1) using TlsAlloc() etc. functions, and (2) using |
|
||||
__declspec(thread). While method (2) generates faster code, it has |
|
||||
some limitations prior to Windows Vista. If log4cplus.dll is loaded |
|
||||
at run time using LoadLibrary() (or as a dependency of such loaded |
|
||||
library), then accessing __declspec(thread) variables can cause |
|
||||
general protection fault (GPF) errors. This is because Windows prior |
|
||||
to Windows Vista do not extend the TLS for libraries loaded at run |
|
||||
time using LoadLibrary(). To allow using the best available method, |
|
||||
log4cplus enables the method (2) by checking _WIN32_WINNT >= 0x0600 |
|
||||
condition, when compiling log4cplus targetted to Windows Vista or |
|
||||
later. |
|
||||
|
|
||||
|
|
||||
Threads and signals |
|
||||
------------------- |
|
||||
|
|
||||
log4cplus is not safe to be used from async signals' handlers. This |
|
||||
is a property of most threaded programmes in general. If you are |
|
||||
going to use log4cplus in threaded application and if you want to use |
|
||||
log4cplus from signal handlers then your only option is to block |
|
||||
signals in all threads but one that will handle all signals. On POSIX |
|
||||
platforms, this is possible using the sigwait() call. log4cplus |
|
||||
enables this approach by blocking all signals in any threads created |
|
||||
through its threads helpers. |
|
||||
|
|
||||
|
|
||||
IBM's XL C/C++ compiler |
|
||||
----------------------- |
|
||||
|
|
||||
IBM's XL C/C++ compiler executable has many variants ([1]). To |
|
||||
compile log4cplus with threading support specify one of the compiler |
|
||||
variants that support threading using the CXX variable on configure |
|
||||
script command line. E.g.: |
|
||||
|
|
||||
$ ../configure --enable-threads CXX=xlC_r |
|
||||
|
|
||||
[1] <http://pic.dhe.ibm.com/infocenter/comphelp/v121v141/index.jsp?topic=%2Fcom.ibm.xlcpp121.aix.doc%2Fcompiler_ref%2Ftucmpinv.html> |
|
||||
|
|
||||
|
|
||||
AIX reentrancy problem |
|
||||
---------------------- |
|
||||
|
|
||||
There appears to be a reentracy problem with AIX 5.3 and xlC 8 which |
|
||||
can result into a deadlock condition in some curcumstances. It is |
|
||||
unknown whether the problem manifests with other versions of either |
|
||||
the OS or the compiler, too. The problem was initially reported in a |
|
||||
bug report #3056687 ([1]). |
|
||||
|
|
||||
The core of the problem is that IBM's/xlC's standard C++ IOStreams |
|
||||
implementation uses global non recursive lock to protect some of its |
|
||||
state. The application in the bug report was trying to do logging |
|
||||
using log4cplus from inside overflow() member function of a class |
|
||||
derived from std::streambuf class. log4cplus itself uses |
|
||||
std::ostringstream. This resulted into an attempt to recursivly lock |
|
||||
the global non recursive lock and a deadlock. |
|
||||
|
|
||||
[1] <https://sourceforge.net/tracker/?func=detail&aid=3056687&group_id=40830&atid=429073> |
|
||||
|
|
||||
|
|
||||
Solaris / SunOS |
|
||||
--------------- |
|
||||
|
|
||||
Some older version of this operating system might have problems |
|
||||
linking log4cplus due to missing __tls_get_addr ([1]) in their |
|
||||
unpatched state. |
|
||||
|
|
||||
[1] <https://groups.google.com/d/msg/comp.unix.solaris/AAMqkK0QZ6U/zlkVKA1L_QcJ> |
|
||||
|
|
||||
|
|
||||
Solaris Studio |
|
||||
-------------- |
|
||||
|
|
||||
Solaris Studio compilers' default standard C++ library is very |
|
||||
non-standard. It seems that it is not conforming enough in, e.g., Sun |
|
||||
C++ 5.12 Linux_i386 2011/11/16 (missing std::time_t, etc.), but it |
|
||||
works well enough on Solaris with Sun C++ 5.8 2005/10/13. Thus |
|
||||
log4cplus adds -library=stlport4 to the CXXFLAGS environment variable, |
|
||||
unless a switch matching -library=(stlport4|stdcxx4|Cstd) is already |
|
||||
present there. If you want to override the default supplied by |
|
||||
log4cplus, just set it into CXXFLAGS on configure script command line. |
|
||||
|
|
||||
Solaris Studio supports the __func__ symbol which can be used by |
|
||||
log4cplus to record function name in logged events. To enable this |
|
||||
feature, add '-features=extensions' switch to CXXFLAGS for configure |
|
||||
script. Subsequently, you will have to add this switch to your |
|
||||
application's build flags as well. |
|
||||
|
|
||||
|
|
||||
Solaris Studio on GNU/Linux |
|
||||
--------------------------- |
|
||||
|
|
||||
The autotools and our configure.in combo does not handle Solaris |
|
||||
Studio compiler on Linux well enough and needs a little help with |
|
||||
configuration of POSIX threads: |
|
||||
|
|
||||
$ COMMON_FLAGS="-L/lib/x86_64-linux-gnu/ -L/usr/lib/x86_64-linux-gnu/ \ |
|
||||
-mt=yes -O" |
|
||||
|
|
||||
$ ../configure --enable-threads=yes CC=/opt/solarisstudio12.3/bin/cc \ |
|
||||
CXX=/opt/solarisstudio12.3/bin/CC CFLAGS="$COMMON_FLAGS" \ |
|
||||
CXXFLAGS="$COMMON_FLAGS" LDFLAGS="-lpthread" |
|
||||
|
|
||||
|
|
||||
Qt / Win32 / MSVC |
|
||||
----------------- |
|
||||
|
|
||||
In order to use log4cplus in Qt programs it is necessary to set |
|
||||
following option: |
|
||||
|
|
||||
Treat WChar_t As Built in Type: No (/Zc:wchar_t-) |
|
||||
|
|
||||
Set this option for log4cplus project and Qt4DebugAppender project in |
|
||||
MS Visual Studio. Remember to use Unicode versions of log4cplus |
|
||||
libraries with Qt. It is also necessary to make clear distinction |
|
||||
between debug and release builds of Qt project and log4cplus. Do not |
|
||||
use log4cplus release library with debug version of Qt program or vice |
|
||||
versa. |
|
||||
|
|
||||
For registering Qt4DebugAppender library at run-time call this method: |
|
||||
|
|
||||
log4cplus::Qt4DebugAppender::registerAppender() ; |
|
||||
|
|
||||
Add these lines to qmake project file for using log4cplus and |
|
||||
Qt4DebugAppender: |
|
||||
|
|
||||
INCLUDEPATH += C:\log4cplus\include |
|
||||
win32 { |
|
||||
CONFIG(debug, debug|release) { |
|
||||
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Debug_Unicode -llog4cplusUD |
|
||||
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Debug_Unicode -llog4cplus-Qt4DebugAppender |
|
||||
} else { |
|
||||
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Release_Unicode -llog4cplusU |
|
||||
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Release_Unicode -llog4cplus-Qt4DebugAppender |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
|
|
||||
LOG4CPLUS_*_FMT() and UNICODE |
|
||||
----------------------------- |
|
||||
|
|
||||
Beware, the %s specifier does not work the same way on *NIX as it does |
|
||||
on Windows with Visual Studio. With Visual Studio the %s specifier |
|
||||
changes its meaning conveniently by printing wchar_t string when used |
|
||||
with wprintf() and char strings when used with wprintf(). On the |
|
||||
other hand, *NIX keeps the meaning of printing char strings when used |
|
||||
with both wprintf() and printf(). It is necessary to use %ls (C99) |
|
||||
specifier or %S (SUSv2) specifier to print wchar_t strings on *NIX. |
|
||||
|
|
||||
The common ground for both platforms appears to be use of %ls and |
|
||||
wchar_t string to print strings with unmodified formatting string |
|
||||
argument on both *NIX and Windows. The conversion of wchar_t back to |
|
||||
char then depends on C locale. |
|
||||
|
|
||||
|
|
||||
C++11 support |
|
||||
------------- |
|
||||
|
|
||||
log4cplus contains small amount of code that uses C++11 (ISO/IEC |
|
||||
14882:2011 standard) language features. C++11 features are used only |
|
||||
if C++11 support is detected during compile time. Compiling log4cplus |
|
||||
with C++11 compiler and standard library and using it with C++03 |
|
||||
(ISO/IEC 14882:2003 standard) application is not supported. |
|
||||
|
|
||||
|
|
||||
Unsupported compilers |
|
||||
--------------------- |
|
||||
|
|
||||
log4cplus does not support too old or broken C++ compilers: |
|
||||
|
|
||||
- Visual C++ prior to 7.1 |
|
||||
- GCC prior to 3.2 |
|
||||
- All Borland/CodeGear/Embarcadero C++ compilers |
|
||||
|
|
||||
|
|
||||
Unsupported platforms |
|
||||
--------------------- |
|
||||
|
|
||||
log4cplus requires some minimal set of C and/or C++ library |
|
||||
functions. Some systems/platforms fail to provide these functions and |
|
||||
thus log4cplus cannot be supported there: |
|
||||
|
|
||||
- Windows CE - missing implementations of <time.h> functions |
|
||||
|
|
||||
|
|
||||
License |
|
||||
======= |
|
||||
|
|
||||
This library is licensed under the Apache Public License 2.0 and two |
|
||||
clause BSD license. Please read the included LICENSE file for |
|
||||
details. |
|
@ -1,5 +0,0 @@ |
|||||
revision-id: wilx@users.sourceforge.net-20130703203528-azbt415tvzqnd83l |
|
||||
date: 2013-07-03 22:35:28 +0200 |
|
||||
build-date: 2013-07-03 22:40:14 +0200 |
|
||||
revno: 982 |
|
||||
branch-nick: 1.1.x |
|
@ -1,480 +0,0 @@ |
|||||
/* include/log4cplus/config.h. Generated from config.h.in by configure. */ |
|
||||
/* include/log4cplus/config.h.in. Generated from configure.ac by autoheader. */ |
|
||||
|
|
||||
#ifndef LOG4CPLUS_CONFIG_H |
|
||||
|
|
||||
#define LOG4CPLUS_CONFIG_H |
|
||||
|
|
||||
/* Defined if the compiler supports C99 style variadic macros with |
|
||||
__VA_ARGS__. */ |
|
||||
/* #undef HAS_C99_VARIADIC_MACROS */ |
|
||||
|
|
||||
/* Defined if the compiler supports GNU style variadic macros. */ |
|
||||
/* #undef HAS_GNU_VARIADIC_MACROS */ |
|
||||
|
|
||||
/* Define to 1 if you have the `clock_gettime' function. */ |
|
||||
#define HAVE_CLOCK_GETTIME 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `clock_nanosleep' function. */ |
|
||||
#define HAVE_CLOCK_NANOSLEEP 1 |
|
||||
|
|
||||
/* Defined if the compiler provides C++11 <atomic> header and increment, |
|
||||
decrement operations. */ |
|
||||
/* #undef HAVE_CXX11_ATOMICS */ |
|
||||
|
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
|
||||
#define HAVE_DLFCN_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `fcntl' function. */ |
|
||||
#define HAVE_FCNTL 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `flock' function. */ |
|
||||
#define HAVE_FLOCK 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `ftime' function. */ |
|
||||
#define HAVE_FTIME 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define HAVE_GETADDRINFO 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define HAVE_GETHOSTBYNAME_R 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `getpid' function. */ |
|
||||
#define HAVE_GETPID 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `gettimeofday' function. */ |
|
||||
#define HAVE_GETTIMEOFDAY 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `gmtime_r' function. */ |
|
||||
#define HAVE_GMTIME_R 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `htonl' function. */ |
|
||||
#define HAVE_HTONL 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `htons' function. */ |
|
||||
#define HAVE_HTONS 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `iconv' function. */ |
|
||||
/* #undef HAVE_ICONV */ |
|
||||
|
|
||||
/* Define to 1 if you have the `iconv_close' function. */ |
|
||||
/* #undef HAVE_ICONV_CLOSE */ |
|
||||
|
|
||||
/* Define to 1 if you have the `iconv_open' function. */ |
|
||||
/* #undef HAVE_ICONV_OPEN */ |
|
||||
|
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */ |
|
||||
#define HAVE_INTTYPES_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `advapi32' library (-ladvapi32). */ |
|
||||
/* #undef HAVE_LIBADVAPI32 */ |
|
||||
|
|
||||
/* Define to 1 if you have the `libiconv' function. */ |
|
||||
/* #undef HAVE_LIBICONV */ |
|
||||
|
|
||||
/* Define to 1 if you have the `libiconv_close' function. */ |
|
||||
/* #undef HAVE_LIBICONV_CLOSE */ |
|
||||
|
|
||||
/* Define to 1 if you have the `libiconv_open' function. */ |
|
||||
/* #undef HAVE_LIBICONV_OPEN */ |
|
||||
|
|
||||
/* Define to 1 if you have the `kernel32' library (-lkernel32). */ |
|
||||
/* #undef HAVE_LIBKERNEL32 */ |
|
||||
|
|
||||
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ |
|
||||
/* #undef HAVE_LIBWS2_32 */ |
|
||||
|
|
||||
/* Define to 1 if you have the `localtime_r' function. */ |
|
||||
#define HAVE_LOCALTIME_R 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `lockf' function. */ |
|
||||
#define HAVE_LOCKF 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `lstat' function. */ |
|
||||
#define HAVE_LSTAT 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `mbstowcs' function. */ |
|
||||
#define HAVE_MBSTOWCS 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <memory.h> header file. */ |
|
||||
#define HAVE_MEMORY_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `nanosleep' function. */ |
|
||||
#define HAVE_NANOSLEEP 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `ntohl' function. */ |
|
||||
#define HAVE_NTOHL 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `ntohs' function. */ |
|
||||
#define HAVE_NTOHS 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `pipe' function. */ |
|
||||
#define HAVE_PIPE 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `pipe2' function. */ |
|
||||
#define HAVE_PIPE2 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `poll' function. */ |
|
||||
#define HAVE_POLL 1 |
|
||||
|
|
||||
/* Define if you have POSIX threads libraries and header files. */ |
|
||||
#define HAVE_PTHREAD 1 |
|
||||
|
|
||||
/* Have PTHREAD_PRIO_INHERIT. */ |
|
||||
#define HAVE_PTHREAD_PRIO_INHERIT 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `stat' function. */ |
|
||||
#define HAVE_STAT 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <stdint.h> header file. */ |
|
||||
#define HAVE_STDINT_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */ |
|
||||
#define HAVE_STDLIB_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <strings.h> header file. */ |
|
||||
#define HAVE_STRINGS_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <string.h> header file. */ |
|
||||
#define HAVE_STRING_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
|
||||
#define HAVE_SYS_STAT_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */ |
|
||||
#define HAVE_SYS_TYPES_H 1 |
|
||||
|
|
||||
/* Defined if the compiler understands __thread or __declspec(thread) |
|
||||
construct. */ |
|
||||
#define HAVE_TLS_SUPPORT 1 |
|
||||
|
|
||||
/* Define to 1 if you have the <unistd.h> header file. */ |
|
||||
#define HAVE_UNISTD_H 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `vfprintf_s' function. */ |
|
||||
/* #undef HAVE_VFPRINTF_S */ |
|
||||
|
|
||||
/* Define to 1 if you have the `vfwprintf_s' function. */ |
|
||||
/* #undef HAVE_VFWPRINTF_S */ |
|
||||
|
|
||||
/* Define to 1 if you have the `vsnprintf' function. */ |
|
||||
#define HAVE_VSNPRINTF 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `vsnwprintf' function. */ |
|
||||
/* #undef HAVE_VSNWPRINTF */ |
|
||||
|
|
||||
/* Define to 1 if you have the `vsprintf_s' function. */ |
|
||||
/* #undef HAVE_VSPRINTF_S */ |
|
||||
|
|
||||
/* Define to 1 if you have the `vswprintf_s' function. */ |
|
||||
/* #undef HAVE_VSWPRINTF_S */ |
|
||||
|
|
||||
/* Define to 1 if you have the `wcstombs' function. */ |
|
||||
#define HAVE_WCSTOMBS 1 |
|
||||
|
|
||||
/* Define to 1 if you have the `_vsnprintf_s' function. */ |
|
||||
/* #undef HAVE__VSNPRINTF_S */ |
|
||||
|
|
||||
/* Define to 1 if you have the `_vsnwprintf' function. */ |
|
||||
/* #undef HAVE__VSNWPRINTF */ |
|
||||
|
|
||||
/* Define to 1 if you have the `_vsnwprintf_s' function. */ |
|
||||
/* #undef HAVE__VSNWPRINTF_S */ |
|
||||
|
|
||||
/* Defined if the compiler supports __FUNCTION__ macro. */ |
|
||||
/* #undef HAVE___FUNCTION___MACRO */ |
|
||||
|
|
||||
/* Defined if the compiler supports __func__ symbol. */ |
|
||||
/* #undef HAVE___FUNC___SYMBOL */ |
|
||||
|
|
||||
/* Defined if the compiler supports __PRETTY_FUNCTION__ macro. */ |
|
||||
/* #undef HAVE___PRETTY_FUNCTION___MACRO */ |
|
||||
|
|
||||
/* Defined if the compiler provides __sync_add_and_fetch(). */ |
|
||||
#define HAVE___SYNC_ADD_AND_FETCH 1 |
|
||||
|
|
||||
/* Defined if the compiler provides __sync_sub_and_fetch(). */ |
|
||||
#define HAVE___SYNC_SUB_AND_FETCH 1 |
|
||||
|
|
||||
/* Defined for --enable-debugging builds. */ |
|
||||
/* #undef LOG4CPLUS_DEBUGGING */ |
|
||||
|
|
||||
/* Defined if the compiler understands __declspec(dllimport) or |
|
||||
__attribute__((visibility("default"))) or __global construct. */ |
|
||||
#define LOG4CPLUS_DECLSPEC_EXPORT __attribute__ ((visibility("default"))) |
|
||||
|
|
||||
/* Defined if the compiler understands __declspec(dllimport) or |
|
||||
__attribute__((visibility("default"))) or __global construct. */ |
|
||||
#define LOG4CPLUS_DECLSPEC_IMPORT __attribute__ ((visibility("default"))) |
|
||||
|
|
||||
/* Defined if the compiler understands __attribute__((visibility("hidden"))) |
|
||||
or __hidden construct. */ |
|
||||
#define LOG4CPLUS_DECLSPEC_PRIVATE __attribute__ ((visibility("hidden"))) |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_ARPA_INET_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_C99_VARIADIC_MACROS 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_CLOCK_GETTIME 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_CLOCK_NANOSLEEP 1 |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_CXX11_ATOMICS */ |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_ENAMETOOLONG 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_ERRNO_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_FCNTL 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_FCNTL_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_FLOCK 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_FTIME 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_FUNCTION_MACRO 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_FUNC_SYMBOL 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_GETADDRINFO 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_GETPID 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_GETTID 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_GETTIMEOFDAY 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_GMTIME_R 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_GNU_VARIADIC_MACROS 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_HTONL 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_HTONS 1 |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_ICONV */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_ICONV_CLOSE */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_ICONV_H */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_ICONV_OPEN */ |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_LIMITS_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_LOCALTIME_R 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_LOCKF 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_LSTAT 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_MBSTOWCS 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_NANOSLEEP 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_NETDB_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_NETINET_IN_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_NETINET_TCP_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_NTOHL 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_NTOHS 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_PIPE 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_PIPE2 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_POLL 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_POLL_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_STAT 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_STDARG_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_STDIO_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_STDLIB_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYSLOG_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYS_FILE_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYS_SOCKET_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYS_STAT_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYS_SYSCALL_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYS_TIMEB_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYS_TIME_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_SYS_TYPES_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_TIME_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_TLS_SUPPORT 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_UNISTD_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_VFPRINTF_S */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_VFWPRINTF_S */ |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_VSNPRINTF 1 |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_VSNWPRINTF */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_VSPRINTF_S */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE_VSWPRINTF_S */ |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_WCHAR_H 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE_WCSTOMBS 1 |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE__VSNPRINTF_S */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE__VSNWPRINTF */ |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_HAVE__VSNWPRINTF_S */ |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH 1 |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_HAVE___SYNC_SUB_AND_FETCH 1 |
|
||||
|
|
||||
/* Define if this is a single-threaded library. */ |
|
||||
/* #undef LOG4CPLUS_SINGLE_THREADED */ |
|
||||
|
|
||||
/* */ |
|
||||
#define LOG4CPLUS_THREAD_LOCAL_VAR __thread |
|
||||
|
|
||||
/* */ |
|
||||
/* #undef LOG4CPLUS_USE_PTHREADS */ |
|
||||
|
|
||||
/* Define when iconv() is available. */ |
|
||||
/* #undef LOG4CPLUS_WITH_ICONV */ |
|
||||
|
|
||||
/* Define for C99 compilers/standard libraries that support more than just the |
|
||||
"C" locale. */ |
|
||||
/* #undef LOG4CPLUS_WORKING_C_LOCALE */ |
|
||||
|
|
||||
/* Define for compilers/standard libraries that support more than just the "C" |
|
||||
locale. */ |
|
||||
/* #undef LOG4CPLUS_WORKING_LOCALE */ |
|
||||
|
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries. |
|
||||
*/ |
|
||||
#define LT_OBJDIR ".libs/" |
|
||||
|
|
||||
/* Define to the address where bug reports for this package should be sent. */ |
|
||||
#define PACKAGE_BUGREPORT "" |
|
||||
|
|
||||
/* Define to the full name of this package. */ |
|
||||
#define PACKAGE_NAME "log4cplus" |
|
||||
|
|
||||
/* Define to the full name and version of this package. */ |
|
||||
#define PACKAGE_STRING "log4cplus 1.1.2" |
|
||||
|
|
||||
/* Define to the one symbol short name of this package. */ |
|
||||
#define PACKAGE_TARNAME "log4cplus" |
|
||||
|
|
||||
/* Define to the home page for this package. */ |
|
||||
#define PACKAGE_URL "" |
|
||||
|
|
||||
/* Define to the version of this package. */ |
|
||||
#define PACKAGE_VERSION "1.1.2" |
|
||||
|
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on |
|
||||
your system. */ |
|
||||
/* #undef PTHREAD_CREATE_JOINABLE */ |
|
||||
|
|
||||
/* Define to 1 if you have the ANSI C header files. */ |
|
||||
#define STDC_HEADERS 1 |
|
||||
|
|
||||
/* Defined to the actual TLS support construct. */ |
|
||||
#define TLS_SUPPORT_CONSTRUCT __thread |
|
||||
|
|
||||
/* Substitute for socklen_t */ |
|
||||
/* #undef socklen_t */ |
|
||||
|
|
||||
#endif // LOG4CPLUS_CONFIG_H |
|
@ -1 +0,0 @@ |
|||||
timestamp for include/log4cplus/config/defines.hxx |
|
@ -1 +0,0 @@ |
|||||
3858234c9554d6aed44d7ccac31463873c7660c7 |
|
@ -1 +0,0 @@ |
|||||
a1a66acb913f8d53f093fa4dcd9be97a3a7dce9a |
|
@ -1,41 +0,0 @@ |
|||||
# liblog4cplus.la - a libtool library file |
|
||||
# Generated by libtool (GNU libtool) 2.4.2 |
|
||||
# |
|
||||
# Please DO NOT delete this file! |
|
||||
# It is necessary for linking the library. |
|
||||
|
|
||||
# The name that we can dlopen(3). |
|
||||
dlname='liblog4cplus-1.1.so.7' |
|
||||
|
|
||||
# Names of this library. |
|
||||
library_names='liblog4cplus-1.1.so.7.1.1 liblog4cplus-1.1.so.7 liblog4cplus.so' |
|
||||
|
|
||||
# The name of the static archive. |
|
||||
old_library='liblog4cplus.a' |
|
||||
|
|
||||
# Linker flags that can not go in dependency_libs. |
|
||||
inherited_linker_flags='' |
|
||||
|
|
||||
# Libraries that this one depends upon. |
|
||||
dependency_libs=' -lrt' |
|
||||
|
|
||||
# Names of additional weak libraries provided by this library |
|
||||
weak_library_names='' |
|
||||
|
|
||||
# Version information for liblog4cplus. |
|
||||
current=8 |
|
||||
age=1 |
|
||||
revision=1 |
|
||||
|
|
||||
# Is this an already installed library? |
|
||||
installed=no |
|
||||
|
|
||||
# Should we warn about portability when linking against -modules? |
|
||||
shouldnotlink=no |
|
||||
|
|
||||
# Files to dlopen/dlpreopen |
|
||||
dlopen='' |
|
||||
dlpreopen='' |
|
||||
|
|
||||
# Directory that this library needs to be installed in: |
|
||||
libdir='/usr/local/lib' |
|
@ -0,0 +1,15 @@ |
|||||
|
;;; Directory Local Variables |
||||
|
;;; See Info node `(emacs) Directory Variables' for more information. |
||||
|
|
||||
|
((nil |
||||
|
(fill-column . 79) |
||||
|
(indent-tabs-mode) |
||||
|
(show-trailing-whitespace . t) |
||||
|
(whitespace-style face trailing lines-tail space-before-tab indentation empty) |
||||
|
(whitespace-newline . t)) |
||||
|
(c++-mode |
||||
|
(tab-width . 4) |
||||
|
(whitespace-action warn-read-only auto-cleanup)) |
||||
|
(cmake-mode |
||||
|
(whitespace-action warn-read-only auto-cleanup))) |
||||
|
|
@ -1,3 +1,67 @@ |
|||||
|
log4cplus 1.1.3-RC1 |
||||
|
|
||||
|
- Added --enable-symbols-visibility-options to configure script to allow |
||||
|
turning off use of compiler and platform specific symbols visibility |
||||
|
options. |
||||
|
|
||||
|
- Added ENABLE_SYMBOLS_VISIBILITY setting for CMake build system to the same |
||||
|
effect as above. |
||||
|
|
||||
|
- Disabled LOG4CPLUS_INLINES_ARE_EXPORTED to fix linking issues on MinGW GCC |
||||
|
4.8.x. |
||||
|
|
||||
|
- Added LOG4CPLUS_BUILD_LOGGINGSERVER setting for CMake build system to allow |
||||
|
disabling loggingserver. (Maxym) |
||||
|
|
||||
|
- Allow users overriding LOG4CPLUS_MACRO_FUNCTION. |
||||
|
|
||||
|
- Improved Android platform detection in CMake build system. (Maxym) |
||||
|
|
||||
|
- Allow overriding ConfigureChecks.cmake with user supplied file to help with |
||||
|
issues on iOS platform. |
||||
|
|
||||
|
- Updated android.toolchain.cmake from OpenCV project. |
||||
|
|
||||
|
- Added iOS support to CMake build system. (Maxym) |
||||
|
|
||||
|
- Fixed compilation issue of single-threaded builds on Windows. |
||||
|
|
||||
|
- Improved CMake build system's default installation directories for GNU |
||||
|
platforms by using GNUInstallDirs module. |
||||
|
|
||||
|
|
||||
|
log4cplus 1.1.2 |
||||
|
|
||||
|
- Added AbstractSocket::shutdown(). |
||||
|
|
||||
|
- Added missing documentation of MDC pattern layout converter. |
||||
|
|
||||
|
- Fixed bug #278 - TLS key leak. |
||||
|
|
||||
|
- Implemented %E{ENVVAR} pattern layout formatter for expansion of environment |
||||
|
variables. (Ray Logel) |
||||
|
|
||||
|
|
||||
|
log4cplus 1.1.2-RC3 |
||||
|
|
||||
|
- Fixed build issues on HP-UX with aCC. |
||||
|
|
||||
|
- Fixed build issues on Haiku. |
||||
|
|
||||
|
- Added mingw-log4cplus.spec to allow cross-compilation from |
||||
|
Fedora. (John Smits) |
||||
|
|
||||
|
- Fixed build issues on AIX with XLC. |
||||
|
|
||||
|
- Fixed build issues related to Microsoft's foo_s() functions with |
||||
|
some version of MinGW tool-chain. |
||||
|
|
||||
|
- Tiny speedup of getFormattedTime(). |
||||
|
|
||||
|
- Imported newer android/android.toolchain.cmake from OpenCV |
||||
|
repository. |
||||
|
|
||||
|
|
||||
log4cplus 1.1.2-RC2 |
log4cplus 1.1.2-RC2 |
||||
|
|
||||
- Fixed crash of DLL builds on Windows when _WIN32_WINNT>=0x0600. |
- Fixed crash of DLL builds on Windows when _WIN32_WINNT>=0x0600. |
@ -0,0 +1,424 @@ |
|||||
|
% log4cplus README |
||||
|
|
||||
|
Short Description |
||||
|
================= |
||||
|
|
||||
|
log4cplus is a simple to use C++ logging API providing thread-safe, |
||||
|
flexible, and arbitrarily granular control over log management and |
||||
|
configuration. It is modeled after the Java log4j API. |
||||
|
|
||||
|
|
||||
|
Latest Project Information |
||||
|
========================== |
||||
|
|
||||
|
The latest up-to-date information for this project can be found at |
||||
|
[log4cplus.sourceforge.net](http://log4cplus.sourceforge.net). Please |
||||
|
submit bugs, patches, feature requests, etc., there. |
||||
|
|
||||
|
|
||||
|
Tested on the following platforms |
||||
|
================================= |
||||
|
|
||||
|
- Linux/AMD64 with GCC 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) |
||||
|
- Linux/AMD64 with Sun C++ 5.12 Linux_i386 2011/11/16 |
||||
|
- Linux/AMD64 with Clang version 3.2-1~exp9ubuntu1 |
||||
|
(tags/RELEASE_32/final) (based on LLVM 3.2) |
||||
|
- Linux/AMD64 with Intel(R) C++ Intel(R) 64 Compiler XE for |
||||
|
applications running on Intel(R) 64, Version 12.1 Build 20120410 |
||||
|
- FreeBSD/AMD64 with GCC 3.4.6, 4.2.1 and 4.3.3 |
||||
|
- Windows 7 with MS Visual C++ 10.0 |
||||
|
- OpenSolaris 5.11 with Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21, |
||||
|
with -library=stlport4 |
||||
|
- Solaris 5.10 with Sun C++ 5.8 2005/10/13, with -library=stlport4 |
||||
|
- NetBSD 5.0.2/AMD64 with GCC 4.1.3 20080704 prerelease (NetBSD nb2 |
||||
|
20081120) |
||||
|
- OpenBSD 5.0/AMD64 with GCC 4.2.1 20070719 |
||||
|
- Haiku R1 Alpha 4.1 with GCC 4.6.3 |
||||
|
|
||||
|
|
||||
|
Configure script options |
||||
|
======================== |
||||
|
|
||||
|
`--enable-debugging` |
||||
|
-------------------- |
||||
|
|
||||
|
This option is disabled by default. This option mainly affects GCC |
||||
|
builds but it also has some limited effect on non-GCC builds. It |
||||
|
turns on debugging information generation, undefines `NDEBUG` symbol |
||||
|
and adds `-fstack-check` (GCC). |
||||
|
|
||||
|
|
||||
|
`--enable-warnings` |
||||
|
------------------- |
||||
|
|
||||
|
This option is enabled by default. It adds platform / compiler |
||||
|
dependent warning options to compiler command line. |
||||
|
|
||||
|
|
||||
|
`--enable-so-version` |
||||
|
--------------------- |
||||
|
|
||||
|
This option is enabled by default. It enables SO version decoration |
||||
|
on resulting library file, e.g., the `.2.0.0` in |
||||
|
`liblog4cplus-1.2.so.2.0.0`. |
||||
|
|
||||
|
|
||||
|
`--enable-release-version` |
||||
|
-------------------------- |
||||
|
|
||||
|
This option is enabled by default. It enables release version |
||||
|
decoration on the resulting library file, e.g., the `-1.2` in |
||||
|
`liblog4cplus-1.2.so.2.0.0`. |
||||
|
|
||||
|
|
||||
|
`--enable-symbols-visibility-options` |
||||
|
------------------------------------- |
||||
|
|
||||
|
This option is enabled by default. It enables use of compiler and |
||||
|
platform specific option for symbols visibility. See also the |
||||
|
[Visibility](http://gcc.gnu.org/wiki/Visibility) page on GCC Wiki. |
||||
|
|
||||
|
|
||||
|
`--enable-profiling` |
||||
|
-------------------- |
||||
|
|
||||
|
This option is disabled by default. This option adds profiling |
||||
|
information generation compiler option `-pg` to GCC and Sun CC / |
||||
|
Solaris Studio builds. |
||||
|
|
||||
|
|
||||
|
`--enable-threads` |
||||
|
------------------ |
||||
|
|
||||
|
This option is enabled by default. It turns on detection of necessary |
||||
|
compiler and linker flags that enable POSIX threading support. |
||||
|
|
||||
|
While this detection usually works well, some platforms still need |
||||
|
help with configuration by supplying additional flags to the configure |
||||
|
script. One of the know deficiencies is Solaris Studio on Linux. See |
||||
|
one of the later note for details. |
||||
|
|
||||
|
|
||||
|
`--with-working-locale` |
||||
|
----------------------- |
||||
|
|
||||
|
This is one of three locale and `wchar_t` <-> `char` conversion |
||||
|
related options. It is disabled by default. |
||||
|
|
||||
|
It is know to work well with GCC on Linux. Other platforms generally |
||||
|
have lesser locale support in their implementations of the C++ |
||||
|
standard library. It is known not to work well on any BSDs. |
||||
|
|
||||
|
See also docs/unicode.txt. |
||||
|
|
||||
|
|
||||
|
`--with-working-c-locale` |
||||
|
------------------------- |
||||
|
|
||||
|
This is second of `wchar_t` <-> `char` conversion related options. It |
||||
|
is disabled by default. |
||||
|
|
||||
|
It is known to work well on most Unix--like platforms, including |
||||
|
recent Cygwin. |
||||
|
|
||||
|
|
||||
|
`--with-iconv` |
||||
|
-------------- |
||||
|
|
||||
|
This is third of `wchar_t` <-> `char` conversion related options. It is |
||||
|
disabled by default. |
||||
|
|
||||
|
The conversion using iconv() function always uses `"UTF-8"` and |
||||
|
`"WCHAR_T"` as source/target encoding. It is known to work well on |
||||
|
platforms with GNU iconv. Different implementations of `iconv()` |
||||
|
might not support `"WCHAR_T"` encoding selector. |
||||
|
|
||||
|
Either system provided `iconv()` or library provided `libiconv()` are |
||||
|
detected and accepted. Also both SUSv3 and GNU `iconv()` function |
||||
|
signatures are accepted. |
||||
|
|
||||
|
|
||||
|
`--with-qt` |
||||
|
----------- |
||||
|
|
||||
|
This option is disabled by default. It enables compilation of a |
||||
|
separate shared library (liblog4cplusqt4debugappender) that implements |
||||
|
`Qt4DebugAppender`. It requires Qt4 and pkg-config to be installed. |
||||
|
|
||||
|
|
||||
|
Notes |
||||
|
===== |
||||
|
|
||||
|
Cygwin/MinGW |
||||
|
------------ |
||||
|
|
||||
|
Some version of GCC (3.4.x and probably some of 4.x series too) on |
||||
|
Windows (both Mingw and Cygwin) produces lots of warnings of the form: |
||||
|
|
||||
|
> warning: inline function 'void foo()' is declared as dllimport: |
||||
|
attribute ignored |
||||
|
|
||||
|
This can be worked around by adding `-Wno-attributes` option to GCC |
||||
|
command. Unfortunately, not all affected version of GCC have this |
||||
|
option. |
||||
|
|
||||
|
|
||||
|
MinGW and MSVCRT version |
||||
|
------------------------ |
||||
|
|
||||
|
log4cplus can use functions like `_vsnprintf_s()` (Microsoft's secure |
||||
|
version of `vsnprintf()`). MinGW tool--chains (by default) link to the |
||||
|
system MSVCRT.DLL. Unfortunately, older systems, like Windows XP, ship |
||||
|
with MSVCRT.DLL that lacks these functions. It is possible to compile |
||||
|
log4cplus with MinGW tool--chains but _without_ using the Microsoft's |
||||
|
secure functions by defining `__MSVCRT_VERSION__` to value less than |
||||
|
`0x900` and vice versa. |
||||
|
|
||||
|
$ ../configure CPPFLAGS="-D__MSVCRT_VERSION__=0x700" |
||||
|
|
||||
|
|
||||
|
Windows and TLS |
||||
|
--------------- |
||||
|
|
||||
|
log4cplus uses thread-local storage (TLS) for NDC, MDC and to optimize |
||||
|
use of some temporary objects. On Windows there are two ways to get |
||||
|
TLS: |
||||
|
|
||||
|
(1) using `TlsAlloc()`, etc., functions |
||||
|
(2) using `__declspec(thread)` |
||||
|
|
||||
|
While method (2) generates faster code, it has some limitations prior |
||||
|
to Windows Vista. If log4cplus.dll is loaded at run time using |
||||
|
`LoadLibrary()` (or as a dependency of such loaded library), then |
||||
|
accessing `__declspec(thread)` variables can cause general protection |
||||
|
fault (GPF) errors. This is because Windows prior to Windows Vista do |
||||
|
not extend the TLS for libraries loaded at run time using |
||||
|
LoadLibrary(). To allow using the best available method, log4cplus |
||||
|
enables the method (2) by checking `_WIN32_WINNT >= 0x0600` condition, |
||||
|
when compiling log4cplus targeted to Windows Vista or later. |
||||
|
|
||||
|
|
||||
|
Threads and signals |
||||
|
------------------- |
||||
|
|
||||
|
log4cplus is not safe to be used from asynchronous signals' handlers. |
||||
|
This is a property of most threaded programmes in general. If you are |
||||
|
going to use log4cplus in threaded application and if you want to use |
||||
|
log4cplus from signal handlers then your only option is to block |
||||
|
signals in all threads but one that will handle all signals. On POSIX |
||||
|
platforms, this is possible using the `sigwait()` call. log4cplus |
||||
|
enables this approach by blocking all signals in any threads created |
||||
|
through its threads helpers. |
||||
|
|
||||
|
|
||||
|
IBM's XL C/C++ compiler |
||||
|
----------------------- |
||||
|
|
||||
|
IBM's XL C/C++ compiler executable has [many variants][1]. To compile |
||||
|
log4cplus with threading support specify one of the compiler variants |
||||
|
that support threading using the `CXX` variable on configure script |
||||
|
command line. E.g.: |
||||
|
|
||||
|
$ ../configure --enable-threads CXX=xlC_r |
||||
|
|
||||
|
[1]: http://pic.dhe.ibm.com/infocenter/comphelp/v121v141/index.jsp?topic=%2Fcom.ibm.xlcpp121.aix.doc%2Fcompiler_ref%2Ftucmpinv.html |
||||
|
|
||||
|
|
||||
|
AIX reentrancy problem |
||||
|
---------------------- |
||||
|
|
||||
|
There appears to be a reentracy problem with AIX 5.3 and xlC 8 which |
||||
|
can result into a deadlock condition in some circumstances. It is |
||||
|
unknown whether the problem manifests with other versions of either |
||||
|
the OS or the compiler, too. The problem was initially reported in a |
||||
|
bug report [#103][2]. |
||||
|
|
||||
|
The core of the problem is that IBM's/xlC's standard C++ IOStreams |
||||
|
implementation uses global non recursive lock to protect some of its |
||||
|
state. The application in the bug report was trying to do logging |
||||
|
using log4cplus from inside `overflow()` member function of a class |
||||
|
derived from `std::streambuf` class. log4cplus itself uses |
||||
|
`std::ostringstream`. This resulted into an attempt to recursively |
||||
|
lock the global non recursive lock and a deadlock. |
||||
|
|
||||
|
[2]: http://sourceforge.net/p/log4cplus/bugs/103/ |
||||
|
|
||||
|
|
||||
|
Solaris / SunOS |
||||
|
--------------- |
||||
|
|
||||
|
Some older version of this operating system might have problems |
||||
|
linking log4cplus due to [missing `__tls_get_addr`][3] in their |
||||
|
unpatched state. |
||||
|
|
||||
|
[3]: https://groups.google.com/d/msg/comp.unix.solaris/AAMqkK0QZ6U/zlkVKA1L_QcJ |
||||
|
|
||||
|
|
||||
|
Solaris Studio |
||||
|
-------------- |
||||
|
|
||||
|
Solaris Studio compilers' default standard C++ library is very |
||||
|
non-standard. It seems that it is not conforming enough in, e.g., Sun |
||||
|
C++ 5.12 Linux_i386 2011/11/16 (missing `std::time_t`, etc.), but it |
||||
|
works well enough on Solaris with Sun C++ 5.8 2005/10/13. Thus |
||||
|
log4cplus adds `-library=stlport4` to the `CXXFLAGS` environment |
||||
|
variable, unless a switch matching `-library=(stlport4|stdcxx4|Cstd)` |
||||
|
is already present there. If you want to override the default |
||||
|
supplied by log4cplus, just set it into `CXXFLAGS` on configure script |
||||
|
command line. |
||||
|
|
||||
|
Solaris Studio supports the `__func__` symbol which can be used by |
||||
|
log4cplus to record function name in logged events. To enable this |
||||
|
feature, add `-features=extensions` switch to `CXXFLAGS` for configure |
||||
|
script. Subsequently, you will have to add this switch to your |
||||
|
application's build flags as well. |
||||
|
|
||||
|
|
||||
|
Solaris Studio on GNU/Linux |
||||
|
--------------------------- |
||||
|
|
||||
|
The autotools and our configure.ac combo does not handle Solaris |
||||
|
Studio compiler on Linux well enough and needs a little help with |
||||
|
configuration of POSIX threads: |
||||
|
|
||||
|
$ COMMON_FLAGS="-L/lib/x86_64-linux-gnu/ \ |
||||
|
-L/usr/lib/x86_64-linux-gnu/ -mt=yes -O" |
||||
|
|
||||
|
$ ../configure --enable-threads=yes \ |
||||
|
CC=/opt/solarisstudio12.3/bin/cc \ |
||||
|
CXX=/opt/solarisstudio12.3/bin/CC \ |
||||
|
CFLAGS="$COMMON_FLAGS" \ |
||||
|
CXXFLAGS="$COMMON_FLAGS" \ |
||||
|
LDFLAGS="-lpthread" |
||||
|
|
||||
|
|
||||
|
HP-UX with aCC |
||||
|
-------------- |
||||
|
|
||||
|
It is necessary to turn on C++98 mode of aCC by providing the `-AA` flag: |
||||
|
|
||||
|
$ ../configure --enable-threads=yes CXXFLAGS="-AA" |
||||
|
|
||||
|
|
||||
|
HP-UX with `aCC` on IA64 |
||||
|
------------------------ |
||||
|
|
||||
|
There is a problem on I64 HP-UX with `aCC` (HP C/aC++ B3910B |
||||
|
A.06.20). The problem manifests as |
||||
|
[unsatisfied symbols during linking of `loggingserver`][9]: |
||||
|
|
||||
|
ld: Unsatisfied symbol "virtual table of loggingserver::ClientThread" in file loggingserver.o |
||||
|
|
||||
|
The problem appears to be a deficiency in `aCC` and its support of |
||||
|
`__declspec(dllexport)`. To work around this issue, add |
||||
|
`--disable-symbols-visibility-options` to `configure` script command |
||||
|
line: |
||||
|
|
||||
|
$ ../configure --disable-symbols-visibility-options \ |
||||
|
--enable-threads=yes CXXFLAGS="-AA" |
||||
|
|
||||
|
[9]: http://h30499.www3.hp.com/t5/Languages-and-Scripting/Building-Log4cplus-fails-with-quot-ld-Unsatisfied-symbol-virtual/td-p/6261411#.UoHtgPmet8G |
||||
|
|
||||
|
|
||||
|
Haiku |
||||
|
----- |
||||
|
|
||||
|
Haiku is supported with GCC 4+. The default GCC version in Haiku is |
||||
|
set to version 2 (based on GCC 2.95.x). To change the default GCC |
||||
|
version to version 4, please run `setgcc gcc4` command. This is to |
||||
|
avoid linking errors like this: |
||||
|
|
||||
|
~~~~ |
||||
|
main.cpp:(.text.startup+0x54a): undefined reference to `_Unwind_Resume' |
||||
|
~~~~ |
||||
|
|
||||
|
Running the command switches the _current_ GCC version to version 4. |
||||
|
This change is permanent and global. See also Haiku ticket |
||||
|
[#8368](http://dev.haiku-os.org/ticket/8368). |
||||
|
|
||||
|
|
||||
|
Qt4 / Win32 / MSVC |
||||
|
------------------ |
||||
|
|
||||
|
In order to use log4cplus in Qt4 programs it is necessary to set |
||||
|
following option: `Treat WChar_t As Built in Type: No (/Zc:wchar_t-)` |
||||
|
|
||||
|
Set this option for log4cplus project and `Qt4DebugAppender` project |
||||
|
in MS Visual Studio. Remember to use Unicode versions of log4cplus |
||||
|
libraries with Qt. It is also necessary to make clear distinction |
||||
|
between debug and release builds of Qt project and log4cplus. Do not |
||||
|
use log4cplus release library with debug version of Qt program or vice |
||||
|
versa. |
||||
|
|
||||
|
For registering Qt4DebugAppender library at runtime, call this |
||||
|
function: `log4cplus::Qt4DebugAppender::registerAppender()` |
||||
|
|
||||
|
Add these lines to qmake project file for using log4cplus and |
||||
|
`Qt4DebugAppender`: |
||||
|
|
||||
|
INCLUDEPATH += C:\log4cplus\include |
||||
|
win32 { |
||||
|
CONFIG(debug, debug|release) { |
||||
|
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Debug_Unicode -llog4cplusUD |
||||
|
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Debug_Unicode -llog4cplus-Qt4DebugAppender |
||||
|
} else { |
||||
|
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Release_Unicode -llog4cplusU |
||||
|
LIBS += -LC:\log4cplus\msvc10\Win32\bin.Release_Unicode -llog4cplus-Qt4DebugAppender |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
`LOG4CPLUS_*_FMT()` and UNICODE |
||||
|
------------------------------- |
||||
|
|
||||
|
Beware, the `%s` specifier does not work the same way on Unix--like |
||||
|
platforms as it does on Windows with Visual Studio. With Visual Studio |
||||
|
the `%s` specifier changes its meaning conveniently by printing |
||||
|
`wchar_t` string when used with `wprintf()` and `char` strings when |
||||
|
used with `printf()`. On the other hand, Unix--like platforms keeps |
||||
|
the meaning of printing `char` strings when used with both `wprintf()` |
||||
|
and `printf()`. It is necessary to use `%ls` (C99) specifier or `%S` |
||||
|
(SUSv2) specifier to print `wchar_t` strings on Unix--like platforms. |
||||
|
|
||||
|
The common ground for both platforms appears to be use of `%ls` and |
||||
|
`wchar_t` string to print strings with unmodified formatting string |
||||
|
argument on both Unix--like platforms and Windows. The conversion of |
||||
|
`wchar_t` back to `char` then depends on C locale. |
||||
|
|
||||
|
|
||||
|
C++11 support |
||||
|
------------- |
||||
|
|
||||
|
log4cplus contains small amount of code that uses C++11 (ISO/IEC |
||||
|
14882:2011 standard) language features. C++11 features are used only |
||||
|
if C++11 support is detected during compile time. Compiling log4cplus |
||||
|
with C++11 compiler and standard library and using it with C++03 |
||||
|
(ISO/IEC 14882:2003 standard) application is not supported. |
||||
|
|
||||
|
|
||||
|
Unsupported compilers |
||||
|
--------------------- |
||||
|
|
||||
|
log4cplus does not support too old or broken C++ compilers: |
||||
|
|
||||
|
- Visual C++ prior to 7.1 |
||||
|
- GCC prior to 3.2 |
||||
|
- Older versions of Borland/CodeGear/Embarcadero C++ compilers |
||||
|
|
||||
|
|
||||
|
Unsupported platforms |
||||
|
--------------------- |
||||
|
|
||||
|
log4cplus requires some minimal set of C and/or C++ library |
||||
|
functions. Some systems/platforms fail to provide these functions and |
||||
|
thus log4cplus cannot be supported there: |
||||
|
|
||||
|
- Windows CE - missing implementations of `<time.h>` functions |
||||
|
|
||||
|
|
||||
|
License |
||||
|
======= |
||||
|
|
||||
|
This library is licensed under the Apache Public License 2.0 and two |
||||
|
clause BSD license. Please read the included LICENSE file for |
||||
|
details. |
@ -0,0 +1,5 @@ |
|||||
|
revision-id: wilx@users.sourceforge.net-20131231075716-cw2mo29s22qy8xm3 |
||||
|
date: 2013-12-31 08:57:16 +0100 |
||||
|
build-date: 2013-12-31 19:01:57 +0100 |
||||
|
revno: 1022 |
||||
|
branch-nick: 1.1.x |
@ -0,0 +1,160 @@ |
|||||
|
include(CheckIncludeFiles) |
||||
|
include(CheckFunctionExists) |
||||
|
include(CheckLibraryExists) |
||||
|
include(CheckSymbolExists) |
||||
|
include(CheckTypeSize) |
||||
|
include(CheckCSourceCompiles) |
||||
|
include(CheckCXXSourceCompiles) |
||||
|
|
||||
|
#check_include_files(dlfcn.h HAVE_DLFCN_H ) |
||||
|
|
||||
|
set(LOG4CPLUS_HAVE_ERRNO_H 1) |
||||
|
set(LOG4CPLUS_HAVE_ICONV_H 1) |
||||
|
set(LOG4CPLUS_HAVE_LIMITS_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYS_TYPES_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYS_SOCKET_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYS_SYSCALL_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYS_TIME_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYS_TIMEB_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYS_STAT_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYS_FILE_H 1) |
||||
|
set(LOG4CPLUS_HAVE_SYSLOG_H 1) |
||||
|
set(LOG4CPLUS_HAVE_ARPA_INET_H 1) |
||||
|
set(LOG4CPLUS_HAVE_NETINET_IN_H 1) |
||||
|
set(LOG4CPLUS_HAVE_NETINET_TCP_H 1) |
||||
|
set(LOG4CPLUS_HAVE_NETDB_H 1) |
||||
|
set(LOG4CPLUS_HAVE_UNISTD_H 1) |
||||
|
set(LOG4CPLUS_HAVE_FCNTL_H 1) |
||||
|
set(LOG4CPLUS_HAVE_STDIO_H 1) |
||||
|
set(LOG4CPLUS_HAVE_STDARG_H 1) |
||||
|
set(LOG4CPLUS_HAVE_STDLIB_H 1) |
||||
|
set(LOG4CPLUS_HAVE_TIME_H 1) |
||||
|
set(LOG4CPLUS_HAVE_WCHAR_H 1) |
||||
|
set(LOG4CPLUS_HAVE_POLL_H 1) |
||||
|
|
||||
|
|
||||
|
# set(HAVE_INTTYPES_H 1) |
||||
|
# set(HAVE_MEMORY_H 1) |
||||
|
# set(HAVE_STDINT_H 1) |
||||
|
# set(HAVE_STRINGS_H 1) |
||||
|
# set(HAVE_STRING_H 1) |
||||
|
|
||||
|
|
||||
|
#check_include_files("stdlib.h;stdio.h;stdarg.h;string.h;float.h" STDC_HEADERS ) |
||||
|
|
||||
|
find_library(LIBADVAPI32 advapi32) |
||||
|
find_library(LIBKERNEL32 kernel32) |
||||
|
find_library(LIBNSL nsl) |
||||
|
find_library(LIBRT rt) |
||||
|
find_library(LIBICONV iconv) |
||||
|
find_library(LIBPOSIX4 posix4) |
||||
|
find_library(LIBCPOSIX cposix) |
||||
|
find_library(LIBSOCKET socket) |
||||
|
find_library(LIBWS2_32 ws2_32) |
||||
|
|
||||
|
set(LOG4CPLUS_HAVE_GMTIME_R 1) |
||||
|
set(LOG4CPLUS_HAVE_LOCALTIME_R 1) |
||||
|
set(LOG4CPLUS_HAVE_GETTIMEOFDAY 1) |
||||
|
set(LOG4CPLUS_HAVE_GETPID 1) |
||||
|
set(LOG4CPLUS_HAVE_POLL 1) |
||||
|
set(LOG4CPLUS_HAVE_PIPE 1) |
||||
|
#set(LOG4CPLUS_HAVE_PIPE2 ) |
||||
|
set(LOG4CPLUS_HAVE_FTIME 1) |
||||
|
set(LOG4CPLUS_HAVE_STAT 1) |
||||
|
set(LOG4CPLUS_HAVE_LSTAT 1) |
||||
|
set(LOG4CPLUS_HAVE_FCNTL 1) |
||||
|
set(LOG4CPLUS_HAVE_FLOCK 1) |
||||
|
set(LOG4CPLUS_HAVE_LOCKF 1) |
||||
|
set(LOG4CPLUS_HAVE_HTONS 1) |
||||
|
set(LOG4CPLUS_HAVE_NTOHS 1) |
||||
|
set(LOG4CPLUS_HAVE_HTONL 1) |
||||
|
set(LOG4CPLUS_HAVE_NTOHL 1) |
||||
|
set(LOG4CPLUS_HAVE_SHUTDOWN 1) |
||||
|
set(LOG4CPLUS_HAVE_VSNPRINTF 1) |
||||
|
#set(LOG4CPLUS_HAVE__VSNPRINTF ) |
||||
|
#set(LOG4CPLUS_HAVE_VSPRINTF_S ) |
||||
|
#set(LOG4CPLUS_HAVE_VSWPRINTF_S ) |
||||
|
#set(LOG4CPLUS_HAVE_VFPRINTF_S ) |
||||
|
#set(LOG4CPLUS_HAVE_VFWPRINTF_S ) |
||||
|
#set(LOG4CPLUS_HAVE__VSNPRINTF_S ) |
||||
|
#set(LOG4CPLUS_HAVE__VSNWPRINTF_S ) |
||||
|
set(LOG4CPLUS_HAVE_MBSTOWCS 1) |
||||
|
set(LOG4CPLUS_HAVE_WCSTOMBS 1) |
||||
|
|
||||
|
|
||||
|
set(LOG4CPLUS_HAVE_ENAMETOOLONG 1) |
||||
|
set(LOG4CPLUS_HAVE_GETTID 1) |
||||
|
set(LOG4CPLUS_HAVE_FUNCTION_MACRO 1) |
||||
|
set(LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO 1) |
||||
|
set(LOG4CPLUS_HAVE_FUNC_SYMBOL 1) |
||||
|
|
||||
|
set(LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH 1) |
||||
|
set(LOG4CPLUS_HAVE___SYNC_SUB_AND_FETCH 1) |
||||
|
|
||||
|
set(LOG4CPLUS_HAVE_GNU_VARIADIC_MACROS 1) |
||||
|
set(LOG4CPLUS_HAVE_C99_VARIADIC_MACROS 1) |
||||
|
|
||||
|
#set(LOG4CPLUS_HAVE_CLOCK_GETTIME ) |
||||
|
#set(LOG4CPLUS_HAVE_CLOCK_NANOSLEEP ) |
||||
|
set(LOG4CPLUS_HAVE_NANOSLEEP 1) |
||||
|
|
||||
|
#set(LOG4CPLUS_HAVE_ICONV_OPEN ) |
||||
|
#set(LOG4CPLUS_HAVE_ICONV_CLOSE ) |
||||
|
#set(LOG4CPLUS_HAVE_ICONV ) |
||||
|
|
||||
|
#set(LOG4CPLUS_HAVE_GETHOSTBYNAME_R) |
||||
|
set(LOG4CPLUS_HAVE_GETADDRINFO 1) |
||||
|
|
||||
|
|
||||
|
set(LOG4CPLUS_DECLSPEC_EXPORT "__attribute__ ((visibility(\"default\")))" ) |
||||
|
set(LOG4CPLUS_DECLSPEC_IMPORT "__attribute__ ((visibility(\"default\")))" ) |
||||
|
set(LOG4CPLUS_DECLSPEC_PRIVATE "__attribute__ ((visibility(\"hidden\")))" ) |
||||
|
|
||||
|
set(LOG4CPLUS_HAVE_TLS_SUPPORT 1) |
||||
|
set(LOG4CPLUS_THREAD_LOCAL_VAR "__thread") |
||||
|
|
||||
|
#set(LOG4CPLUS_HAVE_CXX11_ATOMICS ) |
||||
|
|
||||
|
#set(socklen_t) |
||||
|
|
||||
|
set(HAVE_STDLIB_H ${LOG4CPLUS_HAVE_STDLIB_H} ) |
||||
|
set(HAVE_SYS_STAT_H ${LOG4CPLUS_HAVE_SYS_STAT_H} ) |
||||
|
set(HAVE_SYS_TYPES_H ${LOG4CPLUS_HAVE_SYS_TYPES_H} ) |
||||
|
set(HAVE_SYS_FILE_H ${LOG4CPLUS_HAVE_SYS_FILE_H} ) |
||||
|
set(HAVE_UNISTD_H ${LOG4CPLUS_HAVE_UNISTD_H} ) |
||||
|
|
||||
|
|
||||
|
set(HAVE_FTIME ${LOG4CPLUS_HAVE_FTIME} ) |
||||
|
set(HAVE_GETPID ${LOG4CPLUS_HAVE_GETPID} ) |
||||
|
set(HAVE_GETTIMEOFDAY ${LOG4CPLUS_HAVE_GETTIMEOFDAY} ) |
||||
|
set(HAVE_GETADDRINFO ${LOG4CPLUS_HAVE_GETADDRINFO} ) |
||||
|
set(HAVE_GETHOSTBYNAME_R ${LOG4CPLUS_HAVE_GETHOSTBYNAME_R} ) |
||||
|
set(HAVE_GMTIME_R ${LOG4CPLUS_HAVE_GMTIME_R} ) |
||||
|
set(HAVE_HTONL ${LOG4CPLUS_HAVE_HTONL} ) |
||||
|
set(HAVE_HTONS ${LOG4CPLUS_HAVE_HTONS} ) |
||||
|
set(HAVE_ICONV_OPEN ${LOG4CPLUS_HAVE_ICONV_OPEN} ) |
||||
|
set(HAVE_ICONV_CLOSE ${LOG4CPLUS_HAVE_ICONV_CLOSE} ) |
||||
|
set(HAVE_ICONV ${LOG4CPLUS_HAVE_ICONV} ) |
||||
|
set(HAVE_LSTAT ${LOG4CPLUS_HAVE_LSTAT} ) |
||||
|
set(HAVE_FCNTL ${LOG4CPLUS_HAVE_FCNTL} ) |
||||
|
set(HAVE_LOCKF ${LOG4CPLUS_HAVE_LOCKF} ) |
||||
|
set(HAVE_FLOCK ${LOG4CPLUS_HAVE_FLOCK} ) |
||||
|
set(HAVE_LOCALTIME_R ${LOG4CPLUS_HAVE_LOCALTIME_R} ) |
||||
|
set(HAVE_NTOHL ${LOG4CPLUS_HAVE_NTOHL} ) |
||||
|
set(HAVE_NTOHS ${LOG4CPLUS_HAVE_NTOHS} ) |
||||
|
set(HAVE_STAT ${LOG4CPLUS_HAVE_STAT} ) |
||||
|
|
||||
|
set(HAVE_VFPRINTF_S ${LOG4CPLUS_HAVE_VFPRINTF_S} ) |
||||
|
set(HAVE_VFWPRINTF_S ${LOG4CPLUS_HAVE_VFWPRINTF_S} ) |
||||
|
set(HAVE_VSNPRINTF ${LOG4CPLUS_HAVE_VSNPRINTF} ) |
||||
|
set(HAVE_VSPRINTF_S ${LOG4CPLUS_HAVE_VSPRINTF_S} ) |
||||
|
set(HAVE_VSWPRINTF_S ${LOG4CPLUS_HAVE_VSWPRINTF_S} ) |
||||
|
set(HAVE__VSNPRINTF ${LOG4CPLUS_HAVE__VSNPRINTF} ) |
||||
|
set(HAVE__VSNPRINTF_S ${LOG4CPLUS_HAVE__VSNPRINTF_S} ) |
||||
|
set(HAVE__VSNWPRINTF_S ${LOG4CPLUS_HAVE__VSNWPRINTF_S} ) |
||||
|
|
||||
|
set(HAVE_FUNCTION_MACRO ${LOG4CPLUS_HAVE_FUNCTION_MACRO} ) |
||||
|
set(HAVE_PRETTY_FUNCTION_MACRO ${LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO} ) |
||||
|
|
||||
|
set(HAVE___SYNC_ADD_AND_FETCH ${LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH} ) |
||||
|
set(HAVE___SYNC_SUB_AND_FETCH ${LOG4CPLUS_HAVE___SYNC_SUB_AND_FETCH} ) |
@ -0,0 +1,13 @@ |
|||||
|
NOTE: log4cplus build for iOS is based on iOS.cmake toolchain file, |
||||
|
orininally taken from https://code.google.com/p/ios-cmake/ |
||||
|
|
||||
|
To build the library for iOS, being in current folder, perform the steps below: |
||||
|
For armv7 architecture: |
||||
|
$ ./scripts/cmake_ios_armv7.sh |
||||
|
$ cmake --build ./build_armv7 --config "Release" |
||||
|
$ cmake --build ./build_armv7 --config "Debug" |
||||
|
|
||||
|
For i386 architecture: |
||||
|
$ ./scripts/cmake_ios_i386.sh |
||||
|
$ cmake --build ./build_i386 --config "Release" |
||||
|
$ cmake --build ./build_i386 --config "Debug" |
@ -0,0 +1,193 @@ |
|||||
|
# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake |
||||
|
# files which are included with CMake 2.8.4 |
||||
|
# It has been altered for iOS development |
||||
|
|
||||
|
# Options: |
||||
|
# |
||||
|
# IOS_PLATFORM = OS (default) or SIMULATOR |
||||
|
# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders |
||||
|
# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch. |
||||
|
# SIMULATOR - used to build for the Simulator platforms, which have an x86 arch. |
||||
|
# |
||||
|
# CMAKE_IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder |
||||
|
# By default this location is automatcially chosen based on the IOS_PLATFORM value above. |
||||
|
# If set manually, it will override the default location and force the user of a particular Developer Platform |
||||
|
# |
||||
|
# CMAKE_IOS_SDK_ROOT = automatic(default) or /path/to/platform/Developer/SDKs/SDK folder |
||||
|
# By default this location is automatcially chosen based on the CMAKE_IOS_DEVELOPER_ROOT value. |
||||
|
# In this case it will always be the most up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. |
||||
|
# If set manually, this will force the use of a specific SDK version |
||||
|
|
||||
|
# Macros: |
||||
|
# |
||||
|
# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE) |
||||
|
# A convenience macro for setting xcode specific properties on targets |
||||
|
# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1") |
||||
|
# |
||||
|
# find_host_package (PROGRAM ARGS) |
||||
|
# A macro used to find executable programs on the host system, not within the iOS environment. |
||||
|
# Thanks to the android-cmake project for providing the command |
||||
|
|
||||
|
|
||||
|
# Standard settings |
||||
|
set (CMAKE_SYSTEM_NAME Darwin) |
||||
|
set (CMAKE_SYSTEM_VERSION 1) |
||||
|
set (UNIX True) |
||||
|
set (APPLE True) |
||||
|
set (IOS True) |
||||
|
|
||||
|
# Required as of cmake 2.8.10 |
||||
|
set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) |
||||
|
|
||||
|
# Determine the cmake host system version so we know where to find the iOS SDKs |
||||
|
find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin) |
||||
|
if (CMAKE_UNAME) |
||||
|
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) |
||||
|
string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") |
||||
|
endif (CMAKE_UNAME) |
||||
|
|
||||
|
# Force the compilers to gcc for iOS |
||||
|
include (CMakeForceCompiler) |
||||
|
CMAKE_FORCE_C_COMPILER (gcc gcc) |
||||
|
CMAKE_FORCE_CXX_COMPILER (g++ g++) |
||||
|
|
||||
|
# Skip the platform compiler checks for cross compiling |
||||
|
set (CMAKE_CXX_COMPILER_WORKS TRUE) |
||||
|
set (CMAKE_C_COMPILER_WORKS TRUE) |
||||
|
|
||||
|
# All iOS/Darwin specific settings - some may be redundant |
||||
|
set (CMAKE_SHARED_LIBRARY_PREFIX "lib") |
||||
|
set (CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") |
||||
|
set (CMAKE_SHARED_MODULE_PREFIX "lib") |
||||
|
set (CMAKE_SHARED_MODULE_SUFFIX ".so") |
||||
|
set (CMAKE_MODULE_EXISTS 1) |
||||
|
set (CMAKE_DL_LIBS "") |
||||
|
|
||||
|
set (CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") |
||||
|
set (CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") |
||||
|
set (CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") |
||||
|
set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") |
||||
|
|
||||
|
# Hidden visibilty is required for cxx on iOS |
||||
|
set (CMAKE_C_FLAGS_INIT "") |
||||
|
set (CMAKE_CXX_FLAGS_INIT "-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden") |
||||
|
|
||||
|
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") |
||||
|
set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") |
||||
|
|
||||
|
set (CMAKE_PLATFORM_HAS_INSTALLNAME 1) |
||||
|
set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names") |
||||
|
set (CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names") |
||||
|
set (CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") |
||||
|
set (CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") |
||||
|
set (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") |
||||
|
|
||||
|
# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree |
||||
|
# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache |
||||
|
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) |
||||
|
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex |
||||
|
if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) |
||||
|
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool) |
||||
|
endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) |
||||
|
|
||||
|
# Setup iOS platform unless specified manually with IOS_PLATFORM |
||||
|
if (NOT DEFINED IOS_PLATFORM) |
||||
|
set (IOS_PLATFORM "OS") |
||||
|
endif (NOT DEFINED IOS_PLATFORM) |
||||
|
set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform") |
||||
|
|
||||
|
# Check the platform selection and setup for developer root |
||||
|
if (${IOS_PLATFORM} STREQUAL "OS") |
||||
|
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform") |
||||
|
|
||||
|
# This causes the installers to properly locate the output libraries |
||||
|
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") |
||||
|
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR") |
||||
|
set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform") |
||||
|
|
||||
|
# This causes the installers to properly locate the output libraries |
||||
|
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator") |
||||
|
else (${IOS_PLATFORM} STREQUAL "OS") |
||||
|
message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR") |
||||
|
endif (${IOS_PLATFORM} STREQUAL "OS") |
||||
|
|
||||
|
# Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT |
||||
|
# Note Xcode 4.3 changed the installation location, choose the most recent one available |
||||
|
set (XCODE_POST_43_ROOT "/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") |
||||
|
set (XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") |
||||
|
if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) |
||||
|
if (EXISTS ${XCODE_POST_43_ROOT}) |
||||
|
set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT}) |
||||
|
elseif(EXISTS ${XCODE_PRE_43_ROOT}) |
||||
|
set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT}) |
||||
|
endif (EXISTS ${XCODE_POST_43_ROOT}) |
||||
|
endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) |
||||
|
set (CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform") |
||||
|
|
||||
|
# Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT |
||||
|
if (NOT DEFINED CMAKE_IOS_SDK_ROOT) |
||||
|
file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*") |
||||
|
if (_CMAKE_IOS_SDKS) |
||||
|
list (SORT _CMAKE_IOS_SDKS) |
||||
|
list (REVERSE _CMAKE_IOS_SDKS) |
||||
|
list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT) |
||||
|
else (_CMAKE_IOS_SDKS) |
||||
|
message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.") |
||||
|
endif (_CMAKE_IOS_SDKS) |
||||
|
message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}") |
||||
|
endif (NOT DEFINED CMAKE_IOS_SDK_ROOT) |
||||
|
set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK") |
||||
|
|
||||
|
# Set the sysroot default to the most recent SDK |
||||
|
set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support") |
||||
|
|
||||
|
# set the architecture for iOS |
||||
|
# NOTE: Currently both ARCHS_STANDARD_32_BIT and ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually |
||||
|
if (${IOS_PLATFORM} STREQUAL "OS") |
||||
|
set (IOS_ARCH armv6 armv7) |
||||
|
else (${IOS_PLATFORM} STREQUAL "OS") |
||||
|
set (IOS_ARCH i386) |
||||
|
endif (${IOS_PLATFORM} STREQUAL "OS") |
||||
|
|
||||
|
set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS") |
||||
|
|
||||
|
# Set the find root to the iOS developer roots and to user defined paths |
||||
|
set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root") |
||||
|
|
||||
|
# default to searching for frameworks first |
||||
|
set (CMAKE_FIND_FRAMEWORK FIRST) |
||||
|
|
||||
|
# set up the default search directories for frameworks |
||||
|
set (CMAKE_SYSTEM_FRAMEWORK_PATH |
||||
|
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks |
||||
|
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks |
||||
|
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks |
||||
|
) |
||||
|
|
||||
|
# only search the iOS sdks, not the remainder of the host filesystem |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
|
|
||||
|
|
||||
|
# This little macro lets you set any XCode specific property |
||||
|
macro (set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE) |
||||
|
set_property (TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE}) |
||||
|
endmacro (set_xcode_property) |
||||
|
|
||||
|
|
||||
|
# This macro lets you find executable programs on the host system |
||||
|
macro (find_host_package) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) |
||||
|
set (IOS FALSE) |
||||
|
|
||||
|
find_package(${ARGN}) |
||||
|
|
||||
|
set (IOS TRUE) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
|
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
|
endmacro (find_host_package) |
||||
|
|
@ -0,0 +1,18 @@ |
|||||
|
#!/bin/sh |
||||
|
scripts_dir=`cd $(dirname $0);pwd` |
||||
|
cd $scripts_dir/.. |
||||
|
|
||||
|
mkdir -p build_armv7 |
||||
|
cd build_armv7 |
||||
|
|
||||
|
cmake -G "Xcode" -DBUILD_SHARED_LIBS="FALSE" \ |
||||
|
-DCMAKE_TOOLCHAIN_FILE=$scripts_dir/../iOS.cmake \ |
||||
|
-DLOG4CPLUS_SINGLE_THREADED="TRUE" \ |
||||
|
-DLOG4CPLUS_BUILD_TESTING="OFF" \ |
||||
|
-DLOG4CPLUS_QT4="OFF" \ |
||||
|
-DLOG4CPLUS_BUILD_LOGGINGSERVER="OFF" \ |
||||
|
-DLOG4CPLUS_CONFIGURE_CHECKS_PATH=$scripts_dir/../ConfigureChecks.cmake \ |
||||
|
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=$scripts_dir/../build_armv7/Binaries \ |
||||
|
$@ \ |
||||
|
$scripts_dir/../.. |
||||
|
|
@ -0,0 +1,19 @@ |
|||||
|
#!/bin/sh |
||||
|
scripts_dir=`cd $(dirname $0);pwd` |
||||
|
cd $scripts_dir/.. |
||||
|
|
||||
|
mkdir -p build_i386 |
||||
|
cd build_i386 |
||||
|
|
||||
|
cmake -G "Xcode" -DBUILD_SHARED_LIBS="FALSE" \ |
||||
|
-DIOS_PLATFORM="SIMULATOR" \ |
||||
|
-DCMAKE_TOOLCHAIN_FILE=$scripts_dir/../iOS.cmake \ |
||||
|
-DLOG4CPLUS_SINGLE_THREADED="TRUE" \ |
||||
|
-DLOG4CPLUS_BUILD_TESTING="OFF" \ |
||||
|
-DLOG4CPLUS_QT4="OFF" \ |
||||
|
-DLOG4CPLUS_BUILD_LOGGINGSERVER="OFF" \ |
||||
|
-DLOG4CPLUS_CONFIGURE_CHECKS_PATH=$scripts_dir/../ConfigureChecks.cmake \ |
||||
|
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=$scripts_dir/../build_i386/Binaries \ |
||||
|
$@ \ |
||||
|
$scripts_dir/../.. |
||||
|
|
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue