summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/opus/src/celt/stack_alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/opus/src/celt/stack_alloc.h')
-rw-r--r--chromium/third_party/opus/src/celt/stack_alloc.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/chromium/third_party/opus/src/celt/stack_alloc.h b/chromium/third_party/opus/src/celt/stack_alloc.h
index 1c093a8cdce..316a6ce12c0 100644
--- a/chromium/third_party/opus/src/celt/stack_alloc.h
+++ b/chromium/third_party/opus/src/celt/stack_alloc.h
@@ -32,6 +32,9 @@
#ifndef STACK_ALLOC_H
#define STACK_ALLOC_H
+#include "opus_types.h"
+#include "opus_defines.h"
+
#if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK))
#error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode."
#endif
@@ -92,6 +95,8 @@
#define SAVE_STACK
#define RESTORE_STACK
#define ALLOC_STACK
+/* C99 does not allow VLAs of size zero */
+#define ALLOC_NONE 1
#elif defined(USE_ALLOCA)
@@ -106,6 +111,7 @@
#define SAVE_STACK
#define RESTORE_STACK
#define ALLOC_STACK
+#define ALLOC_NONE 0
#else
@@ -143,6 +149,7 @@ extern char *global_stack_top;
#define VARDECL(type, var) type *var
#define ALLOC(var, size, type) var = PUSH(global_stack, size, type)
#define SAVE_STACK char *_saved_stack = global_stack;
+#define ALLOC_NONE 0
#endif /* VAR_ARRAYS */
@@ -159,7 +166,7 @@ extern char *global_stack_top;
#else
-static inline int _opus_false(void) {return 0;}
+static OPUS_INLINE int _opus_false(void) {return 0;}
#define OPUS_CHECK_ARRAY(ptr, len) _opus_false()
#define OPUS_CHECK_VALUE(value) _opus_false()
#define OPUS_PRINT_INT(value) do{}while(0)