sendmail: new applet by dronnikov at gmail.com
[oweals/busybox.git] / include / libbb.h
index fef8fe2e0cfd7ebe1df12c5d3d1e8060b4aad26b..c5b685985e91dd504a60a2159631cca0bfe22d57 100644 (file)
@@ -67,6 +67,9 @@
 #include "shadow_.h"
 #endif
 
+/* Some libc's don't declare it, help them */
+extern char **environ;
+
 #if defined(__GLIBC__) && __GLIBC__ < 2
 int vdprintf(int d, const char *format, va_list ap);
 #endif
@@ -503,7 +506,9 @@ char *itoa(int n);
 /* Returns a pointer past the formatted number, does NOT null-terminate */
 char *utoa_to_buf(unsigned n, char *buf, unsigned buflen);
 char *itoa_to_buf(int n, char *buf, unsigned buflen);
-void smart_ulltoa5(unsigned long long ul, char buf[5]);
+/* Intelligent formatters of bignums */
+void smart_ulltoa4(unsigned long long ul, char buf[5], const char *scale);
+void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale);
 //TODO: provide pointer to buf (avoid statics)?
 const char *make_human_readable_str(unsigned long long size,
                unsigned long block_size, unsigned long display_unit);
@@ -990,6 +995,7 @@ typedef struct procps_status_t {
         * it is memset(0) for each process in procps_scan() */
        unsigned long vsz, rss; /* we round it to kbytes */
        unsigned long stime, utime;
+       unsigned long start_time;
        unsigned pid;
        unsigned ppid;
        unsigned pgid;
@@ -1032,11 +1038,12 @@ enum {
        PSSCAN_SMAPS    = (1 << 15) * ENABLE_FEATURE_TOPMEM,
        PSSCAN_ARGVN    = (1 << 16) * (ENABLE_PGREP | ENABLE_PKILL),
        USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
+       PSSCAN_START_TIME = 1 << 18,
        /* These are all retrieved from proc/NN/stat in one go: */
        PSSCAN_STAT     = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID
                        | PSSCAN_COMM | PSSCAN_STATE
                        | PSSCAN_VSZ | PSSCAN_RSS
-                       | PSSCAN_STIME | PSSCAN_UTIME
+                       | PSSCAN_STIME | PSSCAN_UTIME | PSSCAN_START_TIME
                        | PSSCAN_TTY,
 };
 procps_status_t* alloc_procps_scan(int flags);
@@ -1094,7 +1101,7 @@ enum {    /* DO NOT CHANGE THESE VALUES!  cp.c, mv.c, install.c depend on them. */
 
 #define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c")
 extern const char *applet_name;
-/* "BusyBox vN.N.N (timestamp or extra_vestion)" */
+/* "BusyBox vN.N.N (timestamp or extra_version)" */
 extern const char bb_banner[];
 extern const char bb_msg_memory_exhausted[];
 extern const char bb_msg_invalid_date[];