From: Andreas Gustafsson Date: Sat, 9 Jun 2001 00:53:22 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.1.3rc2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=732cd0061c066d9ae208ef71d689afb345eacd24;p=thirdparty%2Fbind9.git pullup: 705. [port] Work out resource limit type for use where rlim_t is not available. [RT #695] --- diff --git a/CHANGES b/CHANGES index 943aed02b87..81ec968382f 100644 --- 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 diff --git a/configure.in b/configure.in index 087e0d295f7..ed94b096228 100644 --- a/configure.in +++ b/configure.in @@ -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 +#include +#include +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 +#include +#include +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 +#include +#include +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? diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in index e2629c54637..0b30ffa157d 100644 --- a/lib/isc/include/isc/platform.h.in +++ b/lib/isc/include/isc/platform.h.in @@ -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 @@ -132,6 +132,11 @@ */ @ISC_PLATFORM_USETHREADS@ +/* + * Type used for resource limits. + */ +@ISC_PLATFORM_RLIMITTYPE@ + /* * Tell emacs to use C mode for this file. * diff --git a/lib/isc/unix/resource.c b/lib/isc/unix/resource.c index 0bef9b33974..fce33529b9a 100644 --- a/lib/isc/unix/resource.c +++ b/lib/isc/unix/resource.c @@ -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 @@ -23,6 +23,7 @@ #include /* Required on some systems for . */ #include +#include #include #include #include @@ -30,11 +31,7 @@ #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