summaryrefslogtreecommitdiff
path: root/busybox.h
diff options
context:
space:
mode:
Diffstat (limited to 'busybox.h')
-rw-r--r--busybox.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/busybox.h b/busybox.h
index 018c636..be6c6f3 100644
--- a/busybox.h
+++ b/busybox.h
@@ -266,4 +266,12 @@ char *format(unsigned long val, unsigned long hr);
#define GIGABYTE (MEGABYTE*1024)
#endif
+#ifdef BB_FEATURE_BUFFERS_GO_ON_STACK
+#define RESERVE_BB_BUFFER(buffer,len) char buffer[len]
+#define RESERVE_BB_UBUFFER(buffer,len) unsigned char buffer[len]
+#else
+#define RESERVE_BB_BUFFER(buffer,len) char *buffer=xmalloc(len)
+#define RESERVE_BB_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len)
+#endif
+
#endif /* _BB_INTERNAL_H_ */