+char *xgetcwd(char *cwd);
+char *xreadlink(const char *path);
+char *concat_path_file(const char *path, const char *filename);
+char *last_char_is(const char *s, int c);
+
+extern long arith (const char *startbuf, int *errcode);
+
+int read_package_field(const char *package_buffer, char **field_name, char **field_value);
+char *fgets_str(FILE *file, const char *terminating_string);
+
+extern int uncompress(int fd_in, int fd_out);
+extern int inflate(int in, int out);
+
+extern struct hostent *xgethostbyname(const char *name);
+extern struct hostent *xgethostbyname2(const char *name, int af);
+extern int create_icmp_socket(void);
+extern int create_icmp6_socket(void);
+extern int xconnect(const char *host, const char *port);
+
+char *dirname (char *path);
+
+int make_directory (char *path, long mode, int flags);
+
+const char *u_signal_names(const char *str_sig, int *signo, int startnum);
+char *simplify_path(const char *path);
+
+#define CT_AUTO 0
+#define CT_UNIX2DOS 1
+#define CT_DOS2UNIX 2
+/* extern int convert(char *fn, int ConvType); */
+
+enum {
+ FILEUTILS_PRESERVE_STATUS = 1,
+ FILEUTILS_DEREFERENCE = 2,
+ FILEUTILS_RECUR = 4,
+ FILEUTILS_FORCE = 8,
+ FILEUTILS_INTERACTIVE = 16
+};
+
+extern const char *applet_name;
+extern const char * const full_version;
+extern const char * const name_too_long;
+extern const char * const omitting_directory;
+extern const char * const not_a_directory;
+extern const char * const memory_exhausted;
+extern const char * const invalid_date;
+extern const char * const invalid_option;
+extern const char * const io_error;
+extern const char * const dash_dash_help;
+extern const char * const write_error;
+extern const char * const too_few_args;
+extern const char * const name_longer_than_foo;
+extern const char * const unknown;
+extern const char * const can_not_create_raw_socket;
+extern const char * const nologin_file;
+extern const char * const passwd_file;
+extern const char * const shadow_file;
+extern const char * const gshadow_file;
+extern const char * const group_file;
+extern const char * const securetty_file;
+extern const char * const motd_file;
+extern const char * const issue_file;
+extern const char * const _path_login;
+
+#ifdef CONFIG_FEATURE_DEVFS
+# define CURRENT_VC "/dev/vc/0"
+# define VC_1 "/dev/vc/1"
+# define VC_2 "/dev/vc/2"
+# define VC_3 "/dev/vc/3"
+# define VC_4 "/dev/vc/4"
+# define VC_5 "/dev/vc/5"
+# define SC_0 "/dev/tts/0"
+# define SC_1 "/dev/tts/1"
+# define VC_FORMAT "/dev/vc/%d"
+# define SC_FORMAT "/dev/tts/%d"
+# define LOOP_FORMAT "/dev/loop/%d"
+#else
+# define CURRENT_VC "/dev/tty0"
+# define VC_1 "/dev/tty1"
+# define VC_2 "/dev/tty2"
+# define VC_3 "/dev/tty3"
+# define VC_4 "/dev/tty4"
+# define VC_5 "/dev/tty5"
+# define SC_0 "/dev/ttyS0"
+# define SC_1 "/dev/ttyS1"
+# define VC_FORMAT "/dev/tty%d"
+# define SC_FORMAT "/dev/ttyS%d"
+# define LOOP_FORMAT "/dev/loop%d"
+#endif
+
+/* The following devices are the same on devfs and non-devfs systems. */
+#define CURRENT_TTY "/dev/tty"
+#define CONSOLE_DEV "/dev/console"
+
+int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
+void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);
+void reset_ino_dev_hashtable(void);
+
+/* Stupid gcc always includes its own builtin strlen()... */
+extern size_t xstrlen(const char *string);
+#define strlen(x) xstrlen(x)
+
+void bb_asprintf(char **string_ptr, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
+
+
+#define FAIL_DELAY 3
+extern void change_identity ( const struct passwd *pw );
+extern void run_shell ( const char *shell, int loginshell, const char *command, const char **additional_args );
+extern int run_parts(char **args, const unsigned char test_mode);
+extern int restricted_shell ( const char *shell );
+extern void setup_environment ( const char *shell, int loginshell, int changeenv, const struct passwd *pw );
+extern int correct_password ( const struct passwd *pw );
+extern char *pw_encrypt(const char *clear, const char *salt);
+extern struct spwd *pwd_to_spwd(const struct passwd *pw);
+extern int obscure(const char *old, const char *newval, const struct passwd *pwdp);
+
+extern int xopen(const char *pathname, int flags);
+extern ssize_t xread(int fd, void *buf, size_t count);
+extern void xread_all(int fd, void *buf, size_t count);
+extern unsigned char xread_char(int fd);
+
+typedef struct {
+ int pid;
+ char user[9];
+ char state[4];
+ unsigned long rss;
+ int ppid;
+#ifdef FEATURE_CPU_USAGE_PERCENTAGE
+ unsigned pcpu;
+ unsigned long stime, utime;
+#endif
+ char *cmd;
+
+ /* basename of executable file in call to exec(2),
+ size from kernel headers */
+ char short_cmd[16];
+} procps_status_t;
+
+extern procps_status_t * procps_scan(int save_user_arg0);
+extern unsigned short compare_string_array(const char *string_array[], const char *key);
+
+extern int my_query_module(const char *name, int which, void **buf, size_t *bufsize, size_t *ret);
+
+typedef struct llist_s {
+ char *data;
+ struct llist_s *link;
+} llist_t;
+extern llist_t *llist_add_to(llist_t *old_head, char *new_item);
+
+#endif /* __LIBCONFIG_H__ */