summaryrefslogtreecommitdiffstats
path: root/maildrop
diff options
context:
space:
mode:
authorSam Varshavchik2022-05-22 23:52:28 -0400
committerSam Varshavchik2022-05-22 23:52:31 -0400
commit83e37efc8ed785cd095eb585ff747e5702ec49b3 (patch)
tree15aed6da6214e9a03d91be1754cd351175349945 /maildrop
parent1ce81fa6af52651628a0bffcd8b15fdb459901a5 (diff)
downloadcourier-libs-83e37efc8ed785cd095eb585ff747e5702ec49b3.tar.bz2
gcc 12, autotool updates, sqwebmail fixes.
Diffstat (limited to 'maildrop')
-rw-r--r--maildrop/alarm.C6
-rw-r--r--maildrop/alarm.h2
-rw-r--r--maildrop/configure.ac75
-rw-r--r--maildrop/maildrop.C11
-rw-r--r--maildrop/maildrop.h2
-rw-r--r--maildrop/mytime.h6
6 files changed, 43 insertions, 59 deletions
diff --git a/maildrop/alarm.C b/maildrop/alarm.C
index f65005a..3711888 100644
--- a/maildrop/alarm.C
+++ b/maildrop/alarm.C
@@ -58,14 +58,10 @@ void Alarm::set_sig()
alarm(first->set_interval);
}
-RETSIGTYPE Alarm::alarm_func(int)
+void Alarm::alarm_func(int)
{
if (first) cancel_sig(first->set_interval);
set_sig();
-
-#if RETSIGTYPE != void
- return (0);
-#endif
}
unsigned Alarm::sig_left()
diff --git a/maildrop/alarm.h b/maildrop/alarm.h
index 01d926c..057d14e 100644
--- a/maildrop/alarm.h
+++ b/maildrop/alarm.h
@@ -28,7 +28,7 @@ static Alarm *first, *last;
static void cancel_sig(unsigned);
static void set_sig();
-static RETSIGTYPE alarm_func(int);
+static void alarm_func(int);
static unsigned sig_left();
public:
Alarm() : next(0), prev(0), set_interval(0) {}
diff --git a/maildrop/configure.ac b/maildrop/configure.ac
index e7a45ec..06a9694 100644
--- a/maildrop/configure.ac
+++ b/maildrop/configure.ac
@@ -2,7 +2,7 @@ dnl
dnl Copyright 1998 - 2022 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(maildrop, 3.0.7, [courier-users@lists.sourceforge.net])
+AC_INIT([maildrop],[3.0.8],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -17,11 +17,10 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_AWK
AC_PROG_LN_S
AC_PROG_CXX
-AM_PROG_LIBTOOL
+LT_INIT
AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)
@@ -33,15 +32,15 @@ maildrop_cv_handle_exceptions=no
if test "$GXX" = yes ; then
-AC_LANG_CPLUSPLUS
+AC_LANG([C++])
-AC_TRY_COMPILE( [
-],[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
throw;
-],,maildrop_cv_handle_exceptions=yes
-)
+]])],[],[maildrop_cv_handle_exceptions=yes
+])
-AC_LANG_C
+AC_LANG([C])
fi
)
@@ -54,14 +53,14 @@ fi
AC_CACHE_CHECK([ability to handle both const and non-const exceptions],
maildrop_cv_const_exceptions,
-AC_LANG_CPLUSPLUS
+AC_LANG([C++])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
extern void foo();
extern void bar(const char *);
-],[
+]], [[
try
{
@@ -80,8 +79,8 @@ extern void bar(const char *);
bar(0);
}
-]
-, maildrop_cv_const_exceptions="yes",maildrop_cv_const_exceptions="no")
+
+]])],[maildrop_cv_const_exceptions="yes"],[maildrop_cv_const_exceptions="no"])
)
if test "$maildrop_cv_const_exceptions" = "yes"
@@ -90,7 +89,7 @@ then
[ Define this if we need both catch(const foo) and catch(foo) ])
fi
-AC_LANG_C
+AC_LANG([C])
dnl Checks for libraries.
@@ -155,9 +154,12 @@ fi
AC_SUBST(dblibrary)
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+# End of obsolete code.
+
AC_HEADER_DIRENT
AC_CHECK_HEADERS(fcntl.h memory.h sys/file.h sys/time.h sys/stat.h unistd.h strings.h locale.h)
@@ -171,7 +173,7 @@ AC_STRUCT_TM
AC_TYPE_GETGROUPS
AC_SYS_LARGEFILE
-AC_TRY_RUN( [
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
@@ -186,17 +188,15 @@ FILE *fp=fopen("conftestval", "w");
fclose(fp);
return (0);
}
-]
- , [ MAXLONGSIZE=`wc -c conftestval | awk ' { print $1 } ' ` ],
- [
+
+ ]])],[ MAXLONGSIZE=`wc -c conftestval | awk ' { print $1 } ' ` ],[
AC_MSG_ERROR(Unable to run test program.)
- ] ,
- [
+ ],[
MAXLONGSIZE=60
AC_MSG_WARN([Cross compiling, setting MAXLONGSIZE to $MAXLONGSIZ
E])
- ]
- )
+
+ ])
AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE,
[ Maximum character size of a long ])
@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE,
dnl Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
-AC_TYPE_SIGNAL
+
AC_CHECK_FUNCS(setgroups setlocale)
AC_CHECK_FUNC(getpgrp, HAS_GETPGRP=1, HAS_GETPGRP=0)
@@ -224,14 +224,14 @@ AC_CACHE_CHECK(setpgrp(),maildrop_cv_HAS_SETPGRP,
if test $HAS_GETPGRP -o $HAS_GETPGID
then
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-],[
+]], [[
(void)setpgrp();
-],maildrop_cv_HAS_SETPGRP=1,maildrop_cv_HAS_SETPGRP=0)
+]])],[maildrop_cv_HAS_SETPGRP=1],[maildrop_cv_HAS_SETPGRP=0])
else
maildrop_cv_HAS_SETPGRP=0
@@ -246,14 +246,14 @@ AC_CACHE_CHECK(setpgid(),maildrop_cv_HAS_SETPGID,
if test $HAS_GETPGRP -o $HAS_GETPGID
then
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-],[
+]], [[
(void)setpgid(0,0);
-],maildrop_cv_HAS_SETPGID=1,maildrop_cv_HAS_SETPGID=0)
+]])],[maildrop_cv_HAS_SETPGID=1],[maildrop_cv_HAS_SETPGID=0])
else
maildrop_cv_HAS_SETPGID=0
fi
@@ -263,15 +263,15 @@ AC_DEFINE_UNQUOTED(HAS_SETPGID,$maildrop_cv_HAS_SETPGID,
AC_CACHE_CHECK([for missing gethostname prototype],maildir_cv_SYS_GETHOSTNAME,
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
extern int gethostname(int,int);
-],[
-],maildir_cv_SYS_GETHOSTNAME=yes,maildir_cv_SYS_GETHOSTNAME=no
-)
+]], [[
+]])],[maildir_cv_SYS_GETHOSTNAME=yes],[maildir_cv_SYS_GETHOSTNAME=no
+])
)
@@ -760,4 +760,5 @@ AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
. ../rfc822/rfc822.config
-AC_OUTPUT(xconfig.h Makefile README.html testsuite)
+AC_CONFIG_FILES([xconfig.h Makefile README.html testsuite])
+AC_OUTPUT
diff --git a/maildrop/maildrop.C b/maildrop/maildrop.C
index 89a5ec6..89a4c3c 100644
--- a/maildrop/maildrop.C
+++ b/maildrop/maildrop.C
@@ -18,13 +18,10 @@ extern void killprocgroup();
int Maildrop::sigfpe;
-static RETSIGTYPE sig_fpe(int)
+static void sig_fpe(int)
{
maildrop.sigfpe=1;
signal (SIGFPE, sig_fpe);
-#if RETSIGTYPE != void
- return (0);
-#endif
}
void Maildrop::cleanup()
@@ -33,7 +30,7 @@ void Maildrop::cleanup()
killprocgroup();
}
-RETSIGTYPE Maildrop::bye(int n)
+void Maildrop::bye(int n)
{
static const char msg[]="maildrop: signal 0x";
static const char hex[]="0123456789ABCDEF";
@@ -46,10 +43,6 @@ static const char hex[]="0123456789ABCDEF";
; /* gcc shut up */
_exit(EX_TEMPFAIL);
-
-#if RETSIGTYPE != void
- return (0);
-#endif
}
int Maildrop::trap(int (*func)(int, char *[]), int argc, char *argv[])
diff --git a/maildrop/maildrop.h b/maildrop/maildrop.h
index 777f46d..efc07dc 100644
--- a/maildrop/maildrop.h
+++ b/maildrop/maildrop.h
@@ -45,7 +45,7 @@ static int sigfpe; // Floating point exception trapped.
Maildrop();
static void cleanup();
-static RETSIGTYPE bye(int);
+static void bye(int);
static int trap(int (*)(int, char *[]), int, char *[]);
static void reset_vars();
} ;
diff --git a/maildrop/mytime.h b/maildrop/mytime.h
index 96b676e..d9f6d7d 100644
--- a/maildrop/mytime.h
+++ b/maildrop/mytime.h
@@ -4,15 +4,9 @@
#include "config.h"
-#if TIME_WITH_SYS_TIME
-#include <sys/time.h>
#include <time.h>
-#else
#if HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
-#include <time.h>
-#endif
#endif
#endif