00001 #ifndef RUBY_TIMEV_H
00002 #define RUBY_TIMEV_H
00003
00004 struct vtm {
00005 VALUE year;
00006 int mon;
00007 int mday;
00008 int hour;
00009 int min;
00010 int sec;
00011 VALUE subsecx;
00012 VALUE utc_offset;
00013 int wday;
00014 int yday;
00015 int isdst;
00016 const char *zone;
00017 };
00018
00019 #define TIME_SCALE 1000000000
00020
00021 #ifndef TYPEOF_TIMEVAL_TV_SEC
00022 # define TYPEOF_TIMEVAL_TV_SEC time_t
00023 #endif
00024 #ifndef TYPEOF_TIMEVAL_TV_USEC
00025 # if INT_MAX >= 1000000
00026 # define TYPEOF_TIMEVAL_TV_USEC int
00027 # else
00028 # define TYPEOF_TIMEVAL_TV_USEC long
00029 # endif
00030 #endif
00031
00032 #if SIZEOF_TIME_T == SIZEOF_LONG
00033 typedef unsigned long unsigned_time_t;
00034 #elif SIZEOF_TIME_T == SIZEOF_INT
00035 typedef unsigned int unsigned_time_t;
00036 #elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
00037 typedef unsigned LONG_LONG unsigned_time_t;
00038 #else
00039 # error cannot find integer type which size is same as time_t.
00040 #endif
00041
00042 #endif
00043