From d35c21587a4139031c077fd122252217a4713681 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 25 Jan 2001 23:49:09 +0000 Subject: Commit Larry Doolittle's buffers-on-stack/buffers-via-malloc patch. -Erik --- include/busybox.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/busybox.h') diff --git a/include/busybox.h b/include/busybox.h index 018c636cf..be6c6f305 100644 --- a/include/busybox.h +++ b/include/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_ */ -- cgit v1.2.3