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/trunk@39777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
af24f5ff6a
commit
cab124776e
@ -925,6 +925,7 @@ $POSTLINK"
|
|||||||
ac_cv_func_flock=yes
|
ac_cv_func_flock=yes
|
||||||
ac_cv_func_gmtime_r=yes
|
ac_cv_func_gmtime_r=yes
|
||||||
rb_cv_large_fd_select=yes
|
rb_cv_large_fd_select=yes
|
||||||
|
ac_cv_type_struct_timeval=yes
|
||||||
AC_LIBOBJ([langinfo])
|
AC_LIBOBJ([langinfo])
|
||||||
],
|
],
|
||||||
[os2-emx*], [ LIBS="-lm $LIBS"
|
[os2-emx*], [ LIBS="-lm $LIBS"
|
||||||
|
@ -25,22 +25,21 @@ extern "C" {
|
|||||||
#include RUBY_EXTCONF_H
|
#include RUBY_EXTCONF_H
|
||||||
#endif
|
#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_STRUCT_TIMEVAL)
|
||||||
# if defined(HAVE_SYS_TIME_H)
|
|
||||||
# include <sys/time.h>
|
|
||||||
# elif !defined(_WIN32)
|
|
||||||
# define time_t long
|
|
||||||
struct timeval {
|
struct timeval {
|
||||||
time_t tv_sec; /* seconds */
|
time_t tv_sec; /* seconds */
|
||||||
long tv_usec; /* microseconds */
|
long tv_usec; /* microseconds */
|
||||||
};
|
};
|
||||||
# endif
|
|
||||||
#endif /* HAVE_STRUCT_TIMEVAL */
|
#endif /* HAVE_STRUCT_TIMEVAL */
|
||||||
|
|
||||||
#if !defined(HAVE_STRUCT_TIMESPEC)
|
#if !defined(HAVE_STRUCT_TIMESPEC)
|
||||||
# if defined(HAVE_SYS_TIME_H)
|
|
||||||
# include <sys/time.h>
|
|
||||||
# endif
|
|
||||||
struct timespec {
|
struct timespec {
|
||||||
time_t tv_sec; /* seconds */
|
time_t tv_sec; /* seconds */
|
||||||
long tv_nsec; /* nanoseconds */
|
long tv_nsec; /* nanoseconds */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user