summaryrefslogtreecommitdiff
path: root/include/ruby
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
commit23a4f81625f2d950f8045145f22d2680b0d96b02 (patch)
tree781c390ad6f5db63508850c236cdee1e7e29f7c9 /include/ruby
parent12d782749fb6627750b4e6df69fdf3466857c709 (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/trunk@26311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/missing.h7
-rw-r--r--include/ruby/win32.h6
2 files changed, 9 insertions, 4 deletions
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index d553f1c738e..4a900326323 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -38,6 +38,13 @@ struct timespec {
};
#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/include/ruby/win32.h b/include/ruby/win32.h
index 5f0501aa55f..aa8b2c26ce4 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -197,11 +197,9 @@ extern int rb_w32_fstat(int, struct stat *);
#define strncasecmp _strnicmp
#define fsync _commit
+struct timezone;
+
#ifdef __MINGW32__
-struct timezone {
- int tz_minuteswest;
- int tz_dsttime;
-};
#undef isascii
#define isascii __isascii
#endif