mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-3868 : windows client compilation issues
Avoid inclusion of Windows headers via client API headers, since it traditionally lead to different subtle compilation problems. Instead define my_socket in a way that is compatible with SOCKET (unsigned int in 32 bit , unsigned longlong in 64 bit)
This commit is contained in:
@ -47,9 +47,6 @@ extern "C" {
|
|||||||
#ifndef MYSQL_ABI_CHECK
|
#ifndef MYSQL_ABI_CHECK
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __LCC__
|
|
||||||
#include <winsock2.h> /* For windows */
|
|
||||||
#endif
|
|
||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
|
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
|
||||||
#define __WIN__
|
#define __WIN__
|
||||||
@ -61,11 +58,13 @@ typedef char my_bool;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef my_socket_defined
|
#ifndef my_socket_defined
|
||||||
#ifdef __WIN__
|
#if defined (_WIN64)
|
||||||
#define my_socket SOCKET
|
#define my_socket unsigned long long
|
||||||
|
#elif defined (_WIN32)
|
||||||
|
#define my_socket unsigned int
|
||||||
#else
|
#else
|
||||||
typedef int my_socket;
|
typedef int my_socket;
|
||||||
#endif /* __WIN__ */
|
#endif /* _WIN64 */
|
||||||
#endif /* my_socket_defined */
|
#endif /* my_socket_defined */
|
||||||
#endif /* _global_h */
|
#endif /* _global_h */
|
||||||
|
|
||||||
|
@ -57,9 +57,6 @@
|
|||||||
#define LOCAL_HOST "localhost"
|
#define LOCAL_HOST "localhost"
|
||||||
#define LOCAL_HOST_NAMEDPIPE "."
|
#define LOCAL_HOST_NAMEDPIPE "."
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <ws2tcpip.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
|
#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
|
||||||
#define MYSQL_NAMEDPIPE "MySQL"
|
#define MYSQL_NAMEDPIPE "MySQL"
|
||||||
|
Reference in New Issue
Block a user