diff options
author | Chad MILLER <chad@mysql.com> | 2009-01-21 13:45:23 -0500 |
---|---|---|
committer | Chad MILLER <chad@mysql.com> | 2009-01-21 13:45:23 -0500 |
commit | d3629d7489b759bcf3774d5ae958c8436161aa43 (patch) | |
tree | f3c1ce77afa4c0b708ac702616710c680ec86ec2 /include | |
parent | c5738c0051cfd903804afd06353f3dc431ec2726 (diff) | |
parent | 374f49b2629114a9473268da4321af405a9d2394 (diff) | |
download | mariadb-git-d3629d7489b759bcf3774d5ae958c8436161aa43.tar.gz |
Merge from Tim's 5.0.76-release tree to make 5.0.77 .
Diffstat (limited to 'include')
-rw-r--r-- | include/config-win.h | 9 | ||||
-rw-r--r-- | include/m_ctype.h | 1 | ||||
-rw-r--r-- | include/my_global.h | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/include/config-win.h b/include/config-win.h index 59c2d2706e5..ee6739293b6 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -248,6 +248,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) diff --git a/include/m_ctype.h b/include/m_ctype.h index 218ec2daadb..007edaf7740 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -445,6 +445,7 @@ my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len); uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len); my_bool my_charset_is_ascii_based(CHARSET_INFO *cs); my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs); +uint my_charset_repertoire(CHARSET_INFO *cs); #define _MY_U 01 /* Upper case */ diff --git a/include/my_global.h b/include/my_global.h index e474b620d27..845ae042a42 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -713,6 +713,9 @@ typedef SOCKET_SIZE_TYPE size_socket; #define ulonglong2double(A) ((double) (ulonglong) (A)) #define my_off_t2double(A) ((double) (my_off_t) (A)) #endif +#ifndef double2ulonglong +#define double2ulonglong(A) ((ulonglong) (double) (A)) +#endif #endif #ifndef offsetof |