aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-27 22:01:31 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-27 22:01:31 +0000
commit10457b90db925369739a900445b640364eda5e4c (patch)
tree6d6f18564291257738360d97712724868175167e /include
parentf4d40c87d3a18fccb8c0946fc09f1d8f24a2bcf3 (diff)
downloadbusybox-10457b90db925369739a900445b640364eda5e4c.tar.gz
make pidfile writing configurable.
[ui]toa_to_buf: change API. No users yet.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 67fd2af21..d734abed6 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -408,10 +408,11 @@ extern FILE *fopen_or_warn(const char *filename, const char *mode);
extern FILE *fopen_or_warn_stdin(const char *filename);
-extern void utoa_to_buf(unsigned n, char *buf, unsigned buflen);
extern char *utoa(unsigned n);
-extern void itoa_to_buf(int n, char *buf, unsigned buflen);
extern char *itoa(int n);
+/* Returns a pointer past the formatted number, does NOT null-terminate */
+extern char *utoa_to_buf(unsigned n, char *buf, unsigned buflen);
+extern char *itoa_to_buf(int n, char *buf, unsigned buflen);
extern void smart_ulltoa5(unsigned long long ul, char buf[5]);
/* Put a string of hex bytes (ala "1b"), return advanced pointer */
extern char *bin2hex(char *buf, const char *cp, int count);
@@ -542,6 +543,14 @@ extern void llist_unlink(llist_t **head, llist_t *elm);
extern void llist_free(llist_t *elm, void (*freeit)(void *data));
extern llist_t* llist_rev(llist_t *list);
+#if ENABLE_FEATURE_PIDFILE
+int write_pidfile(const char *path);
+#define remove_pidfile(f) ((void)unlink(f))
+#else
+#define write_pidfile(f) 1
+#define remove_pidfile(f) ((void)0)
+#endif
+
enum {
LOGMODE_NONE = 0,
LOGMODE_STDIO = 1<<0,