From 675702d121650be7ff428922b0d42b3c70ee6308 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 14 Jun 2006 14:10:39 +0000 Subject: * configure.in: check sizeof(rlim_t). check setrlimit. * process.c (proc_getrlimit): new method Process.getrlimit. (proc_setrlimit): new method Process.setrlimit. * ruby.h (NUM2ULL): new macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 1ceacbb5c5..1c7e7bcace 100644 --- a/configure.in +++ b/configure.in @@ -373,7 +373,10 @@ os2-emx*) LIBS="-lm $LIBS" msdosdjgpp*) LIBS="-lm $LIBS" ac_cv_func_getpgrp_void=yes ac_cv_func_setitimer=no + ac_cv_sizeof_rlim_t=4 ;; +bsdi*) LIBS="-lm $LIBS" + ac_cv_sizeof_rlim_t=8;; freebsd*) LIBS="-lm $LIBS" AC_CACHE_CHECK([whether -lxpg4 has to be linked], rb_cv_lib_xpg4_needed, @@ -439,6 +442,23 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h sys/ sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ ucontext.h intrinsics.h) +dnl Check additional types. +AC_CHECK_SIZEOF(rlim_t, 0, [ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include +]) + dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T AC_STRUCT_ST_BLKSIZE @@ -460,7 +480,8 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\ readlink setitimer setruid seteuid setreuid setresuid\ setproctitle setrgid setegid setregid setresgid issetugid pause\ lchown lchmod getpgrp setpgrp getpgid setpgid initgroups\ - getgroups setgroups getpriority getrlimit dlopen sigprocmask\ + getgroups setgroups getpriority getrlimit setrlimit\ + dlopen sigprocmask\ sigaction _setjmp setsid telldir seekdir fchmod mktime timegm\ cosh sinh tanh setuid setgid setenv unsetenv) AC_ARG_ENABLE(setreuid, -- cgit v1.2.3