summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-03-01 14:53:32 +0100
committerunknown <msvensson@pilot.blaudden>2007-03-01 14:53:32 +0100
commit8fa6ce58605c8215084bbb4d9de490bbcf7fa670 (patch)
tree33c5bed5605f87c9b98fa1a2b05c7fb3f1a63415 /extra
parent245b9ad4b37bc08ecfe6aea748a3251db63e7236 (diff)
parent793a137ddd737cd98d8d33efe54bcc218fd60c3f (diff)
downloadmariadb-git-8fa6ce58605c8215084bbb4d9de490bbcf7fa670.tar.gz
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint BitKeeper/etc/ignore: auto-union extra/comp_err.c: Auto merged include/my_pthread.h: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/mix2_myisam.result: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/mysqltest.test: Auto merged sql/Makefile.am: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/tztime.cc: Auto merged client/mysqltest.c: Manual merge mysql-test/mysql-test-run.pl: Manual merge sql/mysqld.cc: Manual merge
Diffstat (limited to 'extra')
-rw-r--r--extra/charset2html.c2
-rw-r--r--extra/comp_err.c4
-rw-r--r--extra/yassl/include/lock.hpp2
-rw-r--r--extra/yassl/include/openssl/ssl.h10
-rw-r--r--extra/yassl/include/socket_wrapper.hpp10
-rw-r--r--extra/yassl/include/yassl.hpp2
-rw-r--r--extra/yassl/src/ssl.cpp8
-rw-r--r--extra/yassl/taocrypt/mySTL/algorithm.hpp2
-rw-r--r--extra/yassl/taocrypt/src/integer.cpp2
-rw-r--r--extra/yassl/testsuite/testsuite.cpp4
10 files changed, 29 insertions, 17 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 28772b4c3c5..ff1d114b27d 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 };
@@ -404,6 +406,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..14384f632e1 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -33,9 +33,14 @@
#include "opensslv.h" /* for version number */
#include "rsa.h"
-
#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" {
@@ -191,10 +196,9 @@ enum { /* ERR Constants */
};
-
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..60c00d5e6c3 100644
--- a/extra/yassl/include/socket_wrapper.hpp
+++ b/extra/yassl/include/socket_wrapper.hpp
@@ -28,9 +28,8 @@
#include <assert.h>
-#ifdef _WIN32
- #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>
@@ -44,10 +43,7 @@ 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/mySTL/algorithm.hpp b/extra/yassl/taocrypt/mySTL/algorithm.hpp
index d8bc29a0bb9..f6a29cf4bdb 100644
--- a/extra/yassl/taocrypt/mySTL/algorithm.hpp
+++ b/extra/yassl/taocrypt/mySTL/algorithm.hpp
@@ -27,6 +27,8 @@
namespace mySTL {
+#undef max
+#undef min
template<typename T>
inline const T& max(const T& a, const T&b)
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");