log4cpp 1.1.3
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
69#endif
#define LOG4CPP_EXPORT
Definition Export.hh:26
Definition Portability.hh:60
Definition Portability.hh:59