diff options
author | Eric Andersen | 2001-01-25 23:49:09 +0000 |
---|---|---|
committer | Eric Andersen | 2001-01-25 23:49:09 +0000 |
commit | d35c21587a4139031c077fd122252217a4713681 (patch) | |
tree | 7bd14fd247492c00f3d38ae1dbd7727e03fda9ad /include/busybox.h | |
parent | ffde8673fe8b2c32076aa3e01eab1fefc5f08e86 (diff) | |
download | busybox-d35c21587a4139031c077fd122252217a4713681.zip busybox-d35c21587a4139031c077fd122252217a4713681.tar.gz |
Commit Larry Doolittle's buffers-on-stack/buffers-via-malloc patch.
-Erik
Diffstat (limited to 'include/busybox.h')
-rw-r--r-- | include/busybox.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/busybox.h b/include/busybox.h index 018c636..be6c6f3 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_ */ |