00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _LOG4CPP_PORTABILITY_HH
00011 #define _LOG4CPP_PORTABILITY_HH
00012
00013 #if defined (_MSC_VER) || defined(__BORLANDC__)
00014 # if defined (LOG4CPP_STLPORT_AND_BOOST_BUILD)
00015 # include <log4cpp/config-win32-stlport-boost.h>
00016 # else
00017 # include <log4cpp/config-win32.h>
00018 # endif
00019
00020 #ifdef MSVC_MEMORY_LEAK_CHECK
00021 #define _CRTDBG_MAP_ALLOC
00022
00023 #include <stdlib.h>
00024 #include <crtdbg.h>
00025
00026 #ifdef _DEBUG
00027 #ifndef DBG_NEW
00028 #define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
00029 #define new DBG_NEW
00030 #endif
00031 #endif // _DEBUG
00032 #endif // MSVC_MEMORY_LEAK_CHECK
00033
00034 #else
00035 #if defined(__OPENVMS__)
00036 # include <log4cpp/config-openvms.h>
00037 #else
00038 # if defined(__MINGW32__)
00039 # include <log4cpp/config-MinGW32.h>
00040 # else
00041 # include <log4cpp/config.h>
00042 # endif
00043 #endif
00044 #endif
00045
00046 #include <log4cpp/Export.hh>
00047
00048 #if defined(_MSC_VER)
00049 # pragma warning( disable : 4786 ) // 255 char debug symbol limit
00050 # pragma warning( disable : 4290 ) // throw specifier not implemented
00051 # pragma warning( disable : 4251 ) // "class XXX should be exported"
00052 #endif
00053
00054 #ifdef __APPLE__
00055 # include <sstream>
00056 #else
00057 # ifndef LOG4CPP_HAVE_SSTREAM
00058 # include <strstream>
00059 namespace std {
00060 class LOG4CPP_EXPORT ostringstream : public ostrstream {
00061 public:
00062 std::string str();
00063 };
00064 };
00065 # endif // LOG4CPP_HAVE_SSTREAM
00066 #endif // _APPLE_
00067
00068
00069 #endif