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