Commit Larry Doolittle's buffers-on-stack/buffers-via-malloc patch.

-Erik
This commit is contained in:
Eric Andersen
2001-01-25 23:49:09 +00:00
parent ffde8673fe
commit d35c21587a
12 changed files with 51 additions and 28 deletions

View File

@@ -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_ */