diff options
author | Alexey Kopytov <alexeyk@mysql.com> | 2008-12-07 17:51:22 +0300 |
---|---|---|
committer | Alexey Kopytov <alexeyk@mysql.com> | 2008-12-07 17:51:22 +0300 |
commit | 6aa4125be3ff8d910fff82ff53ace4075a39cc94 (patch) | |
tree | 82715ba21e2d49dfb58b215e7cc5d9af0294a0b6 /include/config-win.h | |
parent | 014143e8588c4313ccf10e269aa34a997f5772b6 (diff) | |
parent | 91f0c94c23eb9b48421d9590662666de9e4c75d5 (diff) | |
download | mariadb-git-6aa4125be3ff8d910fff82ff53ace4075a39cc94.tar.gz |
Merge from mysql-5.0-bugteam to mysql-5.1-bugteam.
Diffstat (limited to 'include/config-win.h')
-rw-r--r-- | include/config-win.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/config-win.h b/include/config-win.h index cc2b2767663..15c107597d1 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -250,6 +250,15 @@ inline double ulonglong2double(ulonglong value) #define my_off_t2double(A) ulonglong2double(A) #endif /* _WIN64 */ +inline ulonglong double2ulonglong(double d) +{ + double t= d - (double) 0x8000000000000000ULL; + + if (t >= 0) + return ((ulonglong) t) + 0x8000000000000000ULL; + return (ulonglong) d; +} + #if SIZEOF_OFF_T > 4 #define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C)) #define tell(A) _telli64(A) |