Commit 338cb6a8 authored by unknown's avatar unknown
Browse files

Fixed compilations problems and warnings on windows


extra/yassl/include/openssl/ssl.h:
  Move things up to avoid problems with defines in winsock2
extra/yassl/include/socket_wrapper.hpp:
  Don't include winsock2.h twice
include/config-win.h:
  Use winsock2.h instead of winsock.h
  (winsock2.h must be included before windows.h and will automaticly include windows.h)
include/mysql.h:
  Use winsock2.h
libmysqld/examples/builder-sample/emb_samples.cpp:
  Use winsock2.h
server-tools/instance-manager/IMService.cpp:
  Use winsock2.h
sql/item_strfunc.cc:
  Remove duplicate include
sql/lex.h:
  Fixed conflict with external GROUP define
sql/net_serv.cc:
  winsock.h is already included in my_global.h
sql/sql_class.cc:
  Fixed compiler warning on windows
sql/sql_table.cc:
  Fixed compiler warning
sql/sql_yacc.yy:
  Fixed conflict with external GROUP define
sql/udf_example.c:
  Use winsock2 instead of winsock.h
win/README:
  Updated readme
parent 06936220
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -35,6 +35,12 @@

#define YASSL_VERSION "1.5.8"

#if defined(_WIN32) || defined(_WIN64)
    #include <winsock2.h>
    typedef SOCKET socket_t;
#else
    typedef int socket_t;
#endif

#if defined(__cplusplus)
extern "C" {
@@ -189,13 +195,6 @@ enum { /* ERR Constants */
    EVP_R_BAD_DECRYPT = 2
};

#if defined(_WIN32) || defined(_WIN64)
    #include <winsock2.h>
    typedef SOCKET socket_t;
#else
    typedef int socket_t;
#endif


SSL_CTX* SSL_CTX_new(SSL_METHOD*);
SSL* SSL_new(SSL_CTX*);
+2 −4
Original line number Diff line number Diff line
@@ -28,9 +28,8 @@

#include <assert.h>

#if defined(_WIN32) || defined(_WIN64)
    #include <winsock2.h>
#else 
#include "openssl/ssl.h"                        /* for socket_t */
#if !defined(_WIN32) && !defined(_WIN64)
    #include <sys/time.h>
    #include <sys/types.h>
    #include <sys/socket.h>
@@ -38,7 +37,6 @@
    #include <netinet/in.h>
    #include <arpa/inet.h>
#endif
#include "openssl/ssl.h"                        /* for socket_t */


namespace yaSSL {
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ functions */
#endif

#include <sys/locking.h>
#include <windows.h>
#include <winsock2.h>
#include <math.h>			/* Because of rint() */
#include <fcntl.h>
#include <io.h>
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ extern "C" {
#ifndef _global_h				/* If not standard header */
#include <sys/types.h>
#ifdef __LCC__
#include <winsock.h>				/* For windows */
#include <winsock2.h>				/* For windows */
#endif
typedef char my_bool;
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
#pragma hdrstop

#include "emb_samples.h"
#include <winsock.h>
#include <winsock2.h>
#include <mysql.h>
#include <stdarg.h>
#include <stdio.h>
Loading