2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Determine the appropriate type for resource limit, ISC_PLATFORM_RLIMITTYPE.

This commit is contained in:
Mark Andrews
2001-01-23 04:58:57 +00:00
parent 66ad1d85cb
commit 6ab3d08c12

View 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.218 $)
AC_REVISION($Revision: 1.219 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
@@ -1174,7 +1174,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?