log4tango 5.0.2
Portability.hh
Go to the documentation of this file.
1//
2// Portability.hh
3//
4// Copyright (C) : 2000 - 2002
5// LifeLine Networks BV (www.lifeline.nl). All rights reserved.
6// Bastiaan Bakker. All rights reserved.
7//
8// 2004,2005,2006,2007,2008,2009,2010,2011,2012
9// Synchrotron SOLEIL
10// L'Orme des Merisiers
11// Saint-Aubin - BP 48 - France
12//
13// This file is part of log4tango.
14//
15// Log4ango is free software: you can redistribute it and/or modify
16// it under the terms of the GNU Lesser General Public License as published by
17// the Free Software Foundation, either version 3 of the License, or
18// (at your option) any later version.
19//
20// Log4tango is distributed in the hope that it will be useful,
21// but WITHOUT ANY WARRANTY; without even the implied warranty of
22// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23// GNU Lesser General Public License for more details.
24//
25// You should have received a copy of the GNU Lesser General Public License
26// along with Log4Tango. If not, see <http://www.gnu.org/licenses/>.
27
28#ifndef _LOG4TANGO_PORTABILITY_H
29#define _LOG4TANGO_PORTABILITY_H
30
31#if defined (_MSC_VER) || defined(__BORLANDC__)
32# include <log4tango/config-win32.h>
33#else
34# include <log4tango/config.h>
35#endif
36
37#include <log4tango/Export.hh>
38
39#if defined(_MSC_VER)
40# pragma warning( disable : 4786 ) // 255 char debug symbol limit
41# pragma warning( disable : 4290 ) // throw specifier not implemented
42# pragma warning( disable : 4251 ) // "class XXX should be exported"
43
44#define LOG4TANGO_UNUSED(var) var
45#else
46 #ifdef __GNUC__
47 #define LOG4TANGO_UNUSED(var) var __attribute__ ((unused))
48 #else
49 #define LOG4TANGO_UNUSED(var) var
50 #endif
51#endif
52
53#ifndef LOG4TANGO_HAVE_SSTREAM
54#include <strstream>
55namespace std {
56 class LOG4TANGO_EXPORT ostringstream : public ostrstream {
57 public:
58 std::string str();
59 void str (const char*);
60 };
61}
62#endif // LOG4TANGO_HAVE_SSTREAM
63
64#endif // _LOG4TANGO_PORTABILITY_H
#define LOG4TANGO_EXPORT
Definition: Export.hh:38
Definition: Portability.hh:56
Definition: LoggerStream.hh:178