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 /sql/item.h | |
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 'sql/item.h')
-rw-r--r-- | sql/item.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index d45df4ebe53..866b3fcb4fc 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1786,7 +1786,7 @@ public: Item_datetime() :Item_int(0) { unsigned_flag=0; } int save_in_field(Field *field, bool no_conversions); longlong val_int(); - double val_real() { return val_int(); } + double val_real() { return (double)val_int(); } void set(longlong packed); }; |