diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2016-06-14 08:37:38 -0700 |
---|---|---|
committer | Nicholas Corgan <nick.corgan@ettus.com> | 2016-06-14 08:37:38 -0700 |
commit | 49c79b8d4a8f797d85d29e13b3568f9dffda9f4a (patch) | |
tree | ab374887ae1a2d7a083570a349804340150d9977 /host/include | |
parent | d2586e45441a7c72e9aaab1220c655ebd5b24e16 (diff) | |
download | uhd-49c79b8d4a8f797d85d29e13b3568f9dffda9f4a.tar.gz uhd-49c79b8d4a8f797d85d29e13b3568f9dffda9f4a.tar.bz2 uhd-49c79b8d4a8f797d85d29e13b3568f9dffda9f4a.zip |
config: better platform detection
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/config.h | 6 | ||||
-rw-r--r-- | host/include/uhd/config.hpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/host/include/uhd/config.h b/host/include/uhd/config.h index 1d6cefcc0..1677c80ec 100644 --- a/host/include/uhd/config.h +++ b/host/include/uhd/config.h @@ -1,5 +1,5 @@ // -// Copyright 2015 Ettus Research LLC +// Copyright 2015-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -69,13 +69,13 @@ typedef ptrdiff_t ssize_t; // Platform defines for conditional code: // Taken from boost/config/select_platform_config.hpp, // However, we define macros, not strings, for platforms. -#if defined(linux) || defined(__linux) || defined(__linux__) +#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GLIBC__)) && !defined(_CRAYC) && !defined(__FreeBSD_kernel__) && !defined(__GNU__) #define UHD_PLATFORM_LINUX #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #define UHD_PLATFORM_WIN32 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) #define UHD_PLATFORM_MACOS -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) #define UHD_PLATFORM_BSD #endif diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index 8939cd773..00466501e 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011,2014-2015 Ettus Research LLC +// Copyright 2010-2011,2014-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -89,13 +89,13 @@ typedef ptrdiff_t ssize_t; // Platform defines for conditional parts of headers: // Taken from boost/config/select_platform_config.hpp, // however, we define macros, not strings for platforms. -#if defined(linux) || defined(__linux) || defined(__linux__) +#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GLIBC__)) && !defined(_CRAYC) && !defined(__FreeBSD_kernel__) && !defined(__GNU__) #define UHD_PLATFORM_LINUX #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #define UHD_PLATFORM_WIN32 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) #define UHD_PLATFORM_MACOS -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) #define UHD_PLATFORM_BSD #endif |