diff options
Diffstat (limited to 'gnuradio-runtime/include')
-rw-r--r-- | gnuradio-runtime/include/gnuradio/attributes.h | 11 | ||||
-rw-r--r-- | gnuradio-runtime/include/gnuradio/high_res_timer.h | 2 | ||||
-rw-r--r-- | gnuradio-runtime/include/gnuradio/types.h | 23 |
3 files changed, 12 insertions, 24 deletions
diff --git a/gnuradio-runtime/include/gnuradio/attributes.h b/gnuradio-runtime/include/gnuradio/attributes.h index 3d2e764cd5..0102c110c2 100644 --- a/gnuradio-runtime/include/gnuradio/attributes.h +++ b/gnuradio-runtime/include/gnuradio/attributes.h @@ -78,4 +78,15 @@ # pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) #endif +//////////////////////////////////////////////////////////////////////// +// implement cross-compiler VLA macros +//////////////////////////////////////////////////////////////////////// +#ifdef C99 +# define __GR_VLA(TYPE, buf, size) TYPE buf[size] +# define __GR_VLA2D(TYPE, buf, size, size2) TYPE buf[size][size2] +#else +# define __GR_VLA(TYPE, buf, size) TYPE * buf = (TYPE *) alloca(sizeof(TYPE) * (size)) +# define __GR_VLA2D(TYPE, buf, size, size2) TYPE ** buf = (TYPE **) alloca(sizeof(TYPE) * (size) * (size2)) +#endif + #endif /* INCLUDED_GNURADIO_ATTRIBUTES_H */ diff --git a/gnuradio-runtime/include/gnuradio/high_res_timer.h b/gnuradio-runtime/include/gnuradio/high_res_timer.h index ce11cd8ebb..5f6a285a11 100644 --- a/gnuradio-runtime/include/gnuradio/high_res_timer.h +++ b/gnuradio-runtime/include/gnuradio/high_res_timer.h @@ -107,7 +107,7 @@ namespace gr { //////////////////////////////////////////////////////////////////////// #ifdef GNURADIO_HRT_USE_QUERY_PERFORMANCE_COUNTER - #include <Windows.h> + #include <windows.h> inline gr::high_res_timer_type gr::high_res_timer_now(void){ LARGE_INTEGER counts; diff --git a/gnuradio-runtime/include/gnuradio/types.h b/gnuradio-runtime/include/gnuradio/types.h index 6cb0f72834..c91538e60e 100644 --- a/gnuradio-runtime/include/gnuradio/types.h +++ b/gnuradio-runtime/include/gnuradio/types.h @@ -37,29 +37,6 @@ typedef std::vector<double> gr_vector_double; typedef std::vector<void *> gr_vector_void_star; typedef std::vector<const void *> gr_vector_const_void_star; -/* - * #include <config.h> must be placed beforehand - * in the source file including gnuradio/types.h for - * the following to work correctly - */ -#ifdef HAVE_STDINT_H #include <stdint.h> -typedef int16_t gr_int16; -typedef int32_t gr_int32; -typedef int64_t gr_int64; -typedef uint16_t gr_uint16; -typedef uint32_t gr_uint32; -typedef uint64_t gr_uint64; -#else -/* - * Note: these defaults may be wrong on 64-bit systems - */ -typedef short gr_int16; -typedef int gr_int32; -typedef long long gr_int64; -typedef unsigned short gr_uint16; -typedef unsigned int gr_uint32; -typedef unsigned long long gr_uint64; -#endif /* HAVE_STDINT_H */ #endif /* INCLUDED_GR_TYPES_H */ |