From 654a463bc6636f2b61fdd9ef81db10a25807d176 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Sun, 12 Sep 2010 17:03:43 -0300 Subject: [PATCH] Fix #3666 backporting the needed changes from r26311 --- configure.in | 9 ++++++++- missing.h | 7 +++++++ win32/win32.h | 6 ++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index d7ed21e..f1e69f9 100644 --- a/configure.in +++ b/configure.in @@ -522,7 +522,7 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h sys/ fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \ sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ - ucontext.h intrinsics.h) + ucontext.h intrinsics.h time.h) dnl Check additional types. AC_CHECK_SIZEOF(rlim_t, 0, [ @@ -547,6 +547,13 @@ AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_BLOCKS AC_STRUCT_ST_RDEV +AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H +@%:@ include +@%:@endif +@%:@ifdef HAVE_SYS_TIME_H +@%:@ include +@%:@endif]) + dnl RUBY_DEFINT TYPENAME, SIZE, [SIGNED-OR-UNSIGNED], [INCLUDES = DEFAULT-INCLUDES] AC_DEFUN([RUBY_DEFINT], [dnl AC_CACHE_CHECK([for $1], [rb_cv_type_$1], diff --git a/missing.h b/missing.h index 6eda516..f2f5202 100644 --- a/missing.h +++ b/missing.h @@ -25,6 +25,13 @@ struct timeval { # include #endif +#if !defined(HAVE_STRUCT_TIMEZONE) +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +#endif + #ifndef HAVE_ACOSH extern double acosh _((double)); extern double asinh _((double)); diff --git a/win32/win32.h b/win32/win32.h index 4e46af0..dd64a63 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -150,11 +150,9 @@ extern DWORD rb_w32_osid(void); #undef unlink #define unlink(p) rb_w32_unlink(p) +struct timezone; + #ifdef __MINGW32__ -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; #undef isascii #define isascii __isascii #endif -- 1.7.2.3