Imported upstream version 0.60.2 upstream/0.60.2
authormwolson_admin <mwolson_admin@deleuze.hcoop.net>
Fri, 25 Jan 2008 23:41:28 +0000 (18:41 -0500)
committermwolson_admin <mwolson_admin@deleuze.hcoop.net>
Fri, 25 Jan 2008 23:41:28 +0000 (18:41 -0500)
ChangeLog
configure
configure.in
courier-authlib.lpspec
courier-authlib.spec
liblock/config.h.in
liblock/configure
liblock/configure.in
liblock/lockdaemon.c

index b07b533..90f0a8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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>
 0.60.1
 
 2007-10-06  Anton Dobkin <adobkin@viansib.ru>
index 2a7fa73..abfc0c7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 #! /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>.
 #
 #
 # Report bugs to <courier-users@lists.sourceforge.net>.
 #
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='courier-authlib'
 PACKAGE_TARNAME='courier-authlib'
 # 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"
 PACKAGE_BUGREPORT='courier-users@lists.sourceforge.net'
 
 ac_unique_file="courierauth.h"
@@ -1461,7 +1461,7 @@ if test "$ac_init_help" = "long"; then
   # 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
   # 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]...
 
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1531,7 +1531,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
 
 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
 
    esac
   cat <<\_ACEOF
 
@@ -1667,7 +1667,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   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,
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1681,7 +1681,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 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 $@
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2376,7 +2376,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='courier-authlib'
 
 # Define the identity of the package.
  PACKAGE='courier-authlib'
- VERSION='0.60.1'
+ VERSION='0.60.2'
 
 
 cat >>confdefs.h <<_ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
@@ -26458,7 +26458,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 # 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
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -26511,7 +26511,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 _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'`\\"
 
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index f607787..47f18ce 100644 (file)
@@ -1,12 +1,12 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
 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)
 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])
 
 AC_CONFIG_SRCDIR([courierauth.h])
 AM_CONFIG_HEADER([courier_auth_config.h])
index c29a152..5c4d63b 100644 (file)
@@ -4,7 +4,7 @@
 # distribution information.
 
 Name:           courier-authlib
 # distribution information.
 
 Name:           courier-authlib
-Version:        0.60.1
+Version:        0.60.2
 Release:        1
 
 License:        GPL
 Release:        1
 
 License:        GPL
index 86da0ce..9296533 100644 (file)
@@ -13,7 +13,7 @@
 ################################################################################
 
 Name:           courier-authlib
 ################################################################################
 
 Name:           courier-authlib
-Version:        0.60.1
+Version:        0.60.2
 Release:        1%{?dist}%{?courier_release}
 Summary:        Courier authentication library
 
 Release:        1%{?dist}%{?courier_release}
 Summary:        Courier authentication library
 
index 836cf03..921160b 100644 (file)
@@ -21,6 +21,9 @@
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* 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
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
index 339d597..3e6eafe 100755 (executable)
@@ -20203,7 +20203,8 @@ fi
 
 
 
 
 
 
-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
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
index 5d4bc22..176f10f 100644 (file)
@@ -1,8 +1,8 @@
-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
 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)
 
 AC_PREREQ(2.59)
 AC_INIT(liblock, 0.60, courier-users@lists.sourceforge.net)
@@ -80,7 +80,7 @@ fi
 
 dnl Checks for library functions.
 
 
 dnl Checks for library functions.
 
-AC_CHECK_FUNCS(setpgrp sysconf)
+AC_CHECK_FUNCS(getdtablesize setpgrp sysconf)
 AC_CHECK_FUNC(setpgrp,
        [
        AC_FUNC_SETPGRP
 AC_CHECK_FUNC(setpgrp,
        [
        AC_FUNC_SETPGRP
index 5ff83a1..0b0151a 100644 (file)
 #include       <sys/ioctl.h>
 #endif
 
 #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_)
 
 #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 *, int);
 
@@ -133,7 +111,7 @@ int i;
 
 static int start1(const char *lockfile, int fd)
 {
 
 static int start1(const char *lockfile, int fd)
 {
-int    lockfd;
+int    lockfd, maxfd;
 
 #if     HAVE_SETPGRP
 #if     SETPGRP_VOID
 
 #if     HAVE_SETPGRP
 #if     SETPGRP_VOID
@@ -168,14 +146,27 @@ int       lockfd;
                lockfd=open(lockfile, O_RDWR|O_CREAT, 0600);
        }
 
                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);
        {
                perror(lockfile);
                exit(1);
        }
 
        close(lockfd);
-       lockfd=OPEN_MAX-1;
+       lockfd=maxfd;
 
 #ifdef FD_CLOEXEC
        if (fcntl(lockfd, F_SETFD, FD_CLOEXEC) < 0)
 
 #ifdef FD_CLOEXEC
        if (fcntl(lockfd, F_SETFD, FD_CLOEXEC) < 0)