summaryrefslogtreecommitdiff
path: root/extra/yassl
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-02-23 22:48:15 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-02-23 22:48:15 +0200
commit338cb6a83644debcb4fae9a8bdd8880294b30383 (patch)
tree9a321f9e0de20010f1b6404c37f8f704e33711a6 /extra/yassl
parent069362205ccf28a24bc1d9f45d05cccfc1c40cac (diff)
downloadmariadb-git-338cb6a83644debcb4fae9a8bdd8880294b30383.tar.gz
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
Diffstat (limited to 'extra/yassl')
-rw-r--r--extra/yassl/include/openssl/ssl.h13
-rw-r--r--extra/yassl/include/socket_wrapper.hpp6
2 files changed, 8 insertions, 11 deletions
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
index 5bc4a053d51..14384f632e1 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -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*);
diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp
index 5ac430c2318..60c00d5e6c3 100644
--- a/extra/yassl/include/socket_wrapper.hpp
+++ b/extra/yassl/include/socket_wrapper.hpp
@@ -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 {