]> err.no Git - varnish/commitdiff
Add a setproctitle() stub to libcompat.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 8 Aug 2006 12:57:53 +0000 (12:57 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 8 Aug 2006 12:57:53 +0000 (12:57 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@773 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/mgt_child.c
varnish-cache/configure.ac
varnish-cache/include/Makefile.am
varnish-cache/include/compat/setproctitle.h [new file with mode: 0644]
varnish-cache/lib/libcompat/Makefile.am
varnish-cache/lib/libcompat/setproctitle.c [new file with mode: 0644]

index c870f04804392ed27fc9d73a8fbf817948176746..7dbca2019889d84caddac24e7cd6d93a23fa4f4c 100644 (file)
@@ -17,6 +17,8 @@
 
 #include <err.h>               /* XXX */
 
+#include "compat/setproctitle.h"
+
 #include "heritage.h"
 #include "mgt.h"
 #include "cli.h"
index d63734ae317fe7f52cf4397f4bad797fd42afd42..e5833bddc02093a450eed670c71a56665803c6b2 100644 (file)
@@ -68,6 +68,7 @@ AC_CHECK_FUNCS([strptime])
 # These functions are provided by libcompat on platforms where they
 # are not available
 AC_CHECK_FUNCS([asprintf vasprintf])
+AC_CHECK_FUNCS([setproctitle])
 AC_CHECK_FUNCS([srandomdev])
 AC_CHECK_FUNCS([strlcat strlcpy])
 AC_CHECK_FUNCS([vis strvis strvisx])
index 943b3fb26ea6a1e7cdc24b300ba0fbbc04134cf0..c2350df61d51fd1b66b89aaaeaa0666941ed9e09 100644 (file)
@@ -6,6 +6,7 @@ noinst_HEADERS = \
        cli_common.h \
        cli_priv.h \
        compat/asprintf.h \
+       compat/setproctitle.h \
        compat/srandomdev.h \
        compat/strlcat.h \
        compat/strlcpy.h \
diff --git a/varnish-cache/include/compat/setproctitle.h b/varnish-cache/include/compat/setproctitle.h
new file mode 100644 (file)
index 0000000..cc97844
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * $Id$
+ */
+
+#ifndef COMPAT_SETPROCTITLE_H_INCLUDED
+#define COMPAT_SETPROCTITLE_H_INCLUDED
+
+#ifndef HAVE_SETPROCTITLE
+void setproctitle(const char *fmt, ...);
+#endif
+
+#endif
index 472ae7050273d14365648cb66aad3653f6093425..dc2dd804073fd3877c3d6a8d5c804653e8f2f340 100644 (file)
@@ -7,6 +7,7 @@ lib_LIBRARIES = libcompat.a
 libcompat_a_SOURCES = \
        asprintf.c \
        vasprintf.c \
+       setproctitle.c \
        srandomdev.c \
        strlcat.c \
        strlcpy.c \
diff --git a/varnish-cache/lib/libcompat/setproctitle.c b/varnish-cache/lib/libcompat/setproctitle.c
new file mode 100644 (file)
index 0000000..eda8b8e
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * $Id$
+ */
+
+#ifndef HAVE_SETPROCTITLE
+
+#include <stdarg.h>
+
+#include "compat/setproctitle.h"
+
+void
+setproctitle(const char *fmt, ...)
+{
+       va_list ap;
+
+       va_start(ap, fmt);
+       /* XXX */
+       va_end(ap);
+}
+#endif