summaryrefslogtreecommitdiff
path: root/include/mysql.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-11-20 15:24:39 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-11-20 15:24:39 +0100
commita52270d7acdbe6f373f089393a96573b874eb381 (patch)
treec189279264958e6dd326a511cd50100707ca0f8e /include/mysql.h
parent4d442610524154c767f290f327832538ea1d04a4 (diff)
downloadmariadb-git-a52270d7acdbe6f373f089393a96573b874eb381.tar.gz
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)
Diffstat (limited to 'include/mysql.h')
-rw-r--r--include/mysql.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 1fc164f62b2..fa62026b44a 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -47,9 +47,6 @@ extern "C" {
#ifndef MYSQL_ABI_CHECK
#include <sys/types.h>
#endif
-#ifdef __LCC__
-#include <winsock2.h> /* For windows */
-#endif
typedef char my_bool;
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
#define __WIN__
@@ -61,11 +58,13 @@ typedef char my_bool;
#endif
#ifndef my_socket_defined
-#ifdef __WIN__
-#define my_socket SOCKET
+#if defined (_WIN64)
+#define my_socket unsigned long long
+#elif defined (_WIN32)
+#define my_socket unsigned int
#else
typedef int my_socket;
-#endif /* __WIN__ */
+#endif /* _WIN64 */
#endif /* my_socket_defined */
#endif /* _global_h */