diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-03-24 12:30:03 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-03-24 12:30:03 +0100 |
commit | 8250ceced6aab95347e00e2ff1c02730da0be4fe (patch) | |
tree | a9c92cf8c685457bf79b580ab6109e6331e8c300 /mysys/my_getsystime.c | |
parent | a85ccfedcf91f7ad2c578ec60e69d127f199d079 (diff) | |
download | mariadb-git-8250ceced6aab95347e00e2ff1c02730da0be4fe.tar.gz |
Fix compilation on Windows:
- Fixes for type-conversion
(time_t is not interchangeable with my_time_t on Windows as time_t s 64 bit while my_time_t is long)
- BIGENDIAN-> ARCH_BIGENDIAN .
BIGENDIAN constant is defined in winsock2.h (as 0)
- added explicit cast for longlong->double conversion in sql/item.h (fixed many warnings)
Also, HAVE_SNPRINTF is now defined and snprintf is defined to _snprintf in config-win.h
Diffstat (limited to 'mysys/my_getsystime.c')
-rw-r--r-- | mysys/my_getsystime.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index b467c49c6e6..827c65aef2b 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -108,7 +108,10 @@ void my_diff_and_hrtime(my_timediff_t *interval, my_hrtime_t *timestamp) { interval->val= my_getsystime() / 10; #if defined(__WIN__) || defined(HAVE_GETHRTIME) - timestamp->val= my_hrtime(); + { + my_hrtime_t t= my_hrtime(); + timestamp->val= t.val; + } #else timestamp->val= interval->val; #endif |