diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-06-10 15:15:16 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-07-13 16:30:36 +0200 |
commit | 893b74c770b81f2c09094577e2de720155f84b61 (patch) | |
tree | ce430f554cf032c70eab8a95228731afbffc6efd /gnuradio-runtime/include/gnuradio/attributes.h | |
parent | 7ac7cf6246e4d984d36c64df10ba4d2b2f6b2204 (diff) | |
parent | 6fb0ff274a05daf2f2677af14337704fb88081f7 (diff) |
Merge remote-tracking branch 'grcwg/next_grcwg' into gtk3
Diffstat (limited to 'gnuradio-runtime/include/gnuradio/attributes.h')
-rw-r--r-- | gnuradio-runtime/include/gnuradio/attributes.h | 11 |
1 files changed, 11 insertions, 0 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 */ |