diff --git a/eval.c b/eval.c index 94067fcda2..800d001cce 100644 --- a/eval.c +++ b/eval.c @@ -74,16 +74,6 @@ char *strrchr _((const char*,const char)); #endif #include -#ifdef HAVE_SYS_TIME_H -# include -#else -#ifndef NT -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; -#endif /* NT */ -#endif #include #include diff --git a/io.c b/io.c index 083c8e952c..8671edeac2 100644 --- a/io.c +++ b/io.c @@ -60,17 +60,6 @@ # define ftello ftell #endif -#ifdef HAVE_SYS_TIME_H -# include -#else -#ifndef NT -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; -#endif -#endif - #include /* EMX has sys/param.h, but.. */ diff --git a/missing.h b/missing.h index f9c9c6d0d4..44e5f86cb9 100644 --- a/missing.h +++ b/missing.h @@ -1,6 +1,7 @@ /************************************************ - missing.h - prototype for *.c in ./missing + missing.h - prototype for *.c in ./missing, and + for missing timeval struct $Author$ $Date$ @@ -11,6 +12,16 @@ #ifndef MISSING_H #define MISSING_H +#if defined(HAVE_SYS_TIME_H) +# include +#elif !defined(NT) +# define time_t long +struct timeval { + time_t tv_sec; /* seconds */ + time_t tv_usec; /* microseconds */ +}; +#endif + #ifndef HAVE_ACOSH extern double acosh _((double)); extern double asinh _((double)); diff --git a/process.c b/process.c index 9d98bc587c..2a2f9afee2 100644 --- a/process.c +++ b/process.c @@ -22,16 +22,6 @@ #endif #include -#ifndef NT -#ifdef HAVE_SYS_TIME_H -# include -#else -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; -#endif -#endif /* NT */ #include struct timeval rb_time_interval _((VALUE)); diff --git a/random.c b/random.c index 547c13a0e1..4f1f5fabe8 100644 --- a/random.c +++ b/random.c @@ -144,16 +144,6 @@ genrand_real() #include #endif #include -#ifndef NT -#ifdef HAVE_SYS_TIME_H -# include -#else -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; -#endif -#endif /* NT */ static int first = 1; diff --git a/time.c b/time.c index 01d370ed79..30b13fb674 100644 --- a/time.c +++ b/time.c @@ -12,23 +12,12 @@ #include "ruby.h" #include - #include -#ifndef NT -#ifdef HAVE_SYS_TIME_H -# include -#else -#define time_t long -struct timeval { - time_t tv_sec; /* seconds */ - time_t tv_usec; /* and microseconds */ -}; -#endif -#endif /* NT */ #ifdef HAVE_UNISTD_H #include #endif + #include VALUE rb_cTime;