632. [port] Cope with rlim_t missing on BSD/OS systems. [RT #575]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: acconfig.h,v 1.30 2000/12/22 20:50:01 bwelling Exp $ */
|
||||
/* $Id: acconfig.h,v 1.31 2000/12/23 02:45:41 tale Exp $ */
|
||||
|
||||
/***
|
||||
*** This file is not to be included by any public header files, because
|
||||
@@ -78,6 +78,9 @@
|
||||
/* define if flockfile() is available */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
/* define if rlim_t is defined via sys/types.h or sys/resource.h */
|
||||
#undef HAVE_RLIM_T
|
||||
|
||||
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
#undef SHUTUP_SPUTAUX
|
||||
#ifdef SHUTUP_SPUTAUX
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: config.h.in,v 1.39 2000/12/22 20:50:02 bwelling Exp $ */
|
||||
/* $Id: config.h.in,v 1.40 2000/12/23 02:45:43 tale Exp $ */
|
||||
|
||||
/***
|
||||
*** This file is not to be included by any public header files, because
|
||||
@@ -89,6 +89,9 @@
|
||||
/* define if flockfile() is available */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
/* define if rlim_t is defined via sys/types.h or sys/resource.h */
|
||||
#undef HAVE_RLIM_T
|
||||
|
||||
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
#undef SHUTUP_SPUTAUX
|
||||
#ifdef SHUTUP_SPUTAUX
|
||||
|
||||
20
configure.in
20
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.201 $)
|
||||
AC_REVISION($Revision: 1.202 $)
|
||||
|
||||
AC_INIT(lib/dns/name.c)
|
||||
AC_PREREQ(2.13)
|
||||
@@ -379,8 +379,7 @@ Please install the devel/unproven-pthreads package and rerun configure.
|
||||
AC_CHECK_LIB(pthread, pthread_create,,
|
||||
AC_CHECK_LIB(pthread, __pthread_create,,
|
||||
AC_CHECK_LIB(pthread, __pthread_create_system,,
|
||||
AC_CHECK_LIB(c_r, pthread_create, [],
|
||||
use_threads=false))))
|
||||
use_threads=false)))
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -1063,7 +1062,20 @@ AC_CHECK_HEADERS(linux/capability.h)
|
||||
AC_CHECK_HEADERS(linux/prctl.h)
|
||||
|
||||
#
|
||||
# Random remaining OS-specific issues.
|
||||
# BSD/OS, and perhaps some others, don't define rlim_t.
|
||||
#
|
||||
AC_MSG_CHECKING(for type rlim_t)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>],
|
||||
[rlim_t rl = 19671212; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_RLIM_T)],
|
||||
[AC_MSG_RESULT(no)])
|
||||
|
||||
#
|
||||
# Random remaining OS-specific issues involving compiler warnings.
|
||||
# XXXDCL print messages to indicate some compensation is being done?
|
||||
#
|
||||
AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resource.c,v 1.5 2000/11/28 21:40:52 gson Exp $ */
|
||||
/* $Id: resource.c,v 1.6 2000/12/23 02:45:44 tale Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h> /* Required on some systems for <sys/resource.h>. */
|
||||
@@ -27,6 +29,14 @@
|
||||
|
||||
#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;
|
||||
#endif
|
||||
|
||||
static isc_result_t
|
||||
resource2rlim(isc_resource_t resource, int *rlim_resource) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user