Commit aabbd2fb authored by ramil/ram@mysql.com/ramil.myoffice.izhnet.ru's avatar ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
Browse files

Fix for bug #29079: Semantics of "bigint" depend on platform specifics (size, signedness of char ?)

Problem: long and long long types mess in a comparison may lead to wrong results on some platforms.
Fix: prefer [unsigned] long long as [u]longlong as it's used unconditionally in many places.
parent caebb719
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -828,7 +828,12 @@ error "Neither int or long is of 4 bytes width"
typedef unsigned long	ulong;		  /* Short for unsigned long */
#endif
#ifndef longlong_defined
#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8
/* 
  Using [unsigned] long long is preferable as [u]longlong because we use 
  [unsigned] long long unconditionally in many places, 
  for example in constants with [U]LL suffix.
*/
#if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8
typedef unsigned long long int ulonglong; /* ulong or unsigned long long */
typedef long long int	longlong;
#else