Ok, if no shell is enabled, don't include any of the SH_IS_<name>
[oweals/busybox.git] / include / busybox.h
index d4a57732dfb6e57dea72efa88422c783ba6ddb5e..f79dac8c880f9f705f08d309e74a64b79d82e7f8 100644 (file)
@@ -31,6 +31,8 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#define BB_BANNER "BusyBox v" BB_VER " (" BB_BT ")"
+
 #ifdef DMALLOC
 #include "dmalloc.h"
 #endif
@@ -64,14 +66,20 @@ extern const struct BB_applet applets[];
 #include "applets.h"
 #undef PROTOTYPES
 
-extern const char *applet_name;
-
 #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