+0.60.2
+
+2007-10-10 "Johnny C. Lam" <jlam-courier@buildlink.org>
+
+ * liblock/lockdaemon.c: Portability fix for checking the highest
+ available file descriptor.
+
0.60.1
2007-10-06 Anton Dobkin <adobkin@viansib.ru>
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for courier-authlib 0.60.1.
+# Generated by GNU Autoconf 2.61 for courier-authlib 0.60.2.
#
# Report bugs to <courier-users@lists.sourceforge.net>.
#
# Identity of this package.
PACKAGE_NAME='courier-authlib'
PACKAGE_TARNAME='courier-authlib'
-PACKAGE_VERSION='0.60.1'
-PACKAGE_STRING='courier-authlib 0.60.1'
+PACKAGE_VERSION='0.60.2'
+PACKAGE_STRING='courier-authlib 0.60.2'
PACKAGE_BUGREPORT='courier-users@lists.sourceforge.net'
ac_unique_file="courierauth.h"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures courier-authlib 0.60.1 to adapt to many kinds of systems.
+\`configure' configures courier-authlib 0.60.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of courier-authlib 0.60.1:";;
+ short | recursive ) echo "Configuration of courier-authlib 0.60.2:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-courier-authlib configure 0.60.1
+courier-authlib configure 0.60.2
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by courier-authlib $as_me 0.60.1, which was
+It was created by courier-authlib $as_me 0.60.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='courier-authlib'
- VERSION='0.60.1'
+ VERSION='0.60.2'
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by courier-authlib $as_me 0.60.1, which was
+This file was extended by courier-authlib $as_me 0.60.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-courier-authlib config.status 0.60.1
+courier-authlib config.status 0.60.2
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl $Id: configure.in,v 1.152 2007/10/07 18:33:22 mrsam Exp $
+dnl $Id: configure.in,v 1.153 2007/10/14 00:19:54 mrsam Exp $
dnl
dnl Copyright 1998 - 2007 Double Precision, Inc. See COPYING for
dnl distribution information.
AC_PREREQ(2.59)
-AC_INIT(courier-authlib, 0.60.1, [courier-users@lists.sourceforge.net])
+AC_INIT(courier-authlib, 0.60.2, [courier-users@lists.sourceforge.net])
AC_CONFIG_SRCDIR([courierauth.h])
AM_CONFIG_HEADER([courier_auth_config.h])
# distribution information.
Name: courier-authlib
-Version: 0.60.1
+Version: 0.60.2
Release: 1
License: GPL
################################################################################
Name: courier-authlib
-Version: 0.60.1
+Version: 0.60.2
Release: 1%{?dist}%{?courier_release}
Summary: Courier authentication library
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAVE_GETDTABLESIZE
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-for ac_func in setpgrp sysconf
+
+for ac_func in getdtablesize setpgrp sysconf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-dnl $Id: configure.in,v 1.14 2007/09/26 02:36:59 mrsam Exp $
+dnl $Id: configure.in,v 1.15 2007/10/11 01:46:34 mrsam Exp $
dnl
dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
dnl distribution information.
-dnl $Id: configure.in,v 1.14 2007/09/26 02:36:59 mrsam Exp $
+dnl $Id: configure.in,v 1.15 2007/10/11 01:46:34 mrsam Exp $
AC_PREREQ(2.59)
AC_INIT(liblock, 0.60, courier-users@lists.sourceforge.net)
dnl Checks for library functions.
-AC_CHECK_FUNCS(setpgrp sysconf)
+AC_CHECK_FUNCS(getdtablesize setpgrp sysconf)
AC_CHECK_FUNC(setpgrp,
[
AC_FUNC_SETPGRP
#include <sys/ioctl.h>
#endif
-#ifndef OPEN_MAX
-#ifdef HAVE_SYSCONF
-#ifdef _SC_OPEN_MAX
-#define OPEN_MAX (my_open_max())
-
-static int my_open_max()
-{
- long n=sysconf(_SC_OPEN_MAX);
-
- if (n == -1)
- n=64;
- return n;
-}
-
-#endif
-#endif
-#endif
-
-#ifndef OPEN_MAX
-#define OPEN_MAX 64
-#endif
-
#define exit(_a_) _exit(_a_)
-static const char rcsid[]="$Id: lockdaemon.c,v 1.13 2007/09/26 02:36:59 mrsam Exp $";
+static const char rcsid[]="$Id: lockdaemon.c,v 1.14 2007/10/11 01:46:34 mrsam Exp $";
static int start1(const char *, int);
static int start1(const char *lockfile, int fd)
{
-int lockfd;
+int lockfd, maxfd;
#if HAVE_SETPGRP
#if SETPGRP_VOID
lockfd=open(lockfile, O_RDWR|O_CREAT, 0600);
}
- if (lockfd < 0 || dup2(lockfd, OPEN_MAX-1) != OPEN_MAX-1)
+#if HAVE_GETDTABLESIZE
+ maxfd=getdtablesize()-1;
+#elif defined(OPEN_MAX)
+ maxfd=OPEN_MAX-1;
+#elif HAVE_SYSCONF && defined(_SC_OPEN_MAX)
+ if ((maxfd=sysconf(_SC_OPEN_MAX)) < 0)
+ maxfd=63;
+ else if (maxfd > 0)
+ maxfd--;
+#else
+ maxfd=63;
+#endif
+
+ if (lockfd < 0 || dup2(lockfd, maxfd) != maxfd)
{
perror(lockfile);
exit(1);
}
close(lockfd);
- lockfd=OPEN_MAX-1;
+ lockfd=maxfd;
#ifdef FD_CLOEXEC
if (fcntl(lockfd, F_SETFD, FD_CLOEXEC) < 0)