diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/charset2html.c | 2 | ||||
-rw-r--r-- | extra/comp_err.c | 4 | ||||
-rw-r--r-- | extra/yassl/include/lock.hpp | 2 | ||||
-rw-r--r-- | extra/yassl/include/openssl/ssl.h | 9 | ||||
-rw-r--r-- | extra/yassl/include/socket_wrapper.hpp | 8 | ||||
-rw-r--r-- | extra/yassl/include/yassl.hpp | 2 | ||||
-rw-r--r-- | extra/yassl/src/ssl.cpp | 8 | ||||
-rw-r--r-- | extra/yassl/taocrypt/src/integer.cpp | 2 | ||||
-rw-r--r-- | extra/yassl/testsuite/testsuite.cpp | 4 |
9 files changed, 27 insertions, 14 deletions
diff --git a/extra/charset2html.c b/extra/charset2html.c index 8795c82bc34..8dcfa0c8990 100644 --- a/extra/charset2html.c +++ b/extra/charset2html.c @@ -153,7 +153,9 @@ int main(int argc, char **argv) { my_init(); if (argc > argcnt && argv[argcnt][0] == '-' && argv[argcnt][1] == '#') + { DBUG_PUSH(argv[argcnt++]+2); + } if (argc > argcnt) the_set = argv[argcnt++]; diff --git a/extra/comp_err.c b/extra/comp_err.c index 00aab96454e..a2e52b73f90 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -41,7 +41,9 @@ static char *NAMEFILE= (char*) "mysqld_ername.h"; static char *STATEFILE= (char*) "sql_state.h"; static char *TXTFILE= (char*) "../sql/share/errmsg.txt"; static char *DATADIRECTORY= (char*) "../sql/share/"; +#ifndef DBUG_OFF static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace"; +#endif /* Header for errmsg.sys files */ uchar file_head[]= { 254, 254, 2, 1 }; @@ -402,6 +404,8 @@ static int parse_input_file(const char *file_name, struct errors **top_error, int rcount= 0; DBUG_ENTER("parse_input_file"); + *top_error= 0; + *top_lang= 0; if (!(file= my_fopen(file_name, O_RDONLY | O_SHARE, MYF(MY_WME)))) DBUG_RETURN(0); diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index 0525943e45d..b961ec3e478 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -28,7 +28,7 @@ namespace yaSSL { #ifdef MULTI_THREADED - #ifdef _WIN32 + #if defined(_WIN32) || defined(_WIN64) #include <windows.h> class Mutex { diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 16110c52f43..5bc4a053d51 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -33,7 +33,6 @@ #include "opensslv.h" /* for version number */ #include "rsa.h" - #define YASSL_VERSION "1.5.8" @@ -190,11 +189,17 @@ 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*); -int SSL_set_fd (SSL*, int); +int SSL_set_fd (SSL*, socket_t); int SSL_connect(SSL*); int SSL_write(SSL*, const void*, int); int SSL_read(SSL*, void*, int); diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index 308704c2af0..5ac430c2318 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -28,7 +28,7 @@ #include <assert.h> -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) #include <winsock2.h> #else #include <sys/time.h> @@ -38,16 +38,14 @@ #include <netinet/in.h> #include <arpa/inet.h> #endif +#include "openssl/ssl.h" /* for socket_t */ namespace yaSSL { typedef unsigned int uint; -#ifdef _WIN32 - typedef SOCKET socket_t; -#else - typedef int socket_t; +#if !defined( _WIN32) && !defined(_WIN64) const socket_t INVALID_SOCKET = -1; const int SD_RECEIVE = 0; const int SD_SEND = 1; diff --git a/extra/yassl/include/yassl.hpp b/extra/yassl/include/yassl.hpp index 29e0a5d94ec..b8190c484f7 100644 --- a/extra/yassl/include/yassl.hpp +++ b/extra/yassl/include/yassl.hpp @@ -28,7 +28,7 @@ namespace yaSSL { -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) typedef unsigned int SOCKET_T; #else typedef int SOCKET_T; diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 70198af79b4..c1d9ac81919 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -39,6 +39,7 @@ #include "coding.hpp" // HexDecoder #include "helpers.hpp" // for placement new hack #include <stdio.h> +#include <assert.h> #ifdef _WIN32 #include <windows.h> // FindFirstFile etc.. @@ -58,6 +59,9 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type) if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM) return SSL_BAD_FILETYPE; + if (file == NULL || !file[0]) + return SSL_BAD_FILE; + FILE* input = fopen(file, "rb"); if (!input) return SSL_BAD_FILE; @@ -229,7 +233,7 @@ void SSL_free(SSL* ssl) } -int SSL_set_fd(SSL* ssl, int fd) +int SSL_set_fd(SSL* ssl, socket_t fd) { ssl->useSocket().set_fd(fd); return SSL_SUCCESS; @@ -950,7 +954,7 @@ void ERR_print_errors_fp(FILE* /*fp*/) char* ERR_error_string(unsigned long errNumber, char* buffer) { - static char* msg = "Please supply a buffer for error string"; + static char* msg = (char*) "Please supply a buffer for error string"; if (buffer) { SetErrorString(YasslError(errNumber), buffer); diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 419783403ea..84255aa8544 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -3390,7 +3390,7 @@ void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a, CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount); SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount); if (n % WORD_BITS != 0) - r.reg_[wordCount-1] %= (1 << (n % WORD_BITS)); + r.reg_[wordCount-1] %= ((word) 1 << (n % WORD_BITS)); } else { diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 93b9b3d7026..06e75153341 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -86,8 +86,8 @@ int main(int argc, char** argv) // input output compare byte input[TaoCrypt::MD5::DIGEST_SIZE]; byte output[TaoCrypt::MD5::DIGEST_SIZE]; - file_test("input", input); - file_test("output", output); + file_test((char*) "input", input); + file_test((char*) "output", output); assert(memcmp(input, output, sizeof(input)) == 0); printf("\nAll tests passed!\n"); |