Revision 0cf6819b

b/host/include/uhd/config.hpp
101 101
    #define UHD_DEPRECATED
102 102
#endif
103 103

  
104
// Platform defines for conditional parts of headers:
105
// Taken from boost/config/select_platform_config.hpp,
106
// however, we define macros, not strings for platforms.
107
#if defined(linux) || defined(__linux) || defined(__linux__)
108
    #define UHD_PLATFORM_LINUX
109
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
110
    #define UHD_PLATFORM_WIN32
111
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
112
    #define UHD_PLATFORM_MACOS
113
#endif
114

  
104 115
#endif /* INCLUDED_UHD_CONFIG_HPP */
b/host/include/uhd/utils/byteswap.ipp
21 21
/***********************************************************************
22 22
 * Platform-specific implementation details for byteswap below:
23 23
 **********************************************************************/
24
#ifdef BOOST_MSVC //http://msdn.microsoft.com/en-us/library/a3140177%28VS.80%29.aspx
24
#if defined(UHD_PLATFORM_WIN32) //http://msdn.microsoft.com/en-us/library/a3140177%28VS.80%29.aspx
25 25
    #include <stdlib.h>
26 26

  
27 27
    UHD_INLINE boost::uint16_t uhd::byteswap(boost::uint16_t x){
......
50 50
        return __builtin_bswap64(x);
51 51
    }
52 52

  
53
#elif defined(__FreeBSD__) || defined(__MACOSX__) || defined(__APPLE__)
53
#elif defined(UHD_PLATFORM_MACOS)
54 54
    #include <libkern/OSByteOrder.h>
55 55

  
56 56
    UHD_INLINE boost::uint16_t uhd::byteswap(boost::uint16_t x){
......
65 65
        return OSSwapInt64(x);
66 66
    }
67 67

  
68
#elif defined(linux) || defined(__linux)
68
#elif defined(UHD_PLATFORM_LINUX)
69 69
    #include <byteswap.h>
70 70

  
71 71
    UHD_INLINE boost::uint16_t uhd::byteswap(boost::uint16_t x){

Also available in: Unified diff