[Commits] Rev 3576: MDEV-3868 : windows client compilation issues in file:///H:/bzr/5.5/

Vladislav Vaintroub wlad at montyprogram.com
Tue Nov 20 16:24:53 EET 2012


At file:///H:/bzr/5.5/

------------------------------------------------------------
revno: 3576
revision-id: wlad at montyprogram.com-20121120142439-zvx42vxhc8lurmnv
parent: igor at askmonty.org-20121120032927-ywvi9sj18yqpgx62
committer: Vladislav Vaintroub <wlad at montyprogram.com>
branch nick: 5.5
timestamp: Tue 2012-11-20 15:24:39 +0100
message:
  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)
-------------- next part --------------
=== modified file 'include/mysql.h'
--- a/include/mysql.h	2012-10-12 08:54:46 +0000
+++ b/include/mysql.h	2012-11-20 14:24:39 +0000
@@ -47,9 +47,6 @@
 #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 @@
 #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 */
 

=== modified file 'include/mysql_com.h'
--- a/include/mysql_com.h	2012-03-26 10:33:49 +0000
+++ b/include/mysql_com.h	2012-11-20 14:24:39 +0000
@@ -57,9 +57,6 @@
 #define LOCAL_HOST	"localhost"
 #define LOCAL_HOST_NAMEDPIPE "."
 
-#ifdef _WIN32
-#include <ws2tcpip.h>
-#endif
 
 #if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
 #define MYSQL_NAMEDPIPE "MySQL"



More information about the commits mailing list