From bf8c889631f48f9112987eb0f26e7c6eaa2429aa Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 16 Jan 2018 12:57:06 -0800 Subject: Define DECL_VLA where it's used --- OpenAL32/Include/alMain.h | 6 ------ OpenAL32/sample_cvt.c | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 4f6d0b49..c9439770 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -173,12 +173,6 @@ typedef ALuint64SOFT ALuint64; */ #define FAM_SIZE(T, M, N) (offsetof(T, M) + sizeof(((T*)NULL)->M[0])*(N)) -#ifdef HAVE_C99_VLA -#define DECL_VLA(T, _name, _size) T _name[(_size)] -#else -#define DECL_VLA(T, _name, _size) T *_name = alloca((_size) * sizeof(T)) -#endif - static const union { ALuint u; diff --git a/OpenAL32/sample_cvt.c b/OpenAL32/sample_cvt.c index 58cad523..535d8b6d 100644 --- a/OpenAL32/sample_cvt.c +++ b/OpenAL32/sample_cvt.c @@ -15,6 +15,13 @@ #include "alBuffer.h" +#ifdef HAVE_C99_VLA +#define DECL_VLA(T, _name, _size) T _name[(_size)] +#else +#define DECL_VLA(T, _name, _size) T *_name = alloca((_size) * sizeof(T)) +#endif + + /* IMA ADPCM Stepsize table */ static const int IMAStep_size[89] = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, -- cgit v1.2.3