diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.in | 36 |
2 files changed, 34 insertions, 6 deletions
@@ -1,3 +1,7 @@ +Mon Nov 15 18:58:05 2004 Tanaka Akira <akr@m17n.org> + + * configure.in: check rlim_t more portably. [ruby-core:3735] + Mon Nov 15 11:50:32 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * misc/ruby-mode.el (ruby-special-char-p, ruby-parse-partial): handle diff --git a/configure.in b/configure.in index 3dfe9e79db..30444e6765 100644 --- a/configure.in +++ b/configure.in @@ -205,12 +205,6 @@ AC_CHECK_SIZEOF(float, 4) AC_CHECK_SIZEOF(double, 8) AC_CHECK_SIZEOF(time_t, 0) -AC_CHECK_TYPE(rlim_t, [AC_DEFINE(HAVE_RLIM_T)], [], [#include <sys/resource.h>]) -AC_CHECK_SIZEOF(rlim_t, 0, [ - #include <stdio.h> - #include <sys/resource.h> -]) - AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes, [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);], rb_cv_have_prototypes=yes, @@ -388,6 +382,36 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\ sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ ucontext.h intrinsics.h unwind.h) +dnl Check additional types. +AC_CHECK_TYPE(rlim_t, [AC_DEFINE(HAVE_RLIM_T)], [], [ + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #ifdef HAVE_SYS_TIME_H + # include <sys/time.h> + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include <sys/resource.h> + #endif + #ifdef HAVE_UNISTD_H + # include <unistd.h> + #endif +]) +AC_CHECK_SIZEOF(rlim_t, 0, [ + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #ifdef HAVE_SYS_TIME_H + # include <sys/time.h> + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include <sys/resource.h> + #endif + #ifdef HAVE_UNISTD_H + # include <unistd.h> + #endif +]) + dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_UID_T AC_TYPE_SIZE_T |