зеркало из https://github.com/github/ruby.git
move struct timeval to missing.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9d29825355
Коммит
c7e16e94e4
10
eval.c
10
eval.c
|
@ -74,16 +74,6 @@ char *strrchr _((const char*,const char));
|
|||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
#ifndef NT
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* and microseconds */
|
||||
};
|
||||
#endif /* NT */
|
||||
#endif
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
11
io.c
11
io.c
|
@ -60,17 +60,6 @@
|
|||
# define ftello ftell
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
#ifndef NT
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* and microseconds */
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* EMX has sys/param.h, but.. */
|
||||
|
|
13
missing.h
13
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 <sys/time.h>
|
||||
#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));
|
||||
|
|
10
process.c
10
process.c
|
@ -22,16 +22,6 @@
|
|||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#ifndef NT
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* and microseconds */
|
||||
};
|
||||
#endif
|
||||
#endif /* NT */
|
||||
#include <ctype.h>
|
||||
|
||||
struct timeval rb_time_interval _((VALUE));
|
||||
|
|
10
random.c
10
random.c
|
@ -144,16 +144,6 @@ genrand_real()
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#ifndef NT
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* and microseconds */
|
||||
};
|
||||
#endif
|
||||
#endif /* NT */
|
||||
|
||||
static int first = 1;
|
||||
|
||||
|
|
13
time.c
13
time.c
|
@ -12,23 +12,12 @@
|
|||
|
||||
#include "ruby.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <time.h>
|
||||
#ifndef NT
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#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 <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
VALUE rb_cTime;
|
||||
|
|
Загрузка…
Ссылка в новой задаче