mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug #26461: Intrinsic data type bool (1 byte) redefined to BOOL (4 bytes)
The bool data type was redefined to BOOL (4 bytes on windows). Removed the #define and fixed some of the warnings that were uncovered by this. Note that the fix also disables 2 warnings : 4800 : 'type' : forcing value to bool 'true' or 'false' (performance warning) 4805: 'operation' : unsafe mix of type 'type' and type 'type' in operation These warnings will be handled in a separate bug, as they are performance related or bogus. Fixed to int the return type of functions that return more than 2 distinct values.
This commit is contained in:
@@ -157,14 +157,12 @@ typedef uint rf_SetTimer;
|
||||
|
||||
#define Socket_defined
|
||||
#define my_socket SOCKET
|
||||
#define bool BOOL
|
||||
#define SIGPIPE SIGINT
|
||||
#define RETQSORTTYPE void
|
||||
#define QSORT_TYPE_IS_VOID
|
||||
#define RETSIGTYPE void
|
||||
#define SOCKET_SIZE_TYPE int
|
||||
#define my_socket_defined
|
||||
#define bool_defined
|
||||
#define byte_defined
|
||||
#define HUGE_PTR
|
||||
#define STDCALL __stdcall /* Used by libmysql.dll */
|
||||
@@ -457,4 +455,4 @@ inline double ulonglong2double(ulonglong value)
|
||||
#define HAVE_CHARSET_ujis 1
|
||||
#define HAVE_CHARSET_utf8 1
|
||||
#define HAVE_UCA_COLLATIONS 1
|
||||
|
||||
#define HAVE_BOOL 1
|
||||
|
@@ -980,7 +980,7 @@ typedef int myf; /* Type of MyFlags in my_funcs */
|
||||
typedef char byte; /* Smallest addressable unit */
|
||||
#endif
|
||||
typedef char my_bool; /* Small bool */
|
||||
#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
|
||||
#if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
|
||||
typedef char bool; /* Ordinary boolean values 0 1 */
|
||||
#endif
|
||||
/* Macros for converting *constants* to the right type */
|
||||
|
Reference in New Issue
Block a user