diff options
author | marha <marha@users.sourceforge.net> | 2011-07-18 10:33:05 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-18 10:33:05 +0200 |
commit | 88101146f2ec7d53ffb793e365f05097ffd35fd3 (patch) | |
tree | db77eef572a00c62c8d9485c4786f682e20a2fd0 /pthreads/ptw32_timespec.c | |
parent | 772373ccc8da2b2019555228f4972cc0c5a885a4 (diff) | |
download | vcxsrv-88101146f2ec7d53ffb793e365f05097ffd35fd3.tar.gz vcxsrv-88101146f2ec7d53ffb793e365f05097ffd35fd3.tar.bz2 vcxsrv-88101146f2ec7d53ffb793e365f05097ffd35fd3.zip |
cvs version of pthreads
Diffstat (limited to 'pthreads/ptw32_timespec.c')
-rw-r--r-- | pthreads/ptw32_timespec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pthreads/ptw32_timespec.c b/pthreads/ptw32_timespec.c index 6a2cb565a..6318957a8 100644 --- a/pthreads/ptw32_timespec.c +++ b/pthreads/ptw32_timespec.c @@ -39,13 +39,13 @@ #include "implement.h" -#ifdef NEED_FTIME +#if defined(NEED_FTIME) /* * time between jan 1, 1601 and jan 1, 1970 in units of 100 nanoseconds */ #define PTW32_TIMESPEC_TO_FILETIME_OFFSET \ - ( ((LONGLONG) 27111902 << 32) + (LONGLONG) 3577643008 ) + ( ((int64_t) 27111902 << 32) + (int64_t) 3577643008 ) INLINE void ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) @@ -58,7 +58,7 @@ ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) * ------------------------------------------------------------------- */ { - *(LONGLONG *) ft = ts->tv_sec * 10000000 + *(int64_t *) ft = ts->tv_sec * 10000000 + (ts->tv_nsec + 50) / 100 + PTW32_TIMESPEC_TO_FILETIME_OFFSET; } @@ -74,10 +74,10 @@ ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) */ { ts->tv_sec = - (int) ((*(LONGLONG *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000); + (int) ((*(int64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000); ts->tv_nsec = - (int) ((*(LONGLONG *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - - ((LONGLONG) ts->tv_sec * (LONGLONG) 10000000)) * 100); + (int) ((*(int64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - + ((int64_t) ts->tv_sec * (int64_t) 10000000)) * 100); } #endif /* NEED_FTIME */ |