summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Varshavchik2022-05-22 23:52:28 -0400
committerSam Varshavchik2022-05-22 23:52:31 -0400
commit83e37efc8ed785cd095eb585ff747e5702ec49b3 (patch)
tree15aed6da6214e9a03d91be1754cd351175349945
parent1ce81fa6af52651628a0bffcd8b15fdb459901a5 (diff)
downloadcourier-libs-83e37efc8ed785cd095eb585ff747e5702ec49b3.tar.bz2
gcc 12, autotool updates, sqwebmail fixes.
-rw-r--r--bdbobj/configure.ac18
-rw-r--r--cgi/cgi.c6
-rw-r--r--cgi/cgidaemond.c7
-rw-r--r--cgi/configure.ac62
-rw-r--r--gdbmobj/configure.ac10
-rw-r--r--gpglib/configure.ac15
-rw-r--r--gpglib/tempname.c9
-rw-r--r--http11/configure.ac9
-rw-r--r--imap/ChangeLog6
-rw-r--r--imap/configure.ac23
-rw-r--r--imap/imapd.c6
-rw-r--r--imap/imapwrite.c10
-rw-r--r--imap/mailboxlist.c9
-rw-r--r--imap/mainloop.c5
-rw-r--r--imap/mysignal.c5
-rw-r--r--imap/pop3dserver.c15
-rw-r--r--imap/smap.c6
-rw-r--r--imap/smapsnapshot.c6
-rw-r--r--imap/storeinfo.c7
-rw-r--r--ldapaddressbook/configure.ac23
-rw-r--r--ldapaddressbook/libldapsearch.c11
-rw-r--r--libhmac/configure.ac9
-rw-r--r--liblock/configure.ac76
-rw-r--r--liblock/lockdaemon.c8
-rw-r--r--liblock/lockmail.c13
-rw-r--r--maildir/configure.ac38
-rw-r--r--maildir/maildircreate.c7
-rw-r--r--maildir/maildirinfo.c6
-rw-r--r--maildir/maildirnewshared2.c12
-rw-r--r--maildir/testmaildiraclt.c7
-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
-rw-r--r--makedat/configure.ac11
-rw-r--r--md5/configure.ac26
-rw-r--r--numlib/configure.ac12
-rw-r--r--pcp/configure.ac21
-rw-r--r--pcp/pcp.h18
-rw-r--r--pcp/pcpd.c14
-rw-r--r--pcp/pcpdir.c8
-rw-r--r--pcp/pcpnet.c4
-rw-r--r--random128/configure.ac8
-rw-r--r--rfc1035/configure.ac99
-rw-r--r--rfc1035/rfc1035.c6
-rw-r--r--rfc1035/rfc1035dumprrdata.c16
-rw-r--r--rfc1035/rfc1035tcp.c6
-rw-r--r--rfc1035/rfc1035udp.c6
-rw-r--r--rfc1035/spf.c6
-rw-r--r--rfc1035/testlookup.c3
-rw-r--r--rfc2045/configure.ac19
-rw-r--r--rfc2045/rfc2045decode.c1
-rw-r--r--rfc822/configure.ac40
-rw-r--r--rootcerts/configure.ac5
-rw-r--r--sha1/configure.ac41
-rw-r--r--soxwrap/configure.ac15
-rw-r--r--soxwrap/sconnect.h6
-rw-r--r--sqwebmail/ChangeLog9
-rw-r--r--sqwebmail/configure.ac34
-rw-r--r--sqwebmail/folder.c9
-rw-r--r--sqwebmail/folder.h8
-rw-r--r--sqwebmail/html/configure.ac5
-rw-r--r--sqwebmail/html/en-us/configure.ac5
-rw-r--r--sqwebmail/images/configure.ac5
-rw-r--r--sqwebmail/ispell.c2
-rw-r--r--sqwebmail/msg2html.c4
-rw-r--r--sqwebmail/sqconfig.h8
-rw-r--r--sqwebmail/sqwebmail.c2
-rw-r--r--sqwebmail/token.c13
-rw-r--r--tcpd/configure.ac113
-rw-r--r--tcpd/libcouriertls.c22
-rw-r--r--tcpd/starttls.c7
-rw-r--r--tcpd/tcpd.c17
-rw-r--r--threadlib/configure.ac25
-rw-r--r--waitlib/configure.ac22
-rw-r--r--waitlib/confwait.c6
-rw-r--r--waitlib/testwait.c5
-rw-r--r--waitlib/waitlib.c8
-rw-r--r--waitlib/waitlib.h6
-rw-r--r--waitlib/waitlib2.c8
82 files changed, 536 insertions, 744 deletions
diff --git a/bdbobj/configure.ac b/bdbobj/configure.ac
index 9761e20..6e3ae52 100644
--- a/bdbobj/configure.ac
+++ b/bdbobj/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(bdbobj, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([bdbobj],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -15,11 +15,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_CXX
-AC_ISC_POSIX
-AC_PROG_LIBTOOL
+AC_SEARCH_LIBS([strerror],[cposix])
+LT_INIT
dnl Checks for libraries.
@@ -49,15 +48,13 @@ AC_C_CONST
AC_TYPE_SIZE_T
AC_SYS_LARGEFILE
-AC_LANG_CPLUSPLUS
+AC_LANG([C++])
AC_CACHE_CHECK([if the C++ compiler needs -fhandle-exceptions],
ac_cv_need_handlexceptions,
-AC_TRY_COMPILE([],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
throw;
-], ac_cv_need_handlexceptions=no,
-ac_cv_need_handlexceptions=yes)
+]])],[ac_cv_need_handlexceptions=no],[ac_cv_need_handlexceptions=yes])
)
if test "$ac_cv_need_handlexceptions" = "yes"
@@ -77,4 +74,5 @@ then
CFLAGS="-Wall $CFLAGS"
fi
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/cgi/cgi.c b/cgi/cgi.c
index eb4da69..46d43eb 100644
--- a/cgi/cgi.c
+++ b/cgi/cgi.c
@@ -16,15 +16,9 @@
#include <unistd.h>
#endif
-#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
#ifndef CGIMAXARG
diff --git a/cgi/cgidaemond.c b/cgi/cgidaemond.c
index fd928fb..b246fc9 100644
--- a/cgi/cgidaemond.c
+++ b/cgi/cgidaemond.c
@@ -14,16 +14,11 @@
#include <unistd.h>
#endif
-#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
+
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
diff --git a/cgi/configure.ac b/cgi/configure.ac
index fc900d5..b3a5895 100644
--- a/cgi/configure.ac
+++ b/cgi/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2005 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(cgi, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([cgi],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -16,18 +16,23 @@ AC_CONFIG_HEADERS(cgi_config.h)
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PROG_LIBTOOL
+LT_INIT
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/time.h sys/wait.h sys/select.h sys/uio.h unistd.h)
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+ AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+ and <time.h>. This macro is obsolete.])
+fi
+# End of obsolete code.
+
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -35,12 +40,12 @@ AC_TYPE_SIZE_T
AC_CACHE_CHECK([for socklen_t],
cgi_cv_hassocklen_t,
-
+
AC_COMPILE_IFELSE([
AC_LANG_SOURCE( [
#include <sys/types.h>
#include <sys/socket.h>
-
+
socklen_t sl_t;
],[
accept(0, 0, &sl_t);
@@ -48,9 +53,9 @@ socklen_t sl_t;
cgi_cv_hassocklen_t=yes,
cgi_cv_hassocklen_t=no)
)
-
+
socklen_t="int"
-
+
if test $cgi_cv_hassocklen_t = yes
then
:
@@ -77,7 +82,7 @@ AC_ARG_WITH(maxformargsize,
[ --with-maxformargsize=nbytes Maximum size of multipart/formdata uploads],
CFLAGS="$CFLAGS -DCGIMAXFORMDATAARG=$withval")
-AC_TRY_RUN( [
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
@@ -92,45 +97,42 @@ 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 $MAXLONGSIZE])
- ]
- )
+
+ ])
AC_CACHE_CHECK([how to pass file descriptors],
ac_cv_sqwebmail_passfd,
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
-int fd; struct msghdr msg; ],
-[
+int fd; struct msghdr msg; ]], [[
msg.msg_accrights=(caddr_t)fd;
msg.msg_accrightslen=sizeof(fd);
-],
- ac_cv_sqwebmail_passfd=msg_accrights,
+]])],[ac_cv_sqwebmail_passfd=msg_accrights],[])
- AC_TRY_COMPILE( [
+if test "$ac_cv_sqwebmail_passfd" = ""
+then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
struct msghdr msg; struct cmsghdr cmsg; char buf;
-],
-[
+]], [[
msg.msg_control = &buf;
msg.msg_controllen = 1;
-],
- ac_cv_sqwebmail_passfd=msg_control,
- ac_cv_sqwebmail_passfd=none)))
+]])],[ac_cv_sqwebmail_passfd=msg_control],[ac_cv_sqwebmail_passfd=none])
+fi
+)
if test "$ac_cv_sqwebmail_passfd" = "msg_accrights"
then
@@ -144,7 +146,6 @@ then
[Pass file descriptors in msg_control])
fi
-
if test "$GCC" = yes ; then
CFLAGS="$CFLAGS -Wall"
fi
@@ -153,4 +154,5 @@ CFLAGS="$CFLAGS -I.. -I$srcdir/.."
AC_SYS_LARGEFILE
AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE, [ Calculate max size of long ])
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/gdbmobj/configure.ac b/gdbmobj/configure.ac
index 6dfd317..90c3a8b 100644
--- a/gdbmobj/configure.ac
+++ b/gdbmobj/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(gdbmobj, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([gdbmobj],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -15,11 +15,10 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
-AC_ISC_POSIX
+AC_SEARCH_LIBS([strerror],[cposix])
AC_PROG_AWK
AC_PROG_CXX
-AC_PROG_LIBTOOL
+LT_INIT
dnl Checks for libraries.
@@ -49,4 +48,5 @@ AC_SYS_LARGEFILE
dnl Checks for library functions.
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/gpglib/configure.ac b/gpglib/configure.ac
index 441d3fb..cf442c2 100644
--- a/gpglib/configure.ac
+++ b/gpglib/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright 2001-2010 Double Precision, Inc. See COPYING for
dnl distribution information.
dnl
-AC_INIT(webpgp, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([webpgp],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -19,9 +19,7 @@ dnl Checks for programs.
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_CC
-AC_PROG_CC_C99
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+LT_INIT
AC_PROG_LN_S
AC_ARG_WITH(gpg2,[ --with-gpg2 Use gpg2 instead of gpg ], [gpg2_option="$withval"], [gpg2_option=])
@@ -96,10 +94,10 @@ fi
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(unistd.h sys/wait.h sys/time.h unistd.h fcntl.h)
AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -108,7 +106,7 @@ AC_TYPE_SIZE_T
AC_SYS_LARGEFILE
dnl Checks for library functions.
-AC_TYPE_SIGNAL
+
AC_CHECK_FUNCS(gettimeofday)
if test "$GCC" = yes ; then
@@ -119,4 +117,5 @@ CFLAGS="-I.. -I$srcdir/.. $CFLAGS"
AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
-AC_OUTPUT(Makefile webgpg)
+AC_CONFIG_FILES([Makefile webgpg])
+AC_OUTPUT
diff --git a/gpglib/tempname.c b/gpglib/tempname.c
index 30a6faf..3112d33 100644
--- a/gpglib/tempname.c
+++ b/gpglib/tempname.c
@@ -11,16 +11,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <time.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
#include "tempname.h"
static const char base64[] =
diff --git a/http11/configure.ac b/http11/configure.ac
index d20a3c0..588f892 100644
--- a/http11/configure.ac
+++ b/http11/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2005 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(http11, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([http11],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -15,8 +15,7 @@ AM_INIT_AUTOMAKE([foreign no-define])
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
-AC_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = yes ; then
CXXFLAGS="$CXXFLAGS -Wall"
@@ -27,7 +26,6 @@ dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_DIRENT
-AC_HEADER_STDC
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -41,4 +39,5 @@ AC_ARG_WITH(defaultlang,
DEFAULTLANG="$withval", DEFAULTLANG="en")
AC_SUBST(DEFAULTLANG)
-AC_OUTPUT(Makefile http11.h)
+AC_CONFIG_FILES([Makefile http11.h])
+AC_OUTPUT
diff --git a/imap/ChangeLog b/imap/ChangeLog
index dad6c2e..568ad8c 100644
--- a/imap/ChangeLog
+++ b/imap/ChangeLog
@@ -1,3 +1,9 @@
+5.1.8
+
+2022-05-22 Sam Varshavchik <mrsam@courier-mta.com>
+
+ * gcc 12 and autotools update. OpenSSL 3.0 update.
+
2022-04-17 Sam Varshavchik <mrsam@courier-mta.com>
* courier, courier-imap: remove the --disable-root-check configure
diff --git a/imap/configure.ac b/imap/configure.ac
index 7d02802..dee12b5 100644
--- a/imap/configure.ac
+++ b/imap/configure.ac
@@ -4,7 +4,7 @@ dnl
dnl Copyright 1998 - 2022 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(courier-imap, 5.1.7, [courier-users@lists.sourceforge.net])
+AC_INIT([courier-imap],[5.1.8],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -18,13 +18,11 @@ 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_INSTALL
AC_PROG_LN_S
AC_PROG_CXX
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+LT_INIT
AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)
if test "$PERL" = "perl"
@@ -117,9 +115,16 @@ AC_ARG_WITH(piddir, [ --with-piddir Directory where imapd.pid is create
AC_SUBST(piddir)
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(locale.h unistd.h sys/stat.h sys/wait.h time.h sys/time.h sys/utsname.h utime.h strings.h)
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+ AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+ and <time.h>. This macro is obsolete.])
+fi
+# End of obsolete code.
+
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
@@ -127,7 +132,6 @@ dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
-AC_TYPE_SIGNAL
AC_SYS_LARGEFILE
AC_CACHE_CHECK([for socklen_t],
@@ -391,7 +395,8 @@ int main()
. ../rootcerts/rootcertsdir.cnf
AC_SUBST(cacerts)
-AC_OUTPUT(Makefile imapd.dist imapd-ssl.dist pop3d.dist pop3d-ssl.dist
+AC_CONFIG_FILES([Makefile imapd.dist imapd-ssl.dist pop3d.dist pop3d-ssl.dist
testsuitefix.pl mkimapdcert mkpop3dcert mkdhparams
imapd.cnf.gnutls pop3d.cnf.gnutls
- imapd.cnf.openssl pop3d.cnf.openssl)
+ imapd.cnf.openssl pop3d.cnf.openssl])
+AC_OUTPUT
diff --git a/imap/imapd.c b/imap/imapd.c
index 8529657..161de8d 100644
--- a/imap/imapd.c
+++ b/imap/imapd.c
@@ -36,15 +36,9 @@
#if HAVE_UTIME_H
#include <utime.h>
#endif
-#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
#if HAVE_LOCALE_H
#include <locale.h>
diff --git a/imap/imapwrite.c b/imap/imapwrite.c
index 6167fa8..e148cf4 100644
--- a/imap/imapwrite.c
+++ b/imap/imapwrite.c
@@ -14,15 +14,9 @@
#include <unistd.h>
#endif
#include <sys/types.h>
-#if TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
+#include <time.h>
#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
+#include <sys/time.h>
#endif
#include "imapwrite.h"
diff --git a/imap/mailboxlist.c b/imap/mailboxlist.c
index ce6cf55..4ac4f73 100644
--- a/imap/mailboxlist.c
+++ b/imap/mailboxlist.c
@@ -31,18 +31,9 @@
#include <ndir.h>
#endif
#endif
-#if HAVE_UTIME_H
-#include <utime.h>
-#endif
-#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
#include <sys/types.h>
diff --git a/imap/mainloop.c b/imap/mainloop.c
index dc4b06f..a36ad5a 100644
--- a/imap/mainloop.c
+++ b/imap/mainloop.c
@@ -25,7 +25,7 @@ extern unsigned long header_count, body_count;
extern unsigned long bytes_received_count, bytes_sent_count;
extern time_t start_time;
-static RETSIGTYPE sigexit(int n)
+static void sigexit(int n)
{
static char byemsg[]="* BYE Courier-IMAP server shut down by signal.\r\n";
const char *a=getenv("AUTHENTICATED");
@@ -63,9 +63,6 @@ static RETSIGTYPE sigexit(int n)
; /* Suppress gcc warning */
exit(0);
-#if RETSIGTYPE != void
- return (0);
-#endif
}
diff --git a/imap/mysignal.c b/imap/mysignal.c
index 3dca78d..feaec38 100644
--- a/imap/mysignal.c
+++ b/imap/mysignal.c
@@ -12,12 +12,9 @@
static int n;
-static RETSIGTYPE trap(int signum)
+static void trap(int signum)
{
n=signum;
-#if RETSIGTYPE != void
- return (0);
-#endif
}
void trap_signals()
diff --git a/imap/pop3dserver.c b/imap/pop3dserver.c
index 82a1ec0..3ba46ce 100644
--- a/imap/pop3dserver.c
+++ b/imap/pop3dserver.c
@@ -28,15 +28,9 @@
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
+#include <time.h>
#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
+#include <sys/time.h>
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -958,13 +952,10 @@ static void acctout(const char *disc)
free(p);
}
-static RETSIGTYPE bye(int signum)
+static void bye(int signum)
{
acctout("INFO: TIMEOUT");
exit(0);
-#if RETSIGTYPE != void
- return (0);
-#endif
}
static void loop()
diff --git a/imap/smap.c b/imap/smap.c
index c0334ea..9839931 100644
--- a/imap/smap.c
+++ b/imap/smap.c
@@ -19,15 +19,9 @@
#if HAVE_UTIME_H
#include <utime.h>
#endif
-#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
#if HAVE_LOCALE_H
#include <locale.h>
diff --git a/imap/smapsnapshot.c b/imap/smapsnapshot.c
index 6ffc226..14f1717 100644
--- a/imap/smapsnapshot.c
+++ b/imap/smapsnapshot.c
@@ -19,15 +19,9 @@
#if HAVE_UTIME_H
#include <utime.h>
#endif
-#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
#if HAVE_LOCALE_H
#include <locale.h>
diff --git a/imap/storeinfo.c b/imap/storeinfo.c
index cc31c31..b44e521 100644
--- a/imap/storeinfo.c
+++ b/imap/storeinfo.c
@@ -29,17 +29,10 @@
#if HAVE_UTIME_H
#include <utime.h>
#endif
-#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
-
#if SMAP
extern int smapflag;
diff --git a/ldapaddressbook/configure.ac b/ldapaddressbook/configure.ac
index b0cea5b..76528ef 100644
--- a/ldapaddressbook/configure.ac
+++ b/ldapaddressbook/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 2000 - 2006 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(ldapaddressbook, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([ldapaddressbook],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -16,15 +16,14 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
-AC_PROG_LIBTOOL
+LT_INIT
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(stdio.h sys/wait.h sys/time.h)
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_ARG_WITH(ldapaddressbook,
[ --without-ldapaddressbook Disable LDAP address book code ],
@@ -49,20 +48,17 @@ if test "$HAVE_OPENLDAP" = 1
then
save_LIBS="$LIBS"
LIBS="$LIBS -lldap"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#if HAVE_LBER_H
#include <lber.h>
#endif
#include <ldap.h>
-],
-[
+]], [[
(void)ldap_err2string(0);
-],
-[
+]])],[
:
-],
-[
+],[
AC_MSG_ERROR([ldap.h header found, but a test compile failed -- check ldapaddressbook/config.log for more details])
])
LIBS="$save_LIBS"
@@ -85,4 +81,5 @@ AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
dnl Checks for library functions.
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/ldapaddressbook/libldapsearch.c b/ldapaddressbook/libldapsearch.c
index 71ef2ed..4bb7a2b 100644
--- a/ldapaddressbook/libldapsearch.c
+++ b/ldapaddressbook/libldapsearch.c
@@ -8,15 +8,8 @@
#include <stdlib.h>
#include <errno.h>
#include <time.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
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
#endif
/*
diff --git a/libhmac/configure.ac b/libhmac/configure.ac
index 9427c3f..9b46b9e 100644
--- a/libhmac/configure.ac
+++ b/libhmac/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright 1998 - 2001 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(libhmac, 1.00, [courier-users@lists.sourceforge.net])
+AC_INIT([libhmac],[1.00],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -20,8 +20,7 @@ AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CC
-AC_PROG_CC_C99
-AC_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = yes
then
@@ -33,7 +32,6 @@ CPPFLAGS="$CPPFLAGS -I$srcdir/.. -I.."
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -69,4 +67,5 @@ AC_SUBST(TESTPROGS)
AC_DEFINE_UNQUOTED(HMAC_LIST,$hmac_list,
[ Dynamically-generated list of installed HMAC hash functions ])
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/liblock/configure.ac b/liblock/configure.ac
index 5e1745c..41a4551 100644
--- a/liblock/configure.ac
+++ b/liblock/configure.ac
@@ -2,8 +2,8 @@ dnl
dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_PREREQ(2.59)
-AC_INIT(liblock, 0.60, courier-users@lists.sourceforge.net)
+AC_PREREQ([2.71])
+AC_INIT([liblock],[0.60],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -17,16 +17,15 @@ CFLAGS="-I.. -I${srcdir}/.. $CFLAGS"
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PROG_LIBTOOL
+LT_INIT
dnl Checks for libraries.
dnl Checks for header files.
AC_CHECK_HEADERS(errno.h fcntl.h sys/fcntl.h sys/ioctl.h sys/file.h unistd.h sysexits.h)
-AC_HEADER_STDC
+
AC_HEADER_SYS_WAIT
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -34,19 +33,18 @@ dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_PID_T
-AC_TYPE_SIGNAL
AC_SYS_LARGEFILE
AC_CACHE_CHECK( [for off64_t], liblock_cv_hasoff64t,
liblock_cv_hasoff64t="no"
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
off64_t n;
-],[
+]], [[
n=0;
-], liblock_cv_hasoff64t="yes")
+]])],[liblock_cv_hasoff64t="yes"],[])
)
@@ -61,7 +59,7 @@ AC_DEFINE_UNQUOTED(LL_OFFSET_TYPE,$LL_OFFSET_TYPE,
AC_CACHE_CHECK( [for flock_t], liblock_cv_hasflock_t,
liblock_cv_hasflock_t="no"
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -73,8 +71,8 @@ AC_TRY_COMPILE([
#include <sys/fcntl.h>
#endif
flock_t t;
-],[
-], liblock_cv_hasflock_t="yes"))
+]], [[
+]])],[liblock_cv_hasflock_t="yes"],[]))
if test "$liblock_cv_hasflock_t" = "yes"
then
@@ -92,12 +90,12 @@ AC_CHECK_FUNC(setpgrp,
AC_CACHE_CHECK( [for fcntl], liblock_cv_hasfcntl,
liblock_cv_hasfcntl="no"
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/lockfcntl.c"
int n;
-],[
-], liblock_cv_hasfcntl="yes"))
+]], [[
+]])],[liblock_cv_hasfcntl="yes"],[]))
if test "$liblock_cv_hasfcntl" = "yes"
then
AC_DEFINE_UNQUOTED(HAS_FCNTL,1,
@@ -106,12 +104,12 @@ fi
AC_CACHE_CHECK( [for flock], liblock_cv_hasflock,
liblock_cv_hasflock="no"
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/lockflock.c"
int n;
-],[
-], liblock_cv_hasflock="yes"))
+]], [[
+]])],[liblock_cv_hasflock="yes"],[]))
if test "$liblock_cv_hasflock" = "yes"
then
AC_DEFINE_UNQUOTED(HAS_FLOCK,1,
@@ -120,12 +118,12 @@ fi
AC_CACHE_CHECK( [for lockf], liblock_cv_haslockf,
liblock_cv_haslockf="no"
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/locklockf.c"
int n;
-],[
-], liblock_cv_haslockf="yes"))
+]], [[
+]])],[liblock_cv_haslockf="yes"],[]))
if test "$liblock_cv_haslockf" = "yes"
then
AC_DEFINE_UNQUOTED(HAS_LOCKF,1,
@@ -137,59 +135,56 @@ AC_ARG_WITH(locking-method, [], lockmethod="$withval", lockmethod="")
case x$lockmethod in
xfcntl)
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define USE_FCNTL 1
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/locktest.c"
-], , AC_MSG_ERROR(fcntl test failed.),
- :
- )
+]])],[],[AC_MSG_ERROR(fcntl test failed.)],[:
+ ])
;;
x)
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define USE_FCNTL 1
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/locktest.c"
-], lockmethod=fcntl, ,AC_MSG_ERROR(--with-locking-method option required))
+]])],[lockmethod=fcntl],[],[AC_MSG_ERROR(--with-locking-method option required)])
;;
esac
case x$lockmethod in
xlockf)
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define USE_LOCKF 1
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/locktest.c"
-], , AC_MSG_ERROR(lockf test failed.),
- :
- )
+]])],[],[AC_MSG_ERROR(lockf test failed.)],[:
+ ])
;;
x)
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define USE_LOCKF 1
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/locktest.c"
-], lockmethod=lockf, , AC_MSG_ERROR(--with-locking-method option required))
+]])],[lockmethod=lockf],[],[AC_MSG_ERROR(--with-locking-method option required)])
;;
esac
case x$lockmethod in
xflock)
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define USE_FLOCK 1
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/locktest.c"
-], , AC_MSG_ERROR(flock test failed.),
- :
- )
+]])],[],[AC_MSG_ERROR(flock test failed.)],[:
+ ])
;;
x)
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define USE_FLOCK 1
#define LL_OFFSET_TYPE $LL_OFFSET_TYPE
#include "${srcdir}/locktest.c"
-], lockmethod=flock, , AC_MSG_ERROR(--with-locking-method option required))
+]])],[lockmethod=flock],[],[AC_MSG_ERROR(--with-locking-method option required)])
;;
esac
@@ -215,4 +210,5 @@ AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
AC_DEFINE_UNQUOTED(liblock_config_h,1, [liblock/config.h has been read])
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/liblock/lockdaemon.c b/liblock/lockdaemon.c
index af0027b..1ca9133 100644
--- a/liblock/lockdaemon.c
+++ b/liblock/lockdaemon.c
@@ -218,7 +218,7 @@ char buf[NUMBUFSIZE+1];
char *p=strcat(libmail_str_pid_t(getpid(), buf), "\n");
FILE *fp;
- unlink(pidfile);
+ unlink(pidfile);
if ((fp=fopen(pidfile, "w")) == NULL ||
fprintf(fp, "%s", p) < 0 || fflush(fp) < 0 || fclose(fp))
{
@@ -268,12 +268,9 @@ int waitstat;
** process kills itself.
*/
-static RETSIGTYPE sigexit(int signum)
+static void sigexit(int signum)
{
kill(getpid(), SIGKILL);
-#if RETSIGTYPE != void
- return (0);
-#endif
}
static void stop1(const char *lockfile, const char *pidfile)
@@ -371,4 +368,3 @@ int c;
kill(p, SIGHUP);
return (0);
}
-
diff --git a/liblock/lockmail.c b/liblock/lockmail.c
index fda0799..3cd51e0 100644
--- a/liblock/lockmail.c
+++ b/liblock/lockmail.c
@@ -44,9 +44,9 @@ static int sig=0;
static int catch(int signum)
{
sig=1;
- signal(SIGHUP, (RETSIGTYPE (*)(int))catch);
- signal(SIGTERM, (RETSIGTYPE (*)(int))catch);
- signal(SIGINT, (RETSIGTYPE (*)(int))catch);
+ signal(SIGHUP, (void (*)(int))catch);
+ signal(SIGTERM, (void (*)(int))catch);
+ signal(SIGINT, (void (*)(int))catch);
return 0;
}
@@ -128,9 +128,9 @@ int main(int argc, char **argv)
exit(1);
}
- signal(SIGHUP, (RETSIGTYPE (*)(int))catch);
- signal(SIGTERM, (RETSIGTYPE (*)(int))catch);
- signal(SIGINT, (RETSIGTYPE (*)(int))catch);
+ signal(SIGHUP, (void (*)(int))catch);
+ signal(SIGTERM, (void (*)(int))catch);
+ signal(SIGINT, (void (*)(int))catch);
if (ll_mail_lock(p) < 0)
{
@@ -187,4 +187,3 @@ int main(int argc, char **argv)
exit(EX_TEMPFAIL);
return (0);
}
-
diff --git a/maildir/configure.ac b/maildir/configure.ac
index 5c2a64c..9ab0cdb 100644
--- a/maildir/configure.ac
+++ b/maildir/configure.ac
@@ -3,14 +3,14 @@ dnl
dnl Copyright 1998 - 2001 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(maildir, 0.11, [courier-maildrop@lists.sourceforge.net])
+AC_INIT([maildir],[0.11],[courier-maildrop@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
AC_CONFIG_SRCDIR(maildirquota.c)
AC_CONFIG_AUX_DIR(../..)
LPATH="$PATH:/usr/local/bin"
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign no-define])
AC_CONFIG_HEADERS(config.h)
@@ -18,11 +18,13 @@ dnl Checks for programs.
AC_PROG_AWK
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+_LT_SET_OPTION([LT_INIT],[dlopen])
+m4_warn([obsolete],[AC_LIBTOOL_DLOPEN: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+
+LT_INIT
AC_PROG_CXX
@@ -45,8 +47,15 @@ dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_TIME
+
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+ AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+ and <time.h>. This macro is obsolete.])
+fi
+# End of obsolete code.
+
AC_CHECK_HEADERS(sys/stat.h sys/wait.h fcntl.h unistd.h sysexits.h utime.h)
AC_CHECK_PROG(PCRE2, pcre2-config, yes, no)
@@ -62,9 +71,9 @@ AC_SUBST(PCRE_CFLAGS)
AC_HEADER_SYS_WAIT
-AC_LANG_CPLUSPLUS
+AC_LANG([C++])
AC_CHECK_HEADERS(vector vector.h)
-AC_LANG_C
+AC_LANG([C])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -83,15 +92,15 @@ AC_CHECK_FUNCS(inotify_init inotify_init1)
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
+])
)
@@ -153,4 +162,5 @@ else
[ Maildir target separator ])
fi
-AC_OUTPUT(Makefile sharedindexinstall sharedindexsplit)
+AC_CONFIG_FILES([Makefile sharedindexinstall sharedindexsplit])
+AC_OUTPUT
diff --git a/maildir/maildircreate.c b/maildir/maildircreate.c
index b0c8e01..cb334ed 100644
--- a/maildir/maildircreate.c
+++ b/maildir/maildircreate.c
@@ -10,16 +10,11 @@
#include <sys/stat.h>
#endif
-#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
+
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/maildir/maildirinfo.c b/maildir/maildirinfo.c
index 5db7f89..610b6e0 100644
--- a/maildir/maildirinfo.c
+++ b/maildir/maildirinfo.c
@@ -18,15 +18,9 @@
#if HAVE_UTIME_H
#include <utime.h>
#endif
-#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
#include <sys/types.h>
diff --git a/maildir/maildirnewshared2.c b/maildir/maildirnewshared2.c
index 55c5c0e..801eac3 100644
--- a/maildir/maildirnewshared2.c
+++ b/maildir/maildirnewshared2.c
@@ -18,15 +18,9 @@
#if HAVE_UTIME_H
#include <utime.h>
#endif
-#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
#include <sys/types.h>
@@ -229,9 +223,3 @@ static struct maildir_shindex_cache *do_shared_cache_read(const char *indexfile,
return c;
}
-
-
-
-
-
-
diff --git a/maildir/testmaildiraclt.c b/maildir/testmaildiraclt.c
index 19fb14f..c19b2f5 100644
--- a/maildir/testmaildiraclt.c
+++ b/maildir/testmaildiraclt.c
@@ -17,18 +17,11 @@
#if HAVE_UTIME_H
#include <utime.h>
#endif
-#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
-
#define CHK(x) if (!(x)) { printf("%s(%d): sanity check failed.\n", \
__FILE__, __LINE__); exit(1);}
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
diff --git a/makedat/configure.ac b/makedat/configure.ac
index d7c1258..cbaa654 100644
--- a/makedat/configure.ac
+++ b/makedat/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2001 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(makedat, 0.60, [courier-users@lists.sourceforge.net])
+AC_INIT([makedat],[0.60],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -15,14 +15,12 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)
AC_SUBST(PERL)
AC_PATH_PROGS(CAT, cat, cat)
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+LT_INIT
AC_SYS_LARGEFILE
if test x$GCC = xyes
@@ -55,7 +53,7 @@ AC_SUBST(makedatprog_target)
AC_SUBST(dblibrary)
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -67,4 +65,5 @@ AC_ARG_WITH(makedatprog,[ --with-makedatprog=filename Installed location an
makedatprogpath="$makedatprog"
AC_SUBST(makedatprogpath)
-AC_OUTPUT(Makefile makedat)
+AC_CONFIG_FILES([Makefile makedat])
+AC_OUTPUT
diff --git a/md5/configure.ac b/md5/configure.ac
index 4a90c95..c3e23de 100644
--- a/md5/configure.ac
+++ b/md5/configure.ac
@@ -3,8 +3,8 @@ dnl
dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_PREREQ(2.59)
-AC_INIT(libmd5, 1.21, courier-users@lists.sourceforge.net)
+AC_PREREQ([2.71])
+AC_INIT([libmd5],[1.21],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -20,8 +20,7 @@ AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CC
-AC_PROG_CC_C99
-AC_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = yes
then
@@ -33,8 +32,6 @@ CFLAGS="$CFLAGS -I$srcdir/.. -I.."
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
-
AC_CHECK_HEADERS(sys/types.h stdint.h)
@@ -45,7 +42,7 @@ AC_ARG_WITH(int32,
AC_MSG_CHECKING(for uint32_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -53,13 +50,13 @@ AC_ARG_WITH(int32,
#include <stdint.h>
#endif
uint32_t i;
- ],[
- ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [
+ ]], [[
+ ]])],[ AC_MSG_RESULT(yes) ; int32="uint32_t"],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for u_int_32_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -67,8 +64,8 @@ uint32_t i;
#include <stdint.h>
#endif
u_int32_t i;
- ],[
- ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[
+ ]], [[
+ ]])],[AC_MSG_RESULT(yes); int32="u_int32_t"],[
AC_MSG_RESULT(no)
@@ -81,7 +78,7 @@ u_int32_t i;
AC_CHECK_SIZEOF(unsigned short, 0)
if test "$ac_cv_sizeof_unsigned_short" != 4
then
- AC_ERROR(--with-int32 option is required)
+ AC_MSG_ERROR(--with-int32 option is required)
fi
int32="unsigned short"
fi
@@ -103,4 +100,5 @@ AC_SYS_LARGEFILE
dnl Checks for library functions.
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/numlib/configure.ac b/numlib/configure.ac
index 5f012e4..3d85f51 100644
--- a/numlib/configure.ac
+++ b/numlib/configure.ac
@@ -3,8 +3,8 @@ dnl
dnl Copyright 1998 - 2010 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_PREREQ(2.59)
-AC_INIT(numlib, 0.10, courier-users@lists.sourceforge.net)
+AC_PREREQ([2.71])
+AC_INIT([numlib],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -12,14 +12,13 @@ AC_CONFIG_SRCDIR([atotimet.c])
AC_CONFIG_AUX_DIR(../..)
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign no-define])
-
+
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = "yes"
then
@@ -47,4 +46,5 @@ AC_SYS_LARGEFILE
dnl Checks for library functions.
AC_CHECK_FUNCS(setgroups initgroups)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/pcp/configure.ac b/pcp/configure.ac
index 9b64527..0fee882 100644
--- a/pcp/configure.ac
+++ b/pcp/configure.ac
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
# Copyright 2001-2003 Double Precision, Inc. See COPYING for
# distribution information.
-AC_INIT(pcp, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([pcp],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -15,11 +15,9 @@ 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_INSTALL
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+LT_INIT
AC_PATH_PROGS(PERL, perl5 perl, perl)
CFLAGS="-I.. -I${srcdir}/.. -I$srcdir/../.. -I../.. $CFLAGS"
@@ -85,16 +83,16 @@ SENDIT="$scriptdir/sendit.sh"
AC_SUBST(SENDIT)
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(fcntl.h sys/stat.h sys/time.h termios.h unistd.h)
AC_HEADER_DIRENT
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_PID_T
-AC_TYPE_SIGNAL
+
AC_STRUCT_TM
AC_SYS_LARGEFILE
@@ -178,18 +176,18 @@ AC_SUBST(mailgroup)
AC_DEFINE_UNQUOTED(MAILGROUP,"$mailgroup",
[ Mail system group ])
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <signal.h>
#include <string.h>
#include <stdio.h>
-],[
+]], [[
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler=SIG_IGN;
sa.sa_flags=SA_NOCLDWAIT;
sigaction(SIGCHLD, &sa, NULL);
-], AC_DEFINE_UNQUOTED(USE_NOCLDWAIT,1, [ Whether to use SA_NOCLDWAIT ]))
+]])],[AC_DEFINE_UNQUOTED(USE_NOCLDWAIT,1, Whether to use SA_NOCLDWAIT )],[])
if test -f $srcdir/.debug
then
@@ -204,4 +202,5 @@ fi
CPPFLAGS="-Iintl/ -I${srcdir}/intl $CPPFLAGS"
MKINSTALLDIRS="$mkdir_p"
-AC_OUTPUT(Makefile po/Makefile.in )
+AC_CONFIG_FILES([Makefile po/Makefile.in ])
+AC_OUTPUT
diff --git a/pcp/pcp.h b/pcp/pcp.h
index 84b4312..29a8ffc 100644
--- a/pcp/pcp.h
+++ b/pcp/pcp.h
@@ -9,18 +9,10 @@
#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
-
#include <time.h>
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
struct PCP_new_eventid {
char *eventid;
@@ -327,7 +319,7 @@ const char *pcp_wdayname(unsigned); /* Sun, Mon, Tue... */
const char *pcp_wdayname_long(unsigned); /* Sunday, Monday, ... */
const char *pcp_monthname(unsigned); /* Jan, Feb, Mar... */
const char *pcp_monthname_long(unsigned); /* January, February... */
-int pcp_wday(const char *); /* Sun, Mon, Tue... -> 0..7, -1 if no match */
+int pcp_wday(const char *); /* Sun, Mon, Tue... -> 0..7, -1 if no match */
int pcp_month(const char *); /* Ditto for Jan, Feb, Mar */
int pcp_fmttime(char *, size_t, time_t, int); /* Format date+time */
@@ -364,7 +356,7 @@ int pcp_parse_datetime_until(time_t start, time_t end,
int *argn,
int argc,
char **argv,
-
+
int recurring_time,
/* Callback function receives times */
diff --git a/pcp/pcpd.c b/pcp/pcpd.c
index 8f505fc..2a39005 100644
--- a/pcp/pcpd.c
+++ b/pcp/pcpd.c
@@ -94,7 +94,7 @@ static int inputchar(struct PCP *pcp)
if (termsig)
return (EOF);
-
+
if (first_timer)
{
tvptr= &tv;
@@ -1018,7 +1018,7 @@ static int list_callback(struct PCP_list_all *p, void *vp)
ls->last_event= & (*ls->last_event)->next;
return (0);
}
-
+
static int list(struct PCP *pcp)
{
struct list_struct ls;
@@ -1589,7 +1589,7 @@ static int doline(struct PCP *pcp, char *p, int acl_flags)
force_flag=0;
need_rset=0;
rset(pcp);
- printf("200 Ok.\n");
+ printf("200 Ok.\n");
return (0);
}
@@ -1780,7 +1780,7 @@ static int doline(struct PCP *pcp, char *p, int acl_flags)
proxy_name);
else
printf("200 Ok.\n");
- }
+ }
rset(pcp);
return (0);
}
@@ -1929,15 +1929,11 @@ static int check_acl(int flags, int bit)
return (1);
}
-static RETSIGTYPE catch_sig(int sig_num)
+static void catch_sig(int sig_num)
{
termsig=1;
signal(SIGALRM, catch_sig);
alarm(2);
-
-#if RETSIGTYPE != void
- return (0);
-#endif
}
static void setsigs()
diff --git a/pcp/pcpdir.c b/pcp/pcpdir.c
index ba8aad7..aa3298f 100644
--- a/pcp/pcpdir.c
+++ b/pcp/pcpdir.c
@@ -403,9 +403,9 @@ static char *acquire_dotlock(struct PCPdir *pd)
if (!tmpname)
{
- free(n);
fprintf(stderr, "ALERT: Failed to create dotlock: %s - %s\n",
n, strerror(errno));
+ free(n);
return (NULL);
}
strcat(strcat(strcat(strcpy(tmpname, pd->dirname), "/."),
@@ -416,9 +416,9 @@ static char *acquire_dotlock(struct PCPdir *pd)
if (!fp)
{
free(tmpname);
- free(n);
fprintf(stderr, "ALERT: Failed to create dotlock: %s - %s\n",
n, strerror(errno));
+ free(n);
return (NULL);
}
@@ -428,9 +428,9 @@ static char *acquire_dotlock(struct PCPdir *pd)
fclose(fp);
unlink(tmpname);
free(tmpname);
- free(n);
fprintf(stderr, "ALERT: Failed to create dotlock: %s - %s\n",
n, strerror(errno));
+ free(n);
return (NULL);
}
@@ -438,9 +438,9 @@ static char *acquire_dotlock(struct PCPdir *pd)
{
unlink(tmpname);
free(tmpname);
- free(n);
fprintf(stderr, "ALERT: Failed to create dotlock: %s - %s\n",
n, strerror(errno));
+ free(n);
return (NULL);
}
diff --git a/pcp/pcpnet.c b/pcp/pcpnet.c
index fd1d70f..e654681 100644
--- a/pcp/pcpnet.c
+++ b/pcp/pcpnet.c
@@ -1897,6 +1897,7 @@ static int retr_105(struct PCPnet *pn, struct PCP_retr *ri)
if (ri->callback_retr_date)
return ( (*ri->callback_retr_date)
(ri, from_t, to_t, ri->callback_arg));
+ ri->event_id=NULL; /* Fix spurious gcc warning */
}
return (0);
@@ -1916,6 +1917,7 @@ static int retr_106(struct PCPnet *pn, struct PCP_retr *ri)
if (ri->callback_retr_participants)
return ( (*ri->callback_retr_participants)
(ri, addr, NULL, ri->callback_arg));
+ ri->event_id=NULL; /* Fix spurious gcc warning */
}
return (0);
@@ -1926,7 +1928,7 @@ static int retr_110(struct PCPnet *pn, struct PCP_retr *ri)
char dummy;
char eventid[EVENTID_MAXLEN];
- if (sscanf(pn->readbuf, "110%c" EVENTID_SSCANF,
+ if (sscanf(pn->readbuf, "110%c" EVENTID_SSCANF,
&dummy, eventid) == 2)
{
const char *p, *q;
diff --git a/random128/configure.ac b/random128/configure.ac
index 8d833d4..27e658b 100644
--- a/random128/configure.ac
+++ b/random128/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2002 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(random128, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([random128],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -19,10 +19,9 @@ AC_USE_SYSTEM_EXTENSIONS
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CC
-AC_PROG_CC_C99
AC_PATH_PROGS(PS, ps, ps, $LPATH)
AC_PATH_PROGS(W, w, w, $LPATH)
-AC_PROG_LIBTOOL
+LT_INIT
if test "$PS" = "ps"
then
@@ -99,4 +98,5 @@ then
AC_DEFINE_UNQUOTED(W, "$w", [ The W program ])
fi
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/rfc1035/configure.ac b/rfc1035/configure.ac
index 84b731c..90cd963 100644
--- a/rfc1035/configure.ac
+++ b/rfc1035/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2003 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(librfc1035, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([librfc1035],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -16,11 +16,9 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_LIBTOOL_DLOPEN
-AC_PROG_LIBTOOL
+LT_INIT
dnl Checks for libraries.
@@ -31,7 +29,7 @@ then
AC_MSG_ERROR(libidn not found)
fi
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(sys/types.h sys/time.h unistd.h arpa/inet.h netinet/in.h strings.h stdint.h)
USENSL=no
@@ -74,7 +72,8 @@ AC_CHECK_LIB(socket,socket)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+
AC_SYS_LARGEFILE
AC_ARG_WITH(int32,
@@ -84,7 +83,7 @@ AC_ARG_WITH(int32,
AC_MSG_CHECKING(for uint32_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -92,13 +91,13 @@ AC_ARG_WITH(int32,
#include <stdint.h>
#endif
uint32_t n;
- ],[
- ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [
+ ]], [[
+ ]])],[ AC_MSG_RESULT(yes) ; int32="uint32_t"],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for u_int_32_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -106,8 +105,8 @@ uint32_t n;
#include <stdint.h>
#endif
u_int32_t n;
- ],[
- ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[
+ ]], [[
+ ]])],[AC_MSG_RESULT(yes); int32="u_int32_t"],[
AC_MSG_RESULT(no)
@@ -120,7 +119,7 @@ u_int32_t n;
AC_CHECK_SIZEOF(unsigned short, 0)
if test "$ac_cv_sizeof_unsigned_short" != 4
then
- AC_ERROR(--with-int32 option is required)
+ AC_MSG_ERROR(--with-int32 option is required)
fi
int32="unsigned short"
fi
@@ -141,7 +140,7 @@ AC_ARG_WITH(int16,
AC_MSG_CHECKING(for uint16_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -149,13 +148,13 @@ AC_ARG_WITH(int16,
#include <stdint.h>
#endif
uint16_t n;
- ],[
- ], [ AC_MSG_RESULT(yes) ; int16="uint16_t"], [
+ ]], [[
+ ]])],[ AC_MSG_RESULT(yes) ; int16="uint16_t"],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for u_int_16_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -163,8 +162,8 @@ uint16_t n;
#include <stdint.h>
#endif
u_int16_t n;
- ],[
- ], [AC_MSG_RESULT(yes); int16="u_int16_t"],[
+ ]], [[
+ ]])],[AC_MSG_RESULT(yes); int16="u_int16_t"],[
AC_MSG_RESULT(no)
@@ -177,7 +176,7 @@ u_int16_t n;
AC_CHECK_SIZEOF(unsigned short, 0)
if test "$ac_cv_sizeof_unsigned_short" != 4
then
- AC_ERROR(--with-int16 option is required)
+ AC_MSG_ERROR(--with-int16 option is required)
fi
int16="unsigned short"
fi
@@ -232,20 +231,19 @@ dnl Check for IPv6 support
AC_CACHE_CHECK([for structs in6_addr, sockaddr_in6, and sockaddr_storage],
rfc1035_cv_hasipv6structs,
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
- ], [
+ ]], [[
(void)(sizeof(struct in6_addr)+
sizeof(struct sockaddr_in6)+
sizeof(struct sockaddr_storage)+
PF_INET6);
- ], rfc1035_cv_hasipv6structs=yes,
- rfc1035_cv_hasipv6structs=no )
+ ]])],[rfc1035_cv_hasipv6structs=yes],[rfc1035_cv_hasipv6structs=no ])
)
changequote()
@@ -257,57 +255,60 @@ changequote([,])
AC_CACHE_CHECK([for IPv6 flavor],
rfc1035_cv_ipv6flavor,
+[
if test "$rfc1035_cv_hasipv6structs" = no
then
rfc1035_cv_ipv6flavor=none
else
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
struct in6_addr in6a;
-] , [
+ ]], [[
in6a.s6_addr16 $LB 0 $RB =0;
in6a.s6_addr32 $LB 0 $RB =0;
-],
- rfc1035_cv_ipv6flavor="glibc (default)",
+]])],[rfc1035_cv_ipv6flavor="glibc (default)"],[])
+fi
-AC_TRY_COMPILE( [
+if test "$rfc1035_cv_ipv6flavor" = ""
+then
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
struct in6_addr in6a;
- ], [
+ ]], [[
in6a.__u6_addr.__u6_addr16 $LB 0 $RB =0;
in6a.__u6_addr.__u6_addr32 $LB 0 $RB =0;
- ],
- rfc1035_cv_ipv6flavor="freebsd-4.0",
+ ]])],[rfc1035_cv_ipv6flavor="freebsd-4.0"],[])
+fi
-AC_TRY_COMPILE( [
+if test "$rfc1035_cv_ipv6flavor" = ""
+then
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
struct in6_addr in6a;
- ], [
+ ]], [[
in6a._S6_un._S6_u8 $LB 0 $RB = 0;
in6a._S6_un._S6_u32 $LB 0 $RB = 0;
- ],
- rfc1035_cv_ipv6flavor="solaris8",
- rfc1035_cv_ipv6flavor="unknown"
- )
- )
-)
+ ]])],[rfc1035_cv_ipv6flavor="solaris8"],[rfc1035_cv_ipv6flavor="unknown"
+ ])
fi
-)
+
+])
RFC1035_FREEBSD40=0
if test "$rfc1035_cv_ipv6flavor" = "freebsd-4.0"
@@ -331,13 +332,13 @@ AC_SUBST(RFC1035_SOLARIS8)
AC_CACHE_CHECK([for SIOCGIFCONF],
rfc1035_cv_siocgifconf,
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <unistd.h>
-] , [
+ ]], [[
struct ifreq ifreq_buf;
struct ifconf ifc;
@@ -345,7 +346,7 @@ AC_TRY_COMPILE( [
ifc.ifc_req=&ifreq_buf;
ioctl(0, SIOCGIFCONF, &ifc);
-], rfc1035_cv_siocgifconf=yes, rfc1035_cv_siocgifconf=no)
+]])],[rfc1035_cv_siocgifconf=yes],[rfc1035_cv_siocgifconf=no])
)
if test "$rfc1035_cv_siocgifconf" = "yes"
@@ -357,15 +358,14 @@ fi
AC_CACHE_CHECK([for alloca],
[rfc1035_cv_alloca],
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <stdlib.h>
- ], [
+ ]], [[
(void)(char *)alloca(10);
- ], rfc1035_cv_alloca=yes,
- rfc1035_cv_alloca=no )
+ ]])],[rfc1035_cv_alloca=yes],[rfc1035_cv_alloca=no ])
)
ipv6=0
@@ -403,4 +403,5 @@ AC_DEFINE_UNQUOTED(RFC1035_UINT16, $UINT16, [ 16bit datatype ])
AC_DEFINE_UNQUOTED(RFC1035_IPV6, $RFC1035_IPV6,
[ Whether IPv6 support is enabled ])
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/rfc1035/rfc1035.c b/rfc1035/rfc1035.c
index 0e3678b..74335ff 100644
--- a/rfc1035/rfc1035.c
+++ b/rfc1035/rfc1035.c
@@ -10,15 +10,9 @@
#include <string.h>
#include <errno.h>
#include <sys/types.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
#include <arpa/inet.h>
#if HAVE_UNISTD_H
diff --git a/rfc1035/rfc1035dumprrdata.c b/rfc1035/rfc1035dumprrdata.c
index 0e964c7..4a12022 100644
--- a/rfc1035/rfc1035dumprrdata.c
+++ b/rfc1035/rfc1035dumprrdata.c
@@ -9,15 +9,9 @@
#include <stdlib.h>
#include <sys/types.h>
#include <arpa/inet.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
@@ -34,15 +28,15 @@ char timebuf[RFC1035_MAXTIMEBUFSIZE+1];
if (!p) return (0);
strcat(strcat(strcat(strcpy(p, name2), ". "), name1), ". (\n\t\t\t\t");
- sprintf(p+strlen(p), "%lu ; serial\n",
+ sprintf(p+strlen(p), "%lu ; serial\n",
(unsigned long)rr->rr.soa.serial);
- sprintf(p+strlen(p), "\t\t\t\t%s ; refresh\n",
+ sprintf(p+strlen(p), "\t\t\t\t%s ; refresh\n",
rfc1035_fmttime( rr->rr.soa.refresh, timebuf));
- sprintf(p+strlen(p), "\t\t\t\t%s ; retry\n",
+ sprintf(p+strlen(p), "\t\t\t\t%s ; retry\n",
rfc1035_fmttime( rr->rr.soa.retry, timebuf));
- sprintf(p+strlen(p), "\t\t\t\t%s ; expire\n",
+ sprintf(p+strlen(p), "\t\t\t\t%s ; expire\n",
rfc1035_fmttime( rr->rr.soa.expire, timebuf));
- sprintf(p+strlen(p), "\t\t\t\t%s) ; minimum",
+ sprintf(p+strlen(p), "\t\t\t\t%s) ; minimum",
rfc1035_fmttime( rr->rr.soa.minimum, timebuf));
return (p);
}
diff --git a/rfc1035/rfc1035tcp.c b/rfc1035/rfc1035tcp.c
index 69725da..62e7338 100644
--- a/rfc1035/rfc1035tcp.c
+++ b/rfc1035/rfc1035tcp.c
@@ -16,15 +16,9 @@
#include <stdlib.h>
#include <errno.h>
#include <fcntl.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
diff --git a/rfc1035/rfc1035udp.c b/rfc1035/rfc1035udp.c
index 2a4ed34..0451f90 100644
--- a/rfc1035/rfc1035udp.c
+++ b/rfc1035/rfc1035udp.c
@@ -15,15 +15,9 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#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
int rfc1035_open_udp(int *af)
diff --git a/rfc1035/spf.c b/rfc1035/spf.c
index 63735ff..34075ab 100644
--- a/rfc1035/spf.c
+++ b/rfc1035/spf.c
@@ -12,15 +12,9 @@
#include <string.h>
#include <errno.h>
#include <sys/types.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
#include <idna.h>
diff --git a/rfc1035/testlookup.c b/rfc1035/testlookup.c
index 869e806..29faafc 100644
--- a/rfc1035/testlookup.c
+++ b/rfc1035/testlookup.c
@@ -332,7 +332,7 @@ char ptrbuf[RFC1035_MAXNAMESIZE+1];
replyp=rfc1035_resolve(&res, RFC1035_OPCODE_QUERY,
q_name, q_type[0], q_class);
}
- free(q_type);
+
if (!replyp)
{
perror(argv[0]);
@@ -358,5 +358,6 @@ char ptrbuf[RFC1035_MAXNAMESIZE+1];
}
rfc1035_replyfree(replyp);
rfc1035_destroy_resolv(&res);
+ free(q_type);
return (0);
}
diff --git a/rfc2045/configure.ac b/rfc2045/configure.ac
index 74a06f2..1f7b1cd 100644
--- a/rfc2045/configure.ac
+++ b/rfc2045/configure.ac
@@ -1,7 +1,7 @@
dnl
dnl Copyright 1998 - 2011 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(rfc2045lib, 0.20, [courier-maildrop@lists.sourceforge.net])
+AC_INIT([rfc2045lib],[0.20],[courier-maildrop@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -13,10 +13,8 @@ AC_CONFIG_HEADERS(rfc2045_config.h)
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_CXX
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = yes ; then
CXXFLAGS="$CXXFLAGS -Wall"
@@ -26,20 +24,20 @@ fi
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(unistd.h sys/wait.h strings.h locale.h)
AC_CACHE_CHECK([for missing gethostname prototype],rfc2045_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);
-],[
-],rfc2045_cv_SYS_GETHOSTNAME=yes,rfc2045_cv_SYS_GETHOSTNAME=no
-)
+]], [[
+]])],[rfc2045_cv_SYS_GETHOSTNAME=yes],[rfc2045_cv_SYS_GETHOSTNAME=no
+])
)
@@ -91,4 +89,5 @@ AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
. ../rfc822/rfc822.config
AM_CONDITIONAL(HAVE_LIBIDN, test "$libidn" = "yes")
-AC_OUTPUT(Makefile rfc2045charset.h)
+AC_CONFIG_FILES([Makefile rfc2045charset.h])
+AC_OUTPUT
diff --git a/rfc2045/rfc2045decode.c b/rfc2045/rfc2045decode.c
index 1fa2d79..c5e0667 100644
--- a/rfc2045/rfc2045decode.c
+++ b/rfc2045/rfc2045decode.c
@@ -27,6 +27,7 @@ struct rfc2045id nextid;
decode(topid, &nextid.next, r, func, ptr);
++nextid.idnum;
}
+ *childidptr=0; /* Fix spurious gcc warning */
}
void rfc2045_decode(struct rfc2045 *p,
diff --git a/rfc822/configure.ac b/rfc822/configure.ac
index a8d7efd..b179b8d 100644
--- a/rfc822/configure.ac
+++ b/rfc822/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2009 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(rfc822lib, 0.13, [courier-users@lists.sourceforge.net])
+AC_INIT([rfc822lib],[0.13],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -15,8 +15,7 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
-AC_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = yes ; then
CXXFLAGS="$CXXFLAGS -Wall"
@@ -28,7 +27,6 @@ CFLAGS="$CFLAGS -I.. -I$srcdir/.."
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
AC_CHECK_HEADERS(locale.h strings.h)
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -39,8 +37,7 @@ AC_SYS_LARGEFILE
dnl Checks for library functions.
-AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
- [Support IDN (needs GNU Libidn)]),
+AC_ARG_WITH(libidn, AS_HELP_STRING([--with-libidn=[DIR]],[Support IDN (needs GNU Libidn)]),
libidn=$withval, libidn=yes)
if test "$libidn" != "no"
@@ -62,32 +59,34 @@ AC_CHECK_FUNCS(setlocale)
AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE,
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
time_t t;
-],[
+]], [[
t=altzone;
-], librfc822_cv_SYS_TIMEZONE=altzone,
+]])],[librfc822_cv_SYS_TIMEZONE=altzone],[])
- AC_TRY_COMPILE([
+if test "$librfc822_cv_SYS_TIMEZONE" = ""
+then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
int n;
-],[
+]], [[
n=daylight;
- ], librfc822_cv_SYS_TIMEZONE=daylight,
+ ]])],[librfc822_cv_SYS_TIMEZONE=daylight],[])
+fi
- AC_TRY_COMPILE([
+if test "$librfc822_cv_SYS_TIMEZONE" = ""
+then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
extern struct tm dummy;
long n;
-],[
+]], [[
n=dummy.tm_gmtoff;
- ] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff,
- librfc822_cv_SYS_TIMEZONE=unknown
- )
- )
- )
+ ]])],[librfc822_cv_SYS_TIMEZONE=tm_gmtoff],[librfc822_cv_SYS_TIMEZONE=unknown])
+fi
)
case $librfc822_cv_SYS_TIMEZONE in
@@ -111,4 +110,5 @@ esac
AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
echo "libidn=$libidn" >rfc822.config
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/rootcerts/configure.ac b/rootcerts/configure.ac
index 57357b2..76bf024 100644
--- a/rootcerts/configure.ac
+++ b/rootcerts/configure.ac
@@ -2,7 +2,7 @@ dnl
dnl Copyright 2001-2008 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(rootcerts, 0.50, [courier-users@lists.sourceforge.net])
+AC_INIT([rootcerts],[0.50],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -50,4 +50,5 @@ fi
AC_SUBST(certdb)
-AC_OUTPUT(Makefile rootcertsdir.cnf)
+AC_CONFIG_FILES([Makefile rootcertsdir.cnf])
+AC_OUTPUT
diff --git a/sha1/configure.ac b/sha1/configure.ac
index 6bc8351..39d9165 100644
--- a/sha1/configure.ac
+++ b/sha1/configure.ac
@@ -3,8 +3,8 @@ dnl
dnl Copyright 2001-2004 Double Precision, Inc.
dnl See COPYING for distribution information.
-AC_PREREQ(2.59)
-AC_INIT(libsha1, 1.21, courier-users@lists.sourceforge.net)
+AC_PREREQ([2.71])
+AC_INIT([libsha1],[1.21],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -17,10 +17,9 @@ AM_CONDITIONAL(HMACC, test -d ${srcdir}/../libhmac)
dnl Checks for programs.
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = yes
then
@@ -41,7 +40,7 @@ AC_ARG_WITH(int32,
AC_MSG_CHECKING(for uint32_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -49,13 +48,13 @@ AC_ARG_WITH(int32,
#include <stdint.h>
#endif
uint32_t i;
- ],[
- ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [
+ ]], [[
+ ]])],[ AC_MSG_RESULT(yes) ; int32="uint32_t"],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for u_int_32_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -63,8 +62,8 @@ uint32_t i;
#include <stdint.h>
#endif
u_int32_t i;
- ],[
- ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[
+ ]], [[
+ ]])],[AC_MSG_RESULT(yes); int32="u_int32_t"],[
AC_MSG_RESULT(no)
@@ -77,7 +76,7 @@ u_int32_t i;
AC_CHECK_SIZEOF(unsigned short, 0)
if test "$ac_cv_sizeof_unsigned_short" != 4
then
- AC_ERROR(--with-int32 option is required)
+ AC_MSG_ERROR(--with-int32 option is required)
fi
int32="unsigned short"
else
@@ -101,7 +100,7 @@ AC_ARG_WITH(int64,
AC_MSG_CHECKING(for uint64_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -109,13 +108,13 @@ AC_ARG_WITH(int64,
#include <stdint.h>
#endif
uint64_t i;
- ],[
- ], [ AC_MSG_RESULT(yes) ; int64="uint64_t"], [
+ ]], [[
+ ]])],[ AC_MSG_RESULT(yes) ; int64="uint64_t"],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for u_int_64_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -123,8 +122,8 @@ uint64_t i;
#include <stdint.h>
#endif
u_int64_t i;
- ],[
- ], [AC_MSG_RESULT(yes); int64="u_int64_t"],[
+ ]], [[
+ ]])],[AC_MSG_RESULT(yes); int64="u_int64_t"],[
AC_MSG_RESULT(no)
@@ -140,7 +139,7 @@ u_int64_t i;
AC_CHECK_SIZEOF(unsigned short, 0)
if test "$ac_cv_sizeof_unsigned_short" != 8
then
- AC_ERROR(--with-int64 option is required)
+ AC_MSG_ERROR(--with-int64 option is required)
fi
int64="unsigned short"
else
@@ -163,7 +162,5 @@ dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_SYS_LARGEFILE
-dnl Checks for library functions.
-AC_HEADER_STDC
-
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/soxwrap/configure.ac b/soxwrap/configure.ac
index 11137fb..fcb1efd 100644
--- a/soxwrap/configure.ac
+++ b/soxwrap/configure.ac
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl Copyright 2000-2009 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(soxwrap, 0.50, [courier-users@lists.sourceforge.net])
+AC_INIT([soxwrap],[0.50],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -21,7 +21,6 @@ AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_CC
-AC_PROG_CC_C99
dnl Check for options
@@ -107,7 +106,7 @@ fi
AC_DEFINE_UNQUOTED(HAVE_SOCKS, $DOSOCKS, [ Whether to use the Courier Socks library ])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/select.h sys/poll.h pthread.h sys/stat.h fcntl.h sys/select.h sys/poll.h])
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_SYS_LARGEFILE
AC_SUBST(SOCKLIBS)
@@ -119,7 +118,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
AC_CACHE_CHECK([for structs in6_addr, sockaddr_in6, and sockaddr_storage],
soxwrap_cv_hasipv6structs,
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -129,10 +128,9 @@ struct sockaddr_in6 sain6;
struct sockaddr_storage soas;
int x=PF_INET6;
- ], [
+ ]], [[
- ], soxwrap_cv_hasipv6structs=yes,
- soxwrap_cv_hasipv6structs=no )
+ ]])],[soxwrap_cv_hasipv6structs=yes],[soxwrap_cv_hasipv6structs=no ])
)
AC_ARG_WITH(ipv6, [ --without-ipv6 Disable IPv6 support],
@@ -193,4 +191,5 @@ fi
AC_CHECK_FUNCS(inet_pton poll)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/soxwrap/sconnect.h b/soxwrap/sconnect.h
index 750a812..5ba69e1 100644
--- a/soxwrap/sconnect.h
+++ b/soxwrap/sconnect.h
@@ -5,15 +5,9 @@
#include "soxwrap/soxwrap_config.h"
#endif
-#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
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/sqwebmail/ChangeLog b/sqwebmail/ChangeLog
index e3a1a4a..ea1a963 100644
--- a/sqwebmail/ChangeLog
+++ b/sqwebmail/ChangeLog
@@ -1,3 +1,12 @@
+6.0.10
+
+2022-05-22 Sam Varshavchik <mrsam@courier-mta.com>
+
+ * gcc 12 and autotools update. Fix minor use after free bugs
+ when showing links to decoded PGP attachments, and if the
+ calendar module is enabled, and the calendaring server runs out
+ of disk space.
+
2022-04-14 Sam Varshavchik <mrsam@courier-mta.com>
* Add scripts to create installable .deb packages, update
diff --git a/sqwebmail/configure.ac b/sqwebmail/configure.ac
index d23672a..9df40fe 100644
--- a/sqwebmail/configure.ac
+++ b/sqwebmail/configure.ac
@@ -2,7 +2,7 @@ dnl
dnl Copyright 1998 - 2022 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(sqwebmail, 6.0.9, [courier-sqwebmail@lists.sourceforge.net])
+AC_INIT([sqwebmail],[6.0.10],[courier-sqwebmail@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -17,9 +17,7 @@ AC_PROG_MAKE_SET
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+LT_INIT
if test "$GCC" = yes ; then
CXXFLAGS="$CXXFLAGS -Wall"
@@ -181,21 +179,21 @@ AC_SUBST(piddir)
dnl Checks for header files.
AC_HEADER_DIRENT
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(fcntl.h sys/wait.h sys/select.h sys/uio.h sys/stat.h sys/time.h utime.h unistd.h locale.h crypt.h wchar.h strings.h)
AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_STRUCT_TM
AC_TYPE_PID_T
AC_TYPE_UID_T
-AC_TYPE_SIGNAL
AC_SYS_LARGEFILE
-AC_TRY_RUN( [
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
@@ -210,16 +208,14 @@ 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 $MAXLONGSIZE])
- ]
- )
+
+ ])
dnl Checks for library functions.
AC_FUNC_STRFTIME
@@ -228,7 +224,7 @@ AC_REPLACE_FUNCS(strdup)
AC_CACHE_CHECK([for crypt() prototype],sqwebmail_cv_NEED_CRYPT_PROTOTYPE,
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_CRYPT_H
#include <crypt.h>
#endif
@@ -237,8 +233,7 @@ AC_TRY_COMPILE( [
#endif
int crypt(int, int);
- ], [], sqwebmail_cv_NEED_CRYPT_PROTOTYPE=1,
- sqwebmail_cv_NEED_CRYPT_PROTOTYPE=0 )
+ ]], [[]])],[sqwebmail_cv_NEED_CRYPT_PROTOTYPE=1],[sqwebmail_cv_NEED_CRYPT_PROTOTYPE=0 ])
)
@@ -496,7 +491,8 @@ do
fi
done
-AC_OUTPUT(Makefile sendit.sh cleancache.pl sqwebmaild.dist)
+AC_CONFIG_FILES([Makefile sendit.sh cleancache.pl sqwebmaild.dist])
+AC_OUTPUT
if test ! -d html/$lang
then
diff --git a/sqwebmail/folder.c b/sqwebmail/folder.c
index 89478b1..37349c3 100644
--- a/sqwebmail/folder.c
+++ b/sqwebmail/folder.c
@@ -53,16 +53,11 @@
#endif
#endif
-#if TIME_WITH_SYS_TIME
-#include <sys/time.h>
#include <time.h>
-#else
-#if HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
-#include <time.h>
-#endif
#endif
+
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/sqwebmail/folder.h b/sqwebmail/folder.h
index 74c4a8c..48d7878 100644
--- a/sqwebmail/folder.h
+++ b/sqwebmail/folder.h
@@ -21,15 +21,9 @@
#include <unistd.h>
#endif
-#if TIME_WITH_SYS_TIME
-#include <sys/time.h>
#include <time.h>
-#else
-#if HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
-#include <time.h>
-#endif
#endif
typedef struct {
diff --git a/sqwebmail/html/configure.ac b/sqwebmail/html/configure.ac
index 9690cee..97b9e46 100644
--- a/sqwebmail/html/configure.ac
+++ b/sqwebmail/html/configure.ac
@@ -2,7 +2,7 @@ dnl
dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(sqwebmail, 0.23, [courier-sqwebmail@lists.sourceforge.net])
+AC_INIT([sqwebmail],[0.23],[courier-sqwebmail@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -24,7 +24,8 @@ htmldir="$datadir/sqwebmail/html"
AC_SUBST(htmldir)
AC_CONFIG_SUBDIRS($LANGUAGES)
AC_SUBST(LANGUAGES)
-AC_OUTPUT(Makefile README_LANG.html)
+AC_CONFIG_FILES([Makefile README_LANG.html])
+AC_OUTPUT
# Set up soft links
diff --git a/sqwebmail/html/en-us/configure.ac b/sqwebmail/html/en-us/configure.ac
index fc54ed1..18a3795 100644
--- a/sqwebmail/html/en-us/configure.ac
+++ b/sqwebmail/html/en-us/configure.ac
@@ -1,6 +1,6 @@
dnl
-AC_INIT(sqwebmail-en-us, 0.1, [courier-sqwebmail@lists.sourceforge.net])
+AC_INIT([sqwebmail-en-us],[0.1],[courier-sqwebmail@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -33,4 +33,5 @@ AC_SUBST(htmldir)
AC_SUBST(htmldir)
AC_PROG_INSTALL
AC_PROG_MAKE_SET
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/sqwebmail/images/configure.ac b/sqwebmail/images/configure.ac
index 2fc7c8d..13c6aaa 100644
--- a/sqwebmail/images/configure.ac
+++ b/sqwebmail/images/configure.ac
@@ -4,7 +4,7 @@ dnl configure.in,v 1.1 2000/05/24 17:08:11 mrsam Exp
dnl Copyright 2000-2007 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(sqwebmail-images,0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([sqwebmail-images],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -24,4 +24,5 @@ dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/sqwebmail/ispell.c b/sqwebmail/ispell.c
index 4666897..61418da 100644
--- a/sqwebmail/ispell.c
+++ b/sqwebmail/ispell.c
@@ -26,7 +26,7 @@
#include <string.h>
static pid_t ispell_pid;
-static RETSIGTYPE (*prevsighandler)(int);
+static void (*prevsighandler)(int);
#ifndef ISPELL
#define ISPELL "/usr/bin/ispell"
diff --git a/sqwebmail/msg2html.c b/sqwebmail/msg2html.c
index 74ecfb6..a3bb4da 100644
--- a/sqwebmail/msg2html.c
+++ b/sqwebmail/msg2html.c
@@ -1066,12 +1066,12 @@ static char *convertcid(const char *cidurl, void *voidp)
else
p=(*cid_info->info->get_url_to_mime_part)(mimeid,
cid_info->info);
- free(mimeid);
-
if (*mimegpgfilename && rfc->parent &&
libmail_gpgmime_is_decoded(rfc->parent, &dummy))
add_decoded_link(rfc->parent, mimeid, dummy);
+ free(mimeid);
+
return p;
}
diff --git a/sqwebmail/sqconfig.h b/sqwebmail/sqconfig.h
index 5cb79b5..dcad127 100644
--- a/sqwebmail/sqconfig.h
+++ b/sqwebmail/sqconfig.h
@@ -15,15 +15,9 @@
#include "config.h"
#endif
-#if TIME_WITH_SYS_TIME
-#include <sys/time.h>
#include <time.h>
-#else
-#if HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
-#include <time.h>
-#endif
#endif
extern const char *read_sqconfig(const char *, const char *, time_t *);
diff --git a/sqwebmail/sqwebmail.c b/sqwebmail/sqwebmail.c
index 7d7ea62..6074b2a 100644
--- a/sqwebmail/sqwebmail.c
+++ b/sqwebmail/sqwebmail.c
@@ -2002,7 +2002,7 @@ void cleanup()
-static RETSIGTYPE catch_sig(int n)
+static void catch_sig(int n)
{
n=n;
cleanup();
diff --git a/sqwebmail/token.c b/sqwebmail/token.c
index ad8acfb..48c286a 100644
--- a/sqwebmail/token.c
+++ b/sqwebmail/token.c
@@ -16,15 +16,9 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#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
+#include <time.h>
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
#endif
void tokennew()
@@ -61,4 +55,3 @@ void tokensave()
{
write_sqconfig(".", TOKENFILE, cgi("msgtoken"));
}
-
diff --git a/tcpd/configure.ac b/tcpd/configure.ac
index 2a42428..f371819 100644
--- a/tcpd/configure.ac
+++ b/tcpd/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2008 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(couriertcpd, 0.11, [courier-users@lists.sourceforge.net])
+AC_INIT([couriertcpd],[0.11],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -15,11 +15,9 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+LT_INIT
SPATH="$LPATH:/usr/kerberos/bin"
@@ -127,16 +125,22 @@ fi
AC_SUBST(NETLIBS)
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_HEADER_DIRENT
AC_CHECK_HEADERS(sys/types.h sys/time.h sys/stat.h sys/wait.h sys/select.h unistd.h fcntl.h sys/ioctl.h)
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+ AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+ and <time.h>. This macro is obsolete.])
+fi
+# End of obsolete code.
+
dnl Checks for typedefs, structures, and compiler characteristics.
-AC_PID_T
+AC_TYPE_PID_T
AC_TYPE_UID_T
-AC_TYPE_SIGNAL
AC_SYS_LARGEFILE
AC_CACHE_CHECK([for socklen_t],
@@ -202,21 +206,20 @@ AC_ARG_WITH(spipe,
spipe="$withval", spipe="")
AC_CACHE_CHECK([for SVR3 stream pipes],tcpd_cv_svr3,
-AC_TRY_COMPILE( [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/stream.h>
#include <stropts.h>
#include <fcntl.h>
-],[ {
+]], [[ {
(void)(sizeof(struct strfdinsert) +
sizeof(queue_t) + I_FDINSERT)
}
-], tcpd_cv_svr3=yes, tcpd_cv_svr3=no))
+]])],[tcpd_cv_svr3=yes],[tcpd_cv_svr3=no]))
AC_CACHE_CHECK( [for SVR4 stream pipes],tcpd_cv_svr4,
-AC_TRY_RUN(
-[
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
changequote(<<,>>)
@@ -241,11 +244,8 @@ char c;
return (1);
}
changequote([,])
-]
-,
-tcpd_cv_svr4=yes,
-tcpd_cv_svr4=no,
-tcpd_cv_svr4="n/a")
+
+]])],[tcpd_cv_svr4=yes],[tcpd_cv_svr4=no],[tcpd_cv_svr4="n/a"])
)
@@ -326,20 +326,18 @@ then
if test "$KRB5CONFIG" != "krb5-config"
then
AC_MSG_CHECKING(whether OpenSSL requires Kerberos)
- AC_TRY_COMPILE( [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <openssl/ssl.h>
-], [ ], :,
- [
+]], [[ ]])],[:],[
KRBFLAGS=`$KRB5CONFIG --cflags`
CFLAGS="$CFLAGS $KRBFLAGS"
- AC_TRY_COMPILE( [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <openssl/ssl.h>
-], [ ], [ KRBLIBS="`$KRB5CONFIG --libs`" ],
- AC_MSG_ERROR(OpenSSL test build failed) )
- ]
-)
+]], [[ ]])],[ KRBLIBS="`$KRB5CONFIG --libs`" ],[AC_MSG_ERROR(OpenSSL test build failed) ])
+
+])
if test "$KRBLIBS" = ""
then
@@ -364,15 +362,11 @@ then
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags gnutls`"
- AC_TRY_COMPILE( [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <gnutls/gnutls.h>
-],
- [
- ],
- [ have_gnutls=yes
- ],
-
- [
+]], [[
+ ]])],[ have_gnutls=yes
+ ],[
have_gnutls="no: \#include <gnutls/gnutls.h> failed"
])
@@ -471,17 +465,17 @@ then
save_LIBS="$LIBS"
LIBS="$LIBS -lgcrypt"
- AC_TRY_LINK( [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <gcrypt.h>
-], [
+]], [[
gcry_cipher_open(NULL, 0, 0, 0);
-], [
+]])],[
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_GCRYPT, 1,
[ Whether libgcrypt is installed ])
CRYPTLIBS="$CRYPTLIBS -lgcrypt"
-], [
+],[
AC_MSG_RESULT(no)
have_gcrypt="no"
])
@@ -492,15 +486,15 @@ have_gcrypt="no"
fi
AC_MSG_CHECKING([for libgpg-error])
LIBS="$LIBS -lgpg-error"
- AC_TRY_LINK( [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <gcrypt.h>
-], [
+]], [[
gpg_err_code_from_errno(0);
-], [
+]])],[
AC_MSG_RESULT(yes)
CRYPTLIBS="$CRYPTLIBS -lgpg-error"
-], [
+],[
AC_MSG_RESULT(no)
])
@@ -514,12 +508,12 @@ else
save_LIBS="$LIBS"
LIBS="-lcrypto $KRBLIBS $LIBS"
+ AC_CHECK_FUNCS(PEM_read_bio_Parameters_ex)
AC_MSG_CHECKING(for OpenSSL 0.9.7)
- AC_TRY_LINK( [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <openssl/evp.h>
#include <openssl/rand.h>
-],
-[
+]], [[
EVP_CIPHER_CTX ctx;
char dummy[1];
unsigned char a[1], b[1];
@@ -528,22 +522,21 @@ EVP_CIPHER_CTX_init(&ctx);
EVP_EncryptInit_ex(&ctx, EVP_des_cbc(), NULL, a, b);
RAND_pseudo_bytes(dummy, 1);
-], [
+]])],[
CRYPTLIBS="-lcrypto $KRBLIBS"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_OPENSSL097, 1,
[ Whether OpenSSL 0.9.7 is installed ])
-], [
+],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for OpenSSL 1.1.0)
- AC_TRY_LINK( [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <openssl/evp.h>
#include <openssl/rand.h>
-],
-[
+]], [[
unsigned char dummy[1];
unsigned char a[1], b[1];
@@ -551,31 +544,30 @@ EVP_CIPHER_CTX *ctx=EVP_CIPHER_CTX_new();
EVP_EncryptInit_ex(ctx, EVP_des_cbc(), NULL, a, b);
RAND_bytes(dummy, 1);
-], [
+]])],[
CRYPTLIBS="-lcrypto $KRBLIBS"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_OPENSSL110, 1,
[ Whether OpenSSL 1.1.0 is installed ])
-], [
+],[
AC_MSG_RESULT(no)
])
-]
-)
+
+])
LIBS="-lssl $LIBS"
AC_CHECK_FUNCS(TLSv1_1_method TLSv1_2_method X509_VERIFY_PARAM_set1_host)
LIBS="$save_LIBS"
- AC_TRY_COMPILE( [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <openssl/ssl.h>
SSL *p;
-],
-[
+]], [[
(void)SSL_get_servername(p, TLSEXT_NAMETYPE_host_name);
-], [
+]])],[
AC_DEFINE_UNQUOTED(HAVE_OPENSSL_SNI,1,[ Whether OpenSSL supports SNI ])
- ])
+ ],[])
TLSLIBRARY="$LIBCOURIERTLSOPENSSL"
STARTTLS=couriertls$EXEEXT
@@ -610,4 +602,5 @@ AC_SUBST(BUILDLIBCOURIERTLS)
AC_SUBST(TLSLIBRARY)
AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/tcpd/libcouriertls.c b/tcpd/libcouriertls.c
index 7c42f19..9c2847a 100644
--- a/tcpd/libcouriertls.c
+++ b/tcpd/libcouriertls.c
@@ -409,19 +409,39 @@ static void load_dh_params(SSL_CTX *ctx, const char *filename,
const struct tls_info *info=SSL_CTX_get_app_data(ctx);
BIO *bio;
- DH *dh;
if (*cert_file_flags)
return;
if ((bio=BIO_new_file(filename, "r")) != 0)
{
+#if HAVE_PEM_READ_BIO_PARAMETERS_EX
+
+ OSSL_LIB_CTX *libctx=OSSL_LIB_CTX_get0_global_default();
+
+ EVP_PKEY *pkey=PEM_read_bio_Parameters_ex(bio, NULL, libctx,
+ NULL);
+
+ if (pkey)
+ {
+ if (EVP_PKEY_is_a(pkey, "DH"))
+ {
+ SSL_CTX_set0_tmp_dh_pkey(ctx, pkey);
+ *cert_file_flags = 1;
+ }
+ EVP_PKEY_free(pkey);
+ }
+
+#else
+ DH *dh;
+
if ((dh=PEM_read_bio_DHparams(bio, NULL, NULL, NULL)) != 0)
{
SSL_CTX_set_tmp_dh(ctx, dh);
*cert_file_flags = 1;
DH_free(dh);
}
+#endif
else
{
/*
diff --git a/tcpd/starttls.c b/tcpd/starttls.c
index 6e6229b..9a3b18f 100644
--- a/tcpd/starttls.c
+++ b/tcpd/starttls.c
@@ -53,16 +53,11 @@
#include <sys/socket.h>
#include <arpa/inet.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
+
#include <locale.h>
diff --git a/tcpd/tcpd.c b/tcpd/tcpd.c
index 7cd3afa..55f1111 100644
--- a/tcpd/tcpd.c
+++ b/tcpd/tcpd.c
@@ -245,25 +245,17 @@ static int isid(const char *p)
return (1);
}
-static RETSIGTYPE sigexit(int n)
+static void sigexit(int n)
{
kill( -getpid(), SIGTERM);
_exit(0);
-
-#if RETSIGTYPE != void
- return (0)
-#endif
}
-static RETSIGTYPE sighup(int n)
+static void sighup(int n)
{
sighup_received=1;
signal(SIGHUP, sighup);
-
-#if RETSIGTYPE != void
- return (0)
-#endif
}
/*
@@ -893,13 +885,10 @@ int n;
}
}
-static RETSIGTYPE childsig(int signum)
+static void childsig(int signum)
{
signum=signum;
wait_reap(doreap, childsig);
-#if RETSIGTYPE != void
- return (0);
-#endif
}
static int doallowaccess(char *, int);
diff --git a/threadlib/configure.ac b/threadlib/configure.ac
index 408c07c..92ab971 100644
--- a/threadlib/configure.ac
+++ b/threadlib/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(threadlib, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([threadlib],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -16,12 +16,11 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_CC
-AC_PROG_CC_C99
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(unistd.h pthread.h)
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -36,13 +35,12 @@ AC_CHECK_LIB(pthread, pthread_cond_wait, [
THREADLIB="-lpthread" ; LIBS="-lpthread $LIBS" ], [
LIBS="-pthread $save_LIBS"
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
void pthread_cond_wait();
-],[
+]], [[
pthread_cond_wait();
-],
- THREADLIB="-pthread"
-)
+]])],[THREADLIB="-pthread"
+],[])
]
)
@@ -76,19 +74,20 @@ AM_CONDITIONAL(HAVE_PTHREADS, test "$have_pthreads" != "no")
AC_SUBST(THREADLIB)
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <math.h>
double x()
{
return sqrt(0);
-}],[
-], [
+}]], [[
+]])],[
LIBS='-lm'
-])
+],[])
if test "$GCC" = "yes"
then
CFLAGS="-Wall $CFLAGS"
fi
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/waitlib/configure.ac b/waitlib/configure.ac
index d475dee..7e94c50 100644
--- a/waitlib/configure.ac
+++ b/waitlib/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 1998 - 2002 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(waitlib, 0.50, [courier-users@lists.sourceforge.net])
+AC_INIT([waitlib],[0.50],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -18,8 +18,7 @@ AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CC
-AC_PROG_CC_C99
-AC_PROG_LIBTOOL
+LT_INIT
dnl Checks for libraries.
@@ -31,7 +30,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
dnl Checks for library functions.
-AC_TYPE_SIGNAL
+
AC_SYS_LARGEFILE
AC_CHECK_FUNCS(wait wait3 sigblock sighold sigprocmask)
@@ -50,12 +49,10 @@ wait3)
"")
AC_CACHE_CHECK([if wait function is broken],waitlib_cv_SYS_WAITBROKEN,
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include "confdefs.h"
#include "$srcdir/confwait.c"
- ], waitlib_cv_SYS_WAITBROKEN=no,
- waitlib_cv_SYS_WAITBROKEN=yes,
- AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling)))
+ ]])],[waitlib_cv_SYS_WAITBROKEN=no],[waitlib_cv_SYS_WAITBROKEN=yes],[AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling)]))
has_xsig=no;
if test "$ac_cv_func_sigblock" = "yes"
@@ -70,13 +67,11 @@ wait3)
if test "$waitlib_cv_SYS_WAITBROKEN$has_xsig$ac_cv_func_wait3" = "yesyesyes"
then
AC_CACHE_CHECK([if wait3 function is broken],waitlib_cv_SYS_WAIT3BROKEN,
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define USE_WAIT3 1
#include "confdefs.h"
#include "$srcdir/confwait.c"
- ], waitlib_cv_SYS_WAIT3BROKEN=no,
- waitlib_cv_SYS_WAIT3BROKEN=yes,
- AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling)))
+ ]])],[waitlib_cv_SYS_WAIT3BROKEN=no],[waitlib_cv_SYS_WAIT3BROKEN=yes],[AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling)]))
use_wait3=yes
if test $waitlib_cv_SYS_WAIT3BROKEN = yes
then
@@ -106,4 +101,5 @@ then
CFLAGS="-Wall $CFLAGS"
fi
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/waitlib/confwait.c b/waitlib/confwait.c
index 7bd4d2d..55127b3 100644
--- a/waitlib/confwait.c
+++ b/waitlib/confwait.c
@@ -35,15 +35,11 @@ static void cntreaped(pid_t p, int n)
if ( ++numterminated == NUMPROCS ) _exit(0);
}
-static RETSIGTYPE childsig(int n)
+static void childsig(int n)
{
n=n;
wait_reap(cntreaped, childsig);
-
-#if RETSIGTYPE != void
- return (0);
-#endif
}
int main()
diff --git a/waitlib/testwait.c b/waitlib/testwait.c
index a720e49..bd952be 100644
--- a/waitlib/testwait.c
+++ b/waitlib/testwait.c
@@ -26,12 +26,9 @@ static void reap_child(pid_t p, int dummy)
; /* shut up gcc */
}
-static RETSIGTYPE sighandler(int sig)
+static void sighandler(int sig)
{
wait_reap(&reap_child, &sighandler);
-#if RETSIGTYPE != void
- return (0);
-#endif
}
static pid_t start_child()
diff --git a/waitlib/waitlib.c b/waitlib/waitlib.c
index 9a5a2e1..643c391 100644
--- a/waitlib/waitlib.c
+++ b/waitlib/waitlib.c
@@ -43,7 +43,7 @@ void wait_block()
HOLD_CHILDREN;
}
-void wait_clear(RETSIGTYPE (*func)(int))
+void wait_clear(void (*func)(int))
{
RELEASE_CHILDREN;
}
@@ -61,7 +61,7 @@ void wait_block()
signal(SIGCHLD, SIG_DFL);
}
-void wait_clear(RETSIGTYPE (*func)(int))
+void wait_clear(void (*func)(int))
{
signal(SIGCHLD, func);
}
@@ -73,7 +73,7 @@ void wait_restore()
#endif
-void wait_reap( void (*func)(pid_t, int), RETSIGTYPE (*handler)(int))
+void wait_reap( void (*func)(pid_t, int), void (*handler)(int))
{
int dummy;
pid_t p;
@@ -98,7 +98,7 @@ pid_t p;
}
-void wait_forchild( void (*reap)(pid_t, int), RETSIGTYPE (*func)(int))
+void wait_forchild( void (*reap)(pid_t, int), void (*func)(int))
{
pid_t p;
int wait_stat;
diff --git a/waitlib/waitlib.h b/waitlib/waitlib.h
index 7d36287..163a6e5 100644
--- a/waitlib/waitlib.h
+++ b/waitlib/waitlib.h
@@ -32,7 +32,7 @@
*/
void wait_reap( void (*)(pid_t, int), /* Called to process reaped child */
- RETSIGTYPE (*)(int)); /* Should point back to signal handler */
+ void (*)(int)); /* Should point back to signal handler */
/*
** Main program can call wait_block and wait_clear to temporarily
@@ -40,7 +40,7 @@ void wait_reap( void (*)(pid_t, int), /* Called to process reaped child */
*/
void wait_block();
-void wait_clear(RETSIGTYPE (*)(int)); /* The signal handler */
+void wait_clear(void (*)(int)); /* The signal handler */
/*
** wait_restore should be called instead of signal(SIGCHLD, SIG_DFL)
@@ -60,7 +60,7 @@ void wait_restore();
*/
void wait_forchild( void (*)(pid_t, int), /* Reaper */
- RETSIGTYPE (*)(int)); /* Signal handler stub */
+ void (*)(int)); /* Signal handler stub */
/*
** wait_startchildren() is a convenient function to start a given number
diff --git a/waitlib/waitlib2.c b/waitlib/waitlib2.c
index 52dfc26..a98bd9c 100644
--- a/waitlib/waitlib2.c
+++ b/waitlib/waitlib2.c
@@ -20,17 +20,13 @@ static void start_reaper(pid_t pid, int exit_stat)
{
}
-static RETSIGTYPE start_reap(int signum)
+static void start_reap(int signum)
{
wait_reap(start_reaper, start_reap);
-
-#if RETSIGTYPE != void
- return (0);
-#endif
}
void wait_forchild( void (*)(pid_t, int), /* Reaper */
- RETSIGTYPE (*)(int)); /* Signal handler stub */
+ void (*)(int)); /* Signal handler stub */
int wait_startchildren(unsigned nchildren, pid_t **pidptr)
{