(noted by Adam Slattery).
#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]
+#define RELEASE_BB_BUFFER(buffer) ((void)0)
#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]
+#define RELEASE_BB_BUFFER(buffer) ((void)0)
#else
#define RESERVE_BB_BUFFER(buffer,len) char *buffer=xmalloc(len)
#define RESERVE_BB_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len)
+#define RELEASE_BB_BUFFER(buffer) free (buffer)
#endif
#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]
+#define RELEASE_BB_BUFFER(buffer) ((void)0)
#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]
+#define RELEASE_BB_BUFFER(buffer) ((void)0)
#else
#define RESERVE_BB_BUFFER(buffer,len) char *buffer=xmalloc(len)
#define RESERVE_BB_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len)
+#define RELEASE_BB_BUFFER(buffer) free (buffer)
#endif
#endif
/* Now log it */
logMessage (pri, line);
}
+ RELEASE_BB_BUFFER (tmpbuf);
return n_read;
}
/* Now log it */
logMessage (pri, line);
}
+ RELEASE_BB_BUFFER (tmpbuf);
return n_read;
}