aboutsummaryrefslogtreecommitdiff
path: root/celt
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2012-05-13 11:40:19 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-05-15 09:18:39 -0400
commit936f52ca0ef4729f26dec092ef8388d2d4c0bf07 (patch)
treec97dadd8122827cc0f906a624c549899b66c0af7 /celt
parentefbb5ea40167c7b73f27235eaa787ca3705b4694 (diff)
downloadlibopus-936f52ca0ef4729f26dec092ef8388d2d4c0bf07.tar.gz
Add #errors when !OPUS_BUILD or !(VAR_ARRAYS||USE_ALLOCA||NONTHREADSAFE_PSEUDOSTACK).
This will help prevent people using non-standard build environments from footgunning themselves and becoming a support burden.
Diffstat (limited to 'celt')
-rw-r--r--celt/stack_alloc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/celt/stack_alloc.h b/celt/stack_alloc.h
index 68569e2b..a6f06d22 100644
--- a/celt/stack_alloc.h
+++ b/celt/stack_alloc.h
@@ -32,6 +32,10 @@
#ifndef STACK_ALLOC_H
#define STACK_ALLOC_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
+
#ifdef USE_ALLOCA
# ifdef WIN32
# include <malloc.h>