From: des Date: Tue, 8 Aug 2006 12:57:53 +0000 (+0000) Subject: Add a setproctitle() stub to libcompat. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dadde3282db85834c38e7392f1ae9e4420d2cd31;p=varnish Add a setproctitle() stub to libcompat. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@773 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/mgt_child.c b/varnish-cache/bin/varnishd/mgt_child.c index c870f048..7dbca201 100644 --- a/varnish-cache/bin/varnishd/mgt_child.c +++ b/varnish-cache/bin/varnishd/mgt_child.c @@ -17,6 +17,8 @@ #include /* XXX */ +#include "compat/setproctitle.h" + #include "heritage.h" #include "mgt.h" #include "cli.h" diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index d63734ae..e5833bdd 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -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]) diff --git a/varnish-cache/include/Makefile.am b/varnish-cache/include/Makefile.am index 943b3fb2..c2350df6 100644 --- a/varnish-cache/include/Makefile.am +++ b/varnish-cache/include/Makefile.am @@ -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 index 00000000..cc978446 --- /dev/null +++ b/varnish-cache/include/compat/setproctitle.h @@ -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 diff --git a/varnish-cache/lib/libcompat/Makefile.am b/varnish-cache/lib/libcompat/Makefile.am index 472ae705..dc2dd804 100644 --- a/varnish-cache/lib/libcompat/Makefile.am +++ b/varnish-cache/lib/libcompat/Makefile.am @@ -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 index 00000000..eda8b8e4 --- /dev/null +++ b/varnish-cache/lib/libcompat/setproctitle.c @@ -0,0 +1,20 @@ +/* + * $Id$ + */ + +#ifndef HAVE_SETPROCTITLE + +#include + +#include "compat/setproctitle.h" + +void +setproctitle(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + /* XXX */ + va_end(ap); +} +#endif