Applied patch from Larry Doolittle to give users the third option of putting

buffers in BSS (in addition to stack and heap).
This commit is contained in:
Mark Whitley
2001-04-20 17:40:33 +00:00
parent 6ebd633829
commit 3e310ac309
3 changed files with 15 additions and 0 deletions

View File

@ -72,9 +72,14 @@ extern const char *applet_name;
#define RESERVE_BB_BUFFER(buffer,len) char buffer[len]
#define RESERVE_BB_UBUFFER(buffer,len) unsigned char buffer[len]
#else
#ifdef BB_FEATURE_BUFFERS_GO_IN_BSS
#define RESERVE_BB_BUFFER(buffer,len) static char buffer[len]
#define RESERVE_BB_UBUFFER(buffer,len) static 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
/* Bit map related macros -- libc5 doens't provide these... sigh. */