aboutsummaryrefslogtreecommitdiffstats
path: root/config.mk
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-07 11:37:52 +0200
committerMattias Andrée <maandree@kth.se>2022-07-07 11:37:52 +0200
commit6f96368d8620345a98e148436b96f4262ca73972 (patch)
tree7bff7bc8c08790a524e1d5a7446524e14bc0c255 /config.mk
parentAdd coverage test (diff)
downloadlibsha1-6f96368d8620345a98e148436b96f4262ca73972.tar.gz
libsha1-6f96368d8620345a98e148436b96f4262ca73972.tar.bz2
libsha1-6f96368d8620345a98e148436b96f4262ca73972.tar.xz
Use malloc by default but allow bounded alloca
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--config.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.mk b/config.mk
index 2062ea6..66efe55 100644
--- a/config.mk
+++ b/config.mk
@@ -6,3 +6,9 @@ CC = c99
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700
CFLAGS = -Wall -O3
LDFLAGS = -s
+
+# You can add -DALLOCA_LIMIT=# to CPPFLAGS, where # is a size_t
+# value, to put a limit on how large allocation the library is
+# allowed to make with alloca(3). For buffers that can have any
+# size this limit will be used if it wants to allocate a larger
+# buffer. Choose 0 to use malloc(3) instead of alloca(3).