/*
-** Copyright 2000-2006 Double Precision, Inc. See COPYING for
+** Copyright 2000-2008 Double Precision, Inc. See COPYING for
** distribution information.
*/
#include "courierauthdebug.h"
#include "pkglibdir.h"
#include "authstaticlist.h"
+#include "libhmac/hmac.h"
+#include "cramlib.h"
#include <ltdl.h>
-static const char rcsid[]="$Id: authdaemond.c,v 1.33 2006/06/01 10:47:32 mrsam Exp $";
+static const char rcsid[]="$Id: authdaemond.c,v 1.35 2009/06/27 15:51:48 mrsam Exp $";
#ifndef SOMAXCONN
#define SOMAXCONN 5
#endif
-#if HAVE_HMACLIB
-#include "libhmac/hmac.h"
-#include "cramlib.h"
-#endif
-
#include "authstaticlist.h"
static unsigned ndaemons;
static int sighup_pipe= -1;
-static RETSIGTYPE sighup(int n)
+static void sighup(int n)
{
if (sighup_pipe >= 0)
{
sighup_pipe= -1;
}
signal(SIGHUP, sighup);
-#if RETSIGTYPE != void
- return (1);
-#endif
}
static int sigterm_received=0;
-static RETSIGTYPE sigterm(int n)
+static void sigterm(int n)
{
sigterm_received=1;
if (sighup_pipe >= 0)
kill(0, SIGTERM);
_exit(0);
}
-
-#if RETSIGTYPE != void
- return (0);
-#endif
}
static int startchildren(int *pipefd)