cleaned up the code a little

This commit is contained in:
2009-01-18 01:48:21 +00:00
parent 81cf4a462b
commit 524f2e34c9
15 changed files with 62 additions and 101 deletions

View File

@ -20,16 +20,13 @@
#include "mem.h"
#ifdef _WIN32
#include <windows.h>
# include <windows.h>
#else
#include <sys/time.h>
# include "syscall.h"
# include <sys/time.h>
#endif
#include <time.h>
#if defined(QSE_USE_SYSCALL) && defined(HAVE_SYS_SYSCALL_H)
#include <sys/syscall.h>
#endif
#ifdef _WIN32
#define WIN_EPOCH_YEAR (1601)
#define WIN_EPOCH_MON (1)
@ -265,6 +262,7 @@ int qse_timegm (const qse_btime_t* bt, qse_ntime_t* nt)
#ifdef HAVE_TIMEGM
*nt = ((qse_ntime_t)timegm(&tm)*QSE_MSECS_PER_SEC) + bt->msec;
return 0;
#else
#warning #### timegm() is not available on this platform ####
return -1;
@ -290,6 +288,7 @@ int qse_timelocal (const qse_btime_t* bt, qse_ntime_t* nt)
#ifdef HAVE_TIMELOCAL
*nt = ((qse_ntime_t)timelocal(&tm)*QSE_MSECS_PER_SEC) + bt->msec;
return 0;
#else
#warning #### timelocal() is not available on this platform ####
return -1;