]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Sat, 9 Jun 2001 00:53:22 +0000 (00:53 +0000)
committerAndreas Gustafsson <source@isc.org>
Sat, 9 Jun 2001 00:53:22 +0000 (00:53 +0000)
705.   [port]          Work out resource limit type for use where rlim_t is
                       not available. [RT #695]

CHANGES
configure.in
lib/isc/include/isc/platform.h.in
lib/isc/unix/resource.c

diff --git a/CHANGES b/CHANGES
index 943aed02b87da5ae609475264d7c861f931934a2..81ec968382fdd995edb3e5c7179349a21d909ae4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,4 @@
+
  894.  [bug]           When using the DNSSEC tools, a message intended to warn
                        when the keyboard was being used because of the lack
                        of a suitable random device was not being printed.
@@ -23,6 +24,9 @@
                        split on a bitstring label somewhere other than in
                        the last label of the node. [RT #1351]
 
+ 705.  [port]          Work out resource limit type for use where rlim_t is
+                       not available. [RT #695]
+
        --- 9.1.3rc1 released ---
 
  831.  [bug]           The configure script tried to determine
index 087e0d295f7ed2982cdfbd55785a0b554ed56a49..ed94b096228d046b19f08a4412c3bb604cc559fd 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.205.2.7 $)
+AC_REVISION($Revision: 1.205.2.8 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.13)
@@ -1119,7 +1119,35 @@ AC_TRY_COMPILE([
        [AC_MSG_RESULT(yes)
          AC_DEFINE(HAVE_RLIM_T)],
         [AC_MSG_RESULT(no)])
-
+AC_MSG_CHECKING(sizeof rlim_cur)
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
+[AC_MSG_RESULT(int)
+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
+[
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
+[AC_MSG_RESULT(long int)
+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
+[
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
+[AC_MSG_RESULT(long long int)
+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
+[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
+],[])
+],[])
+],[])
+AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
 #
 # Random remaining OS-specific issues involving compiler warnings.
 # XXXDCL print messages to indicate some compensation is being done?
index e2629c54637bf3e0f79ac2532fd02f6915d9bdde..0b30ffa157dce021cf316ff9ae78b28dc5accf7d 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: platform.h.in,v 1.16.4.2 2001/02/21 00:15:15 gson Exp $ */
+/* $Id: platform.h.in,v 1.16.4.3 2001/06/09 00:53:22 gson Exp $ */
 
 #ifndef ISC_PLATFORM_H
 #define ISC_PLATFORM_H 1
  */
 @ISC_PLATFORM_USETHREADS@
 
+/*
+ * Type used for resource limits.
+ */
+@ISC_PLATFORM_RLIMITTYPE@
+
 /*
  * Tell emacs to use C mode for this file.
  *
index 0bef9b33974248589ff75e9e68c9bfac9c10e17a..fce33529b9a42d38ace6cab0b9e2c92131daf75b 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resource.c,v 1.6.2.1 2001/01/09 22:51:23 bwelling Exp $ */
+/* $Id: resource.c,v 1.6.2.2 2001/06/09 00:53:21 gson Exp $ */
 
 #include <config.h>
 
@@ -23,6 +23,7 @@
 #include <sys/time.h>  /* Required on some systems for <sys/resource.h>. */
 #include <sys/resource.h>
 
+#include <isc/platform.h>
 #include <isc/resource.h>
 #include <isc/result.h>
 #include <isc/util.h>
 #include "errno2result.h"
 
 #ifndef HAVE_RLIM_T
-/*
- * quad_t is right for BSD/OS, the only system for which the lack of rlim_t
- * has been observed so far.
- */
-typedef quad_t rlim_t;
+typedef ISC_PLATFORM_RLIMITTYPE rlim_t;
 #endif
 
 static isc_result_t