ruby-changes:27725
From: nobu <ko1@a...>
Date: Sat, 16 Mar 2013 16:28:43 +0900 (JST)
Subject: [ruby-changes:27725] nobu:r39777 (trunk): mingw build fix
nobu 2013-03-16 16:28:32 +0900 (Sat, 16 Mar 2013) New Revision: 39777 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39777 Log: 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. Modified files: trunk/configure.in trunk/include/ruby/missing.h Index: include/ruby/missing.h =================================================================== --- include/ruby/missing.h (revision 39776) +++ include/ruby/missing.h (revision 39777) @@ -25,22 +25,21 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/missing.h#L25 #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 */ Index: configure.in =================================================================== --- configure.in (revision 39776) +++ configure.in (revision 39777) @@ -925,6 +925,7 @@ $POSTLINK" https://github.com/ruby/ruby/blob/trunk/configure.in#L925 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" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/