Amazing the difference between an "and" and an "or".
[oweals/busybox.git] / include / busybox.h
index 53d22115a65c16eccdb9d12ec27786a0cd6705ed..194fd8220c0c1368a689482497c9e361bfd64fed 100644 (file)
 #include "dmalloc.h"
 #endif
 
+#include <features.h>
+/* Stupid libc doesn't have a reliable way for use to know 
+ * that libc5 is being used.   Assume this is good enough */ 
+#if ! defined __GLIBC__ && ! defined __UCLIBC__
+/* libc5 doesn't define socklen_t */
+typedef unsigned int socklen_t;
+#endif 
+
+
 /* Some useful definitions */
 #define FALSE   ((int) 0)
 #define TRUE    ((int) 1)
@@ -151,6 +160,7 @@ extern char *get_last_path_component(char *path);
 extern FILE *wfopen(const char *path, const char *mode);
 extern FILE *xfopen(const char *path, const char *mode);
 extern void chomp(char *s);
+extern void trim(char *s);
 extern struct BB_applet *find_applet_by_name(const char *name);
 void run_applet_by_name(const char *name, int argc, char **argv);
 
@@ -204,6 +214,11 @@ int nfsmount(const char *spec, const char *node, int *flags,
 #define RB_POWER_OFF   0x4321fedc
 #endif
 
+#if defined(BB_KLOGD) || defined(BB_LOGGER)
+void syslog_msg_with_name(const char *name, int facility, int pri, const char *msg);
+void syslog_msg(int facility, int pri, const char *msg);
+#endif
+
 /* Include our own copy of struct sysinfo to avoid binary compatability
  * problems with Linux 2.4, which changed things.  Grumble, grumble. */
 struct sysinfo {
@@ -233,11 +248,13 @@ extern int sysinfo (struct sysinfo* info);
 #endif
 
 #ifdef BB_FEATURE_HUMAN_READABLE
-const char *format(unsigned long val, unsigned long hr);
-#define KILOBYTE 1024
-#define MEGABYTE (KILOBYTE*1024)
-#define GIGABYTE (MEGABYTE*1024)
+const char *make_human_readable_str(unsigned long val, unsigned long hr);
 #endif
+enum {
+       KILOBYTE = 1024,
+       MEGABYTE = (KILOBYTE*1024),
+       GIGABYTE = (MEGABYTE*1024)
+};
 
 #ifdef BB_FEATURE_BUFFERS_GO_ON_STACK
 #define RESERVE_BB_BUFFER(buffer,len)           char buffer[len]
@@ -247,4 +264,8 @@ const char *format(unsigned long val, unsigned long hr);
 #define RESERVE_BB_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len)
 #endif
 
+#if defined(BB_FEATURE_RM_INTERACTIVE) && defined(BB_RM)
+int ask_confirmation(void);
+#endif
+
 #endif /* _BB_INTERNAL_H_ */