enhanced qse_timegm() further

This commit is contained in:
2009-06-07 23:03:44 +00:00
parent 08c1d422f3
commit 3ac15453b1
12 changed files with 101 additions and 55 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: syscall.h 97 2009-03-10 10:39:18Z hyunghwan.chung $
* $Id: syscall.h 187 2009-06-07 05:03:44Z hyunghwan.chung $
*
Copyright 2006-2009 Chung, Hyung-Hwan.
@ -36,6 +36,12 @@
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
#ifdef HAVE_TIME_H
# include <time.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#if defined(QSE_USE_SYSCALL) && defined(HAVE_SYS_SYSCALL_H)
# include <sys/syscall.h>
@ -189,4 +195,17 @@
# define QSE_cHROOT(path) chroot(path)
#endif
#ifdef SYS_gettimeofday
# define QSE_GETTIMEOFDAY(tv,tz) syscall(SYS_gettimeofday, tv, tz)
#else
# define QSE_GETTIMEOFDAY(tv,tz) gettimeofday(tv,tz)
#endif
#ifdef SYS_settimeofday
# define QSE_SETTIMEOFDAY(tv,tz) syscall(SYS_settimeofday, tv, tz)
#else
# define QSE_SETTIMEOFDAY(tv,tz) settimeofday(tv,tz)
#endif
#endif