dlvhex  2.5.0
include/dlvhex2/PlatformDefinitions.h
Go to the documentation of this file.
00001 /* dlvhex -- Answer-Set Programming with external interfaces.
00002  * Copyright (C) 2005-2007 Roman Schindlauer
00003  * Copyright (C) 2006-2015 Thomas Krennwallner
00004  * Copyright (C) 2009-2016 Peter Schüller
00005  * Copyright (C) 2011-2016 Christoph Redl
00006  * Copyright (C) 2015-2016 Tobias Kaminski
00007  * Copyright (C) 2015-2016 Antonius Weinzierl
00008  *
00009  * This file is part of dlvhex.
00010  *
00011  * dlvhex is free software; you can redistribute it and/or modify it
00012  * under the terms of the GNU Lesser General Public License as
00013  * published by the Free Software Foundation; either version 2.1 of
00014  * the License, or (at your option) any later version.
00015  *
00016  * dlvhex is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with dlvhex; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00024  * 02110-1301 USA.
00025  */
00026 
00037 #if !defined(_DLVHEX_PLATFORMDEFINITIONS_H)
00038 #define _DLVHEX_PLATFORMDEFINITIONS_H
00039 
00040 #ifdef HAVE_CONFIG_H
00041 #include "config.h"
00042 #endif                           // HAVE_CONFIG_H
00043 
00044 #define DLVHEX_NAMESPACE_BEGIN namespace dlvhex {
00045 #define DLVHEX_NAMESPACE_END   }
00046 #define DLVHEX_NAMESPACE_USE   using namespace dlvhex;
00047 #define DLVHEX_NAMESPACE       dlvhex::
00048 
00049 // by default we build for POSIX systems
00050 #ifndef WIN32
00051 #ifndef POSIX
00052 #define POSIX 1
00053 #endif
00054 #endif
00055 
00056 #ifdef DLLEXPORT
00057 #define DLVHEX_EXPORT __declspec(dllexport)
00058 #else
00059 #ifdef DLLIMPORT
00060 #define DLVHEX_EXPORT __declspec(dllimport)
00061 #else
00062 #define DLVHEX_EXPORT
00063 #endif
00064 #endif                           /* DLLEXPORT/IMPORT */
00065 
00066 #ifdef DLVHEXPLUGIN
00067 #define DLVHEX_PLUGINEXPORT __declspec(dllexport)
00068 #else
00069 #define DLVHEX_PLUGINEXPORT
00070 #endif
00071 
00072 #ifdef _MSC_VER
00073 #define WARNING(msg) __pragma (message(msg))
00074 #else
00075 // GCC does not expand macros in #warning pragmas, thus we use messages
00076 #define _WARNING(x) _Pragma (#x)
00077 #define WARNING(msg) _WARNING(message (#msg))
00078 #endif
00079 
00080 // on Windows we need to export the relevant part of the STL instantiation
00081 #ifdef WIN32
00082 #include <stdexcept>
00083 class DLVHEX_EXPORT std::runtime_error;
00084 #endif
00085 
00086 #include <boost/cstdint.hpp>
00087 #endif                           /* _DLVHEX_PLATFORMDEFINITIONS_H */
00088 
00089 
00090 
00091 // vim:expandtab:ts=4:sw=4:
00092 // mode: C++
00093 // End: