interim commit

This commit is contained in:
hyung-hwan 2008-12-21 20:29:53 +00:00
parent 2aa72ba49b
commit 277023a9c7
2 changed files with 22 additions and 7 deletions

View File

@ -39,14 +39,14 @@ typedef struct ase_btime_t ase_btime_t;
struct ase_btime_t struct ase_btime_t
{ {
int sec; int sec; /* 0-61 */
int min; /* 0 to 59 */ int min; /* 0-59 */
int hour; /* 0 to 23 */ int hour; /* 0-23 */
int mday; /* 1 to 31 */ int mday; /* 1-31 */
int mon; /* 0 to 11 */ int mon; /* 0(jan)-11(dec) */
int year; /* the number of years since 1900 */ int year; /* the number of years since 1900 */
int wday; /* 0(sunday) to 6(saturday) */ int wday; /* 0(sun)-6(sat) */
int yday; /* 0 to 365 */ int yday; /* 0(jan 1) to 365 */
int isdst; int isdst;
}; };

View File

@ -81,6 +81,21 @@ int ase_settime (ase_ntime_t t)
tv.tv_sec = t / ASE_MSEC_IN_SEC; tv.tv_sec = t / ASE_MSEC_IN_SEC;
tv.tv_usec = (t % ASE_MSEC_IN_SEC) * ASE_USEC_IN_MSEC; tv.tv_usec = (t % ASE_MSEC_IN_SEC) * ASE_USEC_IN_MSEC;
/*
#if defined CLOCK_REALTIME && HAVE_CLOCK_SETTIME
{
int r = clock_settime (CLOCK_REALTIME, ts);
if (r == 0 || errno == EPERM)
return r;
}
#elif HAVE_STIME
/* This fails to compile on OSF1 V5.1, due to stime requiring
a `long int*' and tv_sec is `int'. But that system does provide
settimeofday. */
return stime (&ts->tv_sec);
#else
*/
#ifdef SYS_settimeofday #ifdef SYS_settimeofday
n = syscall (SYS_settimeofday, &tv, ASE_NULL); n = syscall (SYS_settimeofday, &tv, ASE_NULL);
#else #else