aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2014-12-19 14:52:57 -0800
committerMartin Braun <martin.braun@ettus.com>2015-01-13 09:46:41 +0100
commit3f9ef46bc51acc5933721974e191d2a9659f6566 (patch)
tree9dc0b36ab3f9f70ce0a7d0629e1a56aa2b41aed1 /host/include
parentbe5f9613311d944b8971570bff444c5af094f0f5 (diff)
downloaduhd-3f9ef46bc51acc5933721974e191d2a9659f6566.tar.gz
uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.tar.bz2
uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.zip
Added support for MinGW cross-compile
* Added CMake toolchain file, compatible with different versions * No dependency on MinGW runtime, all statically linked * Misc coding tweaks to allow MinGW to compile
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/config.hpp9
-rw-r--r--host/include/uhd/transport/nirio/nirio_driver_iface.h4
2 files changed, 10 insertions, 3 deletions
diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp
index 619bd0787..173845fea 100644
--- a/host/include/uhd/config.hpp
+++ b/host/include/uhd/config.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2011,2014 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
@@ -56,6 +56,13 @@ typedef ptrdiff_t ssize_t;
#define UHD_DEPRECATED __declspec(deprecated)
#define UHD_ALIGNED(x) __declspec(align(x))
#define UHD_UNUSED(x) x
+#elif defined(__MINGW32__)
+ #define UHD_EXPORT __declspec(dllexport)
+ #define UHD_IMPORT __declspec(dllimport)
+ #define UHD_INLINE inline
+ #define UHD_DEPRECATED __declspec(deprecated)
+ #define UHD_ALIGNED(x) __declspec(align(x))
+ #define UHD_UNUSED(x) x
#elif defined(__GNUG__) && __GNUG__ >= 4
#define UHD_EXPORT __attribute__((visibility("default")))
#define UHD_IMPORT __attribute__((visibility("default")))
diff --git a/host/include/uhd/transport/nirio/nirio_driver_iface.h b/host/include/uhd/transport/nirio/nirio_driver_iface.h
index 83afd816a..3e0e56a7f 100644
--- a/host/include/uhd/transport/nirio/nirio_driver_iface.h
+++ b/host/include/uhd/transport/nirio/nirio_driver_iface.h
@@ -24,9 +24,9 @@
#include <uhd/transport/nirio/status.h>
#include <uhd/config.hpp>
#if defined(UHD_PLATFORM_WIN32)
- #include <Windows.h>
+ #include <windows.h>
#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
- #include <WinIoCtl.h>
+ #include <winioctl.h>
#pragma warning(default:4201)
#elif !defined(UHD_PLATFORM_LINUX)
#include <IOKit/IOKitLib.h>