diff options
| author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-20 14:06:39 +0000 |
|---|---|---|
| committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-20 14:06:39 +0000 |
| commit | 68a2dd548de277be2595d68f8bd0b6fae8ee1023 (patch) | |
| tree | 30804eb5dee8a93ef9ed56c826ea378b3fff059c | |
| parent | 9b0861fb12c766ccbf20e77908e011a882364f50 (diff) | |
merge revision(s) 39777: [Backport #8080]
mingw build fix
* configure.in: struct timeval is defined in winsock2.h on mingw.
* include/ruby/missing.h: include time.h for time_t, and sys/time.h
for timeval and timespec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | configure.in | 1 | ||||
| -rw-r--r-- | include/ruby/missing.h | 15 | ||||
| -rw-r--r-- | version.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/configure.in b/configure.in index aa15455815..91577e8e91 100644 --- a/configure.in +++ b/configure.in @@ -902,6 +902,7 @@ $POSTLINK" ac_cv_func_flock=yes ac_cv_func_gmtime_r=yes rb_cv_large_fd_select=yes + ac_cv_type_struct_timeval=yes AC_LIBOBJ([langinfo]) ], [os2-emx*], [ LIBS="-lm $LIBS" diff --git a/include/ruby/missing.h b/include/ruby/missing.h index 7ae2530239..fc333e1a47 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -25,22 +25,21 @@ extern "C" { #include RUBY_EXTCONF_H #endif +#if defined(HAVE_TIME_H) +# include <time.h> +#endif +#if defined(HAVE_SYS_TIME_H) +# include <sys/time.h> +#endif + #if !defined(HAVE_STRUCT_TIMEVAL) -# if defined(HAVE_SYS_TIME_H) -# include <sys/time.h> -# elif !defined(_WIN32) -# define time_t long struct timeval { time_t tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; -# endif #endif /* HAVE_STRUCT_TIMEVAL */ #if !defined(HAVE_STRUCT_TIMESPEC) -# if defined(HAVE_SYS_TIME_H) -# include <sys/time.h> -# endif struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-03-20" -#define RUBY_PATCHLEVEL 81 +#define RUBY_PATCHLEVEL 82 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 3 |
