USRP Hardware Driver and USRP Manual
Version: 3.15.0.HEAD-0-gaea0e2de
UHD and USRP Manual
config.h
Go to the documentation of this file.
1
//
2
// Copyright 2015-2016 Ettus Research LLC
3
// Copyright 2018 Ettus Research, a National Instruments Company
4
//
5
// SPDX-License-Identifier: GPL-3.0-or-later
6
//
7
8
#ifndef INCLUDED_UHD_CONFIG_H
9
#define INCLUDED_UHD_CONFIG_H
10
11
#ifdef _MSC_VER
12
// Bring in "and", "or", and "not"
13
#include <iso646.h>
14
15
// Define ssize_t
16
#include <stddef.h>
17
typedef
ptrdiff_t ssize_t;
18
19
#endif
/* _MSC_VER */
20
21
// Define cross-platform macros
22
#if defined(_MSC_VER)
23
#define UHD_EXPORT __declspec(dllexport)
24
#define UHD_IMPORT __declspec(dllimport)
25
#define UHD_INLINE __forceinline
26
#define UHD_DEPRECATED __declspec(deprecated)
27
#define UHD_ALIGNED(x) __declspec(align(x))
28
#define UHD_UNUSED(x) x
29
#elif defined(__MINGW32__)
30
#define UHD_EXPORT __declspec(dllexport)
31
#define UHD_IMPORT __declspec(dllimport)
32
#define UHD_INLINE inline
33
#define UHD_DEPRECATED __declspec(deprecated)
34
#define UHD_ALIGNED(x) __declspec(align(x))
35
#define UHD_UNUSED(x) x __attribute__((unused))
36
#elif defined(__GNUC__) && __GNUC__ >= 4
37
#define UHD_EXPORT __attribute__((visibility("default")))
38
#define UHD_IMPORT __attribute__((visibility("default")))
39
#define UHD_INLINE inline __attribute__((always_inline))
40
#define UHD_DEPRECATED __attribute__((deprecated))
41
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
42
#define UHD_UNUSED(x) x __attribute__((unused))
43
#elif defined(__clang__)
44
#define UHD_EXPORT __attribute__((visibility("default")))
45
#define UHD_IMPORT __attribute__((visibility("default")))
46
#define UHD_INLINE inline __attribute__((always_inline))
47
#define UHD_DEPRECATED __attribute__((deprecated))
48
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
49
#define UHD_UNUSED(x) x __attribute__((unused))
50
#else
51
#define UHD_EXPORT
52
#define UHD_IMPORT
53
#define UHD_INLINE inline
54
#define UHD_DEPRECATED
55
#define UHD_ALIGNED(x)
56
#define UHD_UNUSED(x) x
57
#endif
58
59
// API declaration macro
60
61
// Define API declaration macro
62
#ifdef UHD_STATIC_LIB
63
#define UHD_API
64
#else
65
#ifdef UHD_DLL_EXPORTS
66
#define UHD_API UHD_EXPORT
67
#else
68
#define UHD_API UHD_IMPORT
69
#endif // UHD_DLL_EXPORTS
70
#endif // UHD_STATIC_LIB
71
72
// Platform defines for conditional code:
73
// Taken from boost/config/select_platform_config.hpp,
74
// However, we define macros, not strings, for platforms.
75
#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GLIBC__)) && !defined(_CRAYC) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
76
#define UHD_PLATFORM_LINUX
77
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
78
#define UHD_PLATFORM_WIN32
79
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
80
#define UHD_PLATFORM_MACOS
81
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
82
#define UHD_PLATFORM_BSD
83
#endif
84
85
#endif
/* INCLUDED_UHD_CONFIG_H */
include
uhd
config.h
Generated by
1.8.13