summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/Modules/FindZeroMQ.cmake2
-rw-r--r--gnuradio-runtime/lib/block.cc2
-rw-r--r--gnuradio-runtime/lib/math/qa_fast_atan2f.cc12
-rw-r--r--gnuradio-runtime/lib/thread/thread.cc26
-rw-r--r--gnuradio-runtime/lib/tpb_thread_body.cc5
-rw-r--r--gr-filter/lib/pfb_channelizer_ccf_impl.cc4
-rwxr-xr-xgr-filter/python/filter/qa_freq_xlating_fft_filter.py2
-rw-r--r--gr-uhd/include/gnuradio/uhd/usrp_sink.h4
-rw-r--r--gr-uhd/include/gnuradio/uhd/usrp_source.h4
-rw-r--r--gr-uhd/swig/uhd_swig.i8
-rw-r--r--gr-vocoder/lib/codec2/fdmdv.c4
12 files changed, 55 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 935669d6d6..8c2de40cef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,7 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
if(MSVC)
include_directories(${CMAKE_SOURCE_DIR}/cmake/msvc) #missing headers
- add_definitions(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp
+ add_definitions(-D_WIN32_WINNT=0x0502) #Minimum version: "Windows Server 2003 with SP1, Windows XP with SP2"
add_definitions(-DNOMINMAX) #disables stupidity and enables std::min and std::max
add_definitions( #stop all kinds of compatibility warnings
-D_SCL_SECURE_NO_WARNINGS
diff --git a/cmake/Modules/FindZeroMQ.cmake b/cmake/Modules/FindZeroMQ.cmake
index c1155c4cc5..62a1c6b969 100644
--- a/cmake/Modules/FindZeroMQ.cmake
+++ b/cmake/Modules/FindZeroMQ.cmake
@@ -2,7 +2,7 @@ INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_ZEROMQ "libzmq")
FIND_PATH(ZEROMQ_INCLUDE_DIRS
- NAMES zmq.h
+ NAMES zmq.hpp
HINTS ${PC_ZEROMQ_INCLUDE_DIR}
${CMAKE_INSTALL_PREFIX}/include
PATHS
diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc
index 6309bca9b1..b5bfbdaab3 100644
--- a/gnuradio-runtime/lib/block.cc
+++ b/gnuradio-runtime/lib/block.cc
@@ -30,7 +30,6 @@
#include <gnuradio/buffer.h>
#include <gnuradio/prefs.h>
#include <gnuradio/config.h>
-#include <gnuradio/rpcregisterhelpers.h>
#include <stdexcept>
#include <iostream>
@@ -796,6 +795,7 @@ namespace gr {
{
d_pc_rpc_set = true;
#if defined(GR_CTRLPORT) && defined(GR_PERFORMANCE_COUNTERS)
+#include <gnuradio/rpcregisterhelpers.h>
d_rpc_vars.push_back(
rpcbasic_sptr(new rpcbasic_register_trigger<block>(
alias(), "reset_perf_counters", &block::reset_perf_counters,
diff --git a/gnuradio-runtime/lib/math/qa_fast_atan2f.cc b/gnuradio-runtime/lib/math/qa_fast_atan2f.cc
index 2ec4ecb182..b704756798 100644
--- a/gnuradio-runtime/lib/math/qa_fast_atan2f.cc
+++ b/gnuradio-runtime/lib/math/qa_fast_atan2f.cc
@@ -30,6 +30,12 @@
#include <cmath>
#include <limits>
+#ifdef _MSC_VER
+#define isnan _isnan
+#else
+using std::isnan;
+#endif
+
void
qa_fast_atan2f::t1()
{
@@ -92,7 +98,7 @@ qa_fast_atan2f::t2()
x = inf;
y = inf;
gr_atan2f = gr::fast_atan2f(x, y);
- CPPUNIT_ASSERT(std::isnan(gr_atan2f));
+ CPPUNIT_ASSERT(isnan(gr_atan2f));
/* Test x as NAN */
@@ -123,11 +129,11 @@ qa_fast_atan2f::t2()
x = inf;
y = nan;
gr_atan2f = gr::fast_atan2f(x, y);
- CPPUNIT_ASSERT(std::isnan(gr_atan2f));
+ CPPUNIT_ASSERT(isnan(gr_atan2f));
x = nan;
y = inf;
gr_atan2f = gr::fast_atan2f(x, y);
- CPPUNIT_ASSERT(std::isnan(gr_atan2f));
+ CPPUNIT_ASSERT(isnan(gr_atan2f));
}
diff --git a/gnuradio-runtime/lib/thread/thread.cc b/gnuradio-runtime/lib/thread/thread.cc
index e393ae5438..483dfed493 100644
--- a/gnuradio-runtime/lib/thread/thread.cc
+++ b/gnuradio-runtime/lib/thread/thread.cc
@@ -120,21 +120,14 @@ namespace gr {
DWORD dwFlags; // Reserved for future use, must be zero
} THREADNAME_INFO;
#pragma pack(pop)
- void
- set_thread_name(gr_thread_t thread, std::string name)
+ static void
+ _set_thread_name(gr_thread_t thread, const char* name, DWORD dwThreadId)
{
const DWORD SET_THREAD_NAME_EXCEPTION = 0x406D1388;
- DWORD dwThreadId = GetThreadId(thread);
- if (dwThreadId == 0)
- return;
-
- if (name.empty())
- name = boost::str(boost::format("thread %lu") % dwThreadId);
-
THREADNAME_INFO info;
info.dwType = 0x1000;
- info.szName = name.c_str();
+ info.szName = name;
info.dwThreadID = dwThreadId;
info.dwFlags = 0;
@@ -147,6 +140,19 @@ namespace gr {
}
}
+ void
+ set_thread_name(gr_thread_t thread, std::string name)
+ {
+ DWORD dwThreadId = GetThreadId(thread);
+ if (dwThreadId == 0)
+ return;
+
+ if (name.empty())
+ name = boost::str(boost::format("thread %lu") % dwThreadId);
+
+ _set_thread_name(thread, name.c_str(), dwThreadId);
+ }
+
} /* namespace thread */
} /* namespace gr */
diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc b/gnuradio-runtime/lib/tpb_thread_body.cc
index d2f0fce833..d80ab860fa 100644
--- a/gnuradio-runtime/lib/tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/tpb_thread_body.cc
@@ -37,7 +37,12 @@ namespace gr {
{
//std::cerr << "tpb_thread_body: " << block << std::endl;
+#ifdef _MSC_VER
+ #include <Windows.h>
+ thread::set_thread_name(GetCurrentThread(), boost::str(boost::format("%s%d") % block->name() % block->unique_id()));
+#else
thread::set_thread_name(pthread_self(), boost::str(boost::format("%s%d") % block->name() % block->unique_id()));
+#endif
block_detail *d = block->detail().get();
block_executor::state s;
diff --git a/gr-filter/lib/pfb_channelizer_ccf_impl.cc b/gr-filter/lib/pfb_channelizer_ccf_impl.cc
index fe1966bc3f..c439353505 100644
--- a/gr-filter/lib/pfb_channelizer_ccf_impl.cc
+++ b/gr-filter/lib/pfb_channelizer_ccf_impl.cc
@@ -28,6 +28,10 @@
#include <gnuradio/io_signature.h>
#include <stdio.h>
+#ifdef _MSC_VER
+#define round(number) number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5)
+#endif
+
namespace gr {
namespace filter {
diff --git a/gr-filter/python/filter/qa_freq_xlating_fft_filter.py b/gr-filter/python/filter/qa_freq_xlating_fft_filter.py
index d0e18fc17f..d5c7d41dd9 100755
--- a/gr-filter/python/filter/qa_freq_xlating_fft_filter.py
+++ b/gr-filter/python/filter/qa_freq_xlating_fft_filter.py
@@ -75,7 +75,7 @@ class test_freq_xlating_filter(gr_unittest.TestCase):
def assert_fft_ok(self, expected_result, result_data):
expected_result = expected_result[:len(result_data)]
self.assertComplexTuplesAlmostEqual2 (expected_result, result_data,
- abs_eps=1e-9, rel_eps=1.2e-3)
+ abs_eps=1e-9, rel_eps=1.5e-3)
def test_fft_filter_ccf_001(self):
diff --git a/gr-uhd/include/gnuradio/uhd/usrp_sink.h b/gr-uhd/include/gnuradio/uhd/usrp_sink.h
index 35bb2e4384..d3e732cc30 100644
--- a/gr-uhd/include/gnuradio/uhd/usrp_sink.h
+++ b/gr-uhd/include/gnuradio/uhd/usrp_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2010-2013 Free Software Foundation, Inc.
+ * Copyright 2010-2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -528,6 +528,8 @@ namespace gr {
/*!
* Get access to the underlying uhd device object.
+ *
+ * NOTE: This function is only available in C++.
* \return the multi usrp device object
*/
virtual ::uhd::usrp::multi_usrp::sptr get_device(void) = 0;
diff --git a/gr-uhd/include/gnuradio/uhd/usrp_source.h b/gr-uhd/include/gnuradio/uhd/usrp_source.h
index f330ee0901..2e165cf771 100644
--- a/gr-uhd/include/gnuradio/uhd/usrp_source.h
+++ b/gr-uhd/include/gnuradio/uhd/usrp_source.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2010-2013 Free Software Foundation, Inc.
+ * Copyright 2010-2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -535,6 +535,8 @@ namespace gr {
/*!
* Get access to the underlying uhd device object.
+ *
+ * NOTE: This function is only available in C++.
* \return the multi usrp device object
*/
virtual ::uhd::usrp::multi_usrp::sptr get_device(void) = 0;
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index 4eaef9112d..a4b1528439 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2010-2013 Free Software Foundation, Inc.
+ * Copyright 2010-2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -40,6 +40,12 @@
%include "uhd_swig_doc.i"
////////////////////////////////////////////////////////////////////////
+// SWIG should not see the uhd::usrp::multi_usrp class
+////////////////////////////////////////////////////////////////////////
+%ignore gr::uhd::usrp_sink::get_device;
+%ignore gr::uhd::usrp_source::get_device;
+
+////////////////////////////////////////////////////////////////////////
// block headers
////////////////////////////////////////////////////////////////////////
%{
diff --git a/gr-vocoder/lib/codec2/fdmdv.c b/gr-vocoder/lib/codec2/fdmdv.c
index 6af1cf4c6d..8855f76ae5 100644
--- a/gr-vocoder/lib/codec2/fdmdv.c
+++ b/gr-vocoder/lib/codec2/fdmdv.c
@@ -25,6 +25,10 @@
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef _MSC_VER
+#define round(number) number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5)
+#endif
+
/*---------------------------------------------------------------------------*\
INCLUDES