UHD 003.004.000-16-stable
|
00001 // 00002 // Copyright 2010-2011 Ettus Research LLC 00003 // 00004 // This program is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #ifndef INCLUDED_UHD_CONFIG_HPP 00019 #define INCLUDED_UHD_CONFIG_HPP 00020 00021 #include <boost/config.hpp> 00022 00023 #ifdef BOOST_MSVC 00024 // suppress warnings 00025 //# pragma warning(push) 00026 //# pragma warning(disable: 4511) // copy constructor can't not be generated 00027 //# pragma warning(disable: 4512) // assignment operator can't not be generated 00028 //# pragma warning(disable: 4100) // unreferenced formal parameter 00029 //# pragma warning(disable: 4996) // <symbol> was declared deprecated 00030 # pragma warning(disable: 4355) // 'this' : used in base member initializer list 00031 //# pragma warning(disable: 4706) // assignment within conditional expression 00032 # pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B' 00033 //# pragma warning(disable: 4127) // conditional expression is constant 00034 //# pragma warning(disable: 4290) // C++ exception specification ignored except to ... 00035 //# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored 00036 # pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ... 00037 //# pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data 00038 //# pragma warning(disable: 4511) // 'class' : copy constructor could not be generated 00039 //# pragma warning(disable: 4250) // 'class' : inherits 'method' via dominance 00040 # pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union 00041 00042 // define logical operators 00043 #include <ciso646> 00044 00045 // define ssize_t 00046 #include <cstddef> 00047 typedef ptrdiff_t ssize_t; 00048 00049 #endif //BOOST_MSVC 00050 00051 //define cross platform attribute macros 00052 #if defined(BOOST_MSVC) 00053 #define UHD_EXPORT __declspec(dllexport) 00054 #define UHD_IMPORT __declspec(dllimport) 00055 #define UHD_INLINE __forceinline 00056 #define UHD_DEPRECATED __declspec(deprecated) 00057 #define UHD_ALIGNED(x) __declspec(align(x)) 00058 #elif defined(__GNUG__) && __GNUG__ >= 4 00059 #define UHD_EXPORT __attribute__((visibility("default"))) 00060 #define UHD_IMPORT __attribute__((visibility("default"))) 00061 #define UHD_INLINE inline __attribute__((always_inline)) 00062 #define UHD_DEPRECATED __attribute__((deprecated)) 00063 #define UHD_ALIGNED(x) __attribute__((aligned(x))) 00064 #else 00065 #define UHD_EXPORT 00066 #define UHD_IMPORT 00067 #define UHD_INLINE inline 00068 #define UHD_DEPRECATED 00069 #define UHD_ALIGNED(x) 00070 #endif 00071 00072 // Define API declaration macro 00073 #ifdef UHD_DLL_EXPORTS 00074 #define UHD_API UHD_EXPORT 00075 #else 00076 #define UHD_API UHD_IMPORT 00077 #endif // UHD_DLL_EXPORTS 00078 00079 // Platform defines for conditional parts of headers: 00080 // Taken from boost/config/select_platform_config.hpp, 00081 // however, we define macros, not strings for platforms. 00082 #if defined(linux) || defined(__linux) || defined(__linux__) 00083 #define UHD_PLATFORM_LINUX 00084 #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 00085 #define UHD_PLATFORM_WIN32 00086 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) 00087 #define UHD_PLATFORM_MACOS 00088 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 00089 #define UHD_PLATFORM_BSD 00090 #endif 00091 00092 #endif /* INCLUDED_UHD_CONFIG_HPP */