summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 21:54:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 21:54:47 +0000
commita0006c109c518b3bd395d33d458e50808b84e87f (patch)
tree46b43e0632dd0f7a41c0099d03a48e1718cac66c
parent51e3a6b5259faa47392bea943b9c4c4109fe36cd (diff)
* configure.in: check for if struct timezone is defined.
* missing.h (struct timezone): define if not defined. * win32/win32.h (struct timezone): defined in the newer w32api. [ruby-core:27515] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--configure.in9
-rw-r--r--missing.h7
-rw-r--r--win32/win32.h6
4 files changed, 26 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6276931675..b910fc6ef7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Jan 13 06:54:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: check for if struct timezone is defined.
+
+ * missing.h (struct timezone): define if not defined.
+
+ * win32/win32.h (struct timezone): defined in the newer w32api.
+ [ruby-core:27515]
+
Tue Jan 12 23:58:27 2010 Kouhei Sutou <kou@cozmixng.org>
* lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb:
diff --git a/configure.in b/configure.in
index fe8314e0dd..1d592e3cbd 100644
--- a/configure.in
+++ b/configure.in
@@ -567,7 +567,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 \
- ucontext.h intrinsics.h)
+ ucontext.h intrinsics.h time.h)
dnl Check additional types.
AC_CHECK_SIZEOF(rlim_t, 0, [
@@ -592,6 +592,13 @@ AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_RDEV
+AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H
+@%:@ include <time.h>
+@%:@endif
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@ include <sys/time.h>
+@%:@endif])
+
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
diff --git a/missing.h b/missing.h
index 5607a0bfd5..1961383e75 100644
--- a/missing.h
+++ b/missing.h
@@ -25,6 +25,13 @@ struct timeval {
# include <sys/types.h>
#endif
+#if !defined(HAVE_STRUCT_TIMEZONE)
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+#endif
+
#ifndef RUBY_EXTERN
#define RUBY_EXTERN extern
#endif
diff --git a/win32/win32.h b/win32/win32.h
index 35fa565891..45ff3859e4 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