log4cpp
1.1.4
Toggle main menu visibility
Loading...
Searching...
No Matches
Portability.hh
Go to the documentation of this file.
1
/*
2
* Portability.hh
3
*
4
* Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2001, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#ifndef _LOG4CPP_PORTABILITY_HH
11
#define _LOG4CPP_PORTABILITY_HH
12
13
#if defined (_MSC_VER) || defined(__BORLANDC__)
14
# if defined (LOG4CPP_STLPORT_AND_BOOST_BUILD)
15
# include <log4cpp/config-win32-stlport-boost.h>
16
# else
17
# include <log4cpp/config-win32.h>
18
# endif
19
20
#ifdef MSVC_MEMORY_LEAK_CHECK
21
#define _CRTDBG_MAP_ALLOC
22
23
#include <stdlib.h>
24
#include <crtdbg.h>
25
26
#ifdef _DEBUG
27
#ifndef DBG_NEW
28
#define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
29
#define new DBG_NEW
30
#endif
31
#endif
// _DEBUG
32
#endif
// MSVC_MEMORY_LEAK_CHECK
33
34
#else
35
#if defined(__OPENVMS__)
36
# include <log4cpp/config-openvms.h>
37
#else
38
# if defined(__MINGW32__)
39
# include <log4cpp/config-MinGW32.h>
40
# else
41
# include <log4cpp/config.h>
42
# endif
43
#endif
44
#endif
45
46
#include <
log4cpp/Export.hh
>
47
48
#if defined(_MSC_VER)
49
# pragma warning( disable : 4786 )
// 255 char debug symbol limit
50
# pragma warning( disable : 4290 )
// throw specifier not implemented
51
# pragma warning( disable : 4251 )
// "class XXX should be exported"
52
#endif
53
54
#ifdef __APPLE__
55
# include <sstream>
56
#else
57
# ifndef LOG4CPP_HAVE_SSTREAM
58
# include <strstream>
59
namespace
std
{
60
class
LOG4CPP_EXPORT
ostringstream
:
public
ostrstream {
61
public
:
62
std::string
str
();
63
};
64
};
65
# endif
// LOG4CPP_HAVE_SSTREAM
66
#endif
// _APPLE_
67
68
// Support both modern and deprecated compilers, supplying different c++language constructs via macros
69
#if defined(__cplusplus) && (__cplusplus >= 201103L)
70
#define LOG4CPP_UNIQUE_PTR unique_ptr
71
#define LOG4CPP_UNIQUE_PTR_MOVE(ptr) std::move(ptr)
72
#else
73
#define LOG4CPP_UNIQUE_PTR auto_ptr
74
#define LOG4CPP_UNIQUE_PTR_MOVE(ptr) ptr
75
#endif
//__cplusplus
76
77
#if defined(__cplusplus) && (__cplusplus >= 201703L)
78
#define LOG4CPP_NOTHROW noexcept
79
#else
80
#define LOG4CPP_NOTHROW throw()
81
#endif
//__cplusplus
82
83
#endif
//_LOG4CPP_PORTABILITY_HH
Export.hh
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition
Export.hh:26
std::ostringstream
Definition
Portability.hh:60
std::ostringstream::str
std::string str()
Definition
PortabilityImpl.cpp:19
std
Definition
Portability.hh:59
include
log4cpp
Portability.hh
Generated by
1.17.0