summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VC++Files/libmysql/libmysql.dsp4
-rw-r--r--VC++Files/libmysqld/libmysqld.dsp4
-rw-r--r--VC++Files/mysys/mysys.dsp4
-rw-r--r--extra/yassl/include/openssl/ssl.h10
-rw-r--r--extra/yassl/include/yassl_error.hpp2
-rw-r--r--extra/yassl/include/yassl_types.hpp6
-rw-r--r--extra/yassl/mySTL/helpers.hpp14
-rw-r--r--extra/yassl/mySTL/list.hpp7
-rw-r--r--extra/yassl/src/dummy.cpp4
-rw-r--r--extra/yassl/taocrypt/include/asn.hpp4
-rw-r--r--extra/yassl/taocrypt/include/misc.hpp6
-rw-r--r--include/my_global.h2
-rw-r--r--mysys/default_modify.c2
-rw-r--r--ndb/src/cw/cpcd/Process.cpp5
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.cpp12
-rw-r--r--sql/des_key_file.cc2
-rw-r--r--vio/Makefile.am8
17 files changed, 71 insertions, 25 deletions
diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp
index b94aaf07bed..1db5ed538a4 100644
--- a/VC++Files/libmysql/libmysql.dsp
+++ b/VC++Files/libmysql/libmysql.dsp
@@ -219,6 +219,10 @@ SOURCE=..\mysys\default.c
# End Source File
# Begin Source File
+SOURCE=..\mysys\default_modify.c
+# End Source File
+# Begin Source File
+
SOURCE=.\dll.c
# End Source File
# Begin Source File
diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp
index c5c40b07dfd..a82538c91dd 100644
--- a/VC++Files/libmysqld/libmysqld.dsp
+++ b/VC++Files/libmysqld/libmysqld.dsp
@@ -180,6 +180,10 @@ SOURCE=..\mysys\default.c
# End Source File
# Begin Source File
+SOURCE=..\mysys\default_modify.c
+# End Source File
+# Begin Source File
+
SOURCE=..\sql\derror.cpp
# End Source File
# Begin Source File
diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp
index 428f75d0045..ab5077810b2 100644
--- a/VC++Files/mysys/mysys.dsp
+++ b/VC++Files/mysys/mysys.dsp
@@ -209,6 +209,10 @@ SOURCE=.\default.c
# End Source File
# Begin Source File
+SOURCE=.\default_modify.c
+# End Source File
+# Begin Source File
+
SOURCE=.\errors.c
# End Source File
# Begin Source File
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
index 361918846fc..85f0771ca85 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -149,7 +149,7 @@ enum { /* X509 Constants */
X509_V_ERR_CRL_SIGNATURE_FAILURE = 10,
X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 11,
X509_V_ERR_CRL_HAS_EXPIRED = 12,
- X509_V_ERR_CERT_REVOKED = 13,
+ X509_V_ERR_CERT_REVOKED = 13
};
@@ -166,7 +166,7 @@ int ERR_GET_REASON(int);
enum { /* ERR Constants */
ERR_TXT_STRING = 1,
- EVP_R_BAD_DECRYPT = 2,
+ EVP_R_BAD_DECRYPT = 2
};
@@ -263,8 +263,8 @@ enum { /* ssl Constants */
SSL_UNKNOWN = -2,
SSL_FATAL_ERROR = -1,
SSL_NORMAL_SHUTDOWN = 0,
- SSL_ERROR_NONE = 0, // for most functions
- SSL_FAILURE = 0, // for some functions
+ SSL_ERROR_NONE = 0, /* for most functions */
+ SSL_FAILURE = 0, /* for some functions */
SSL_SUCCESS = 1,
SSL_FILETYPE_ASN1 = 10,
@@ -320,7 +320,7 @@ enum { /* ssl Constants */
SSL_ST_ACCEPT = 94,
SSL_CB_ALERT = 95,
SSL_CB_READ = 96,
- SSL_CB_HANDSHAKE_DONE = 97,
+ SSL_CB_HANDSHAKE_DONE = 97
};
diff --git a/extra/yassl/include/yassl_error.hpp b/extra/yassl/include/yassl_error.hpp
index 4165eb24b66..0b06a37a635 100644
--- a/extra/yassl/include/yassl_error.hpp
+++ b/extra/yassl/include/yassl_error.hpp
@@ -51,7 +51,7 @@ enum YasslError {
verify_error = 112,
send_error = 113,
receive_error = 114,
- certificate_error = 115,
+ certificate_error = 115
// 1000+ from TaoCrypt error.hpp
diff --git a/extra/yassl/include/yassl_types.hpp b/extra/yassl/include/yassl_types.hpp
index 70888f35c81..1ad4998bade 100644
--- a/extra/yassl/include/yassl_types.hpp
+++ b/extra/yassl/include/yassl_types.hpp
@@ -27,7 +27,7 @@
#ifndef yaSSL_TYPES_HPP
#define yaSSL_TYPES_HPP
-#include<cstddef>
+#include <stddef.h>
namespace yaSSL {
@@ -129,7 +129,7 @@ enum PublicValueEncoding { implicit_encoding, explicit_encoding };
enum ConnectionEnd { server_end, client_end };
-enum AlertLevel { warning = 1, fatal = 2, };
+enum AlertLevel { warning = 1, fatal = 2 };
@@ -381,7 +381,7 @@ const char* const cipher_names[128] =
"DES-CBC3-RMD", // TLS_RSA_WITH_3DES_EDE_CBC_RMD160 = 124
"AES128-RMD", // TLS_RSA_WITH_AES_128_CBC_RMD160 = 125
"AES256-RMD", // TLS_RSA_WITH_AES_256_CBC_RMD160 = 126
- null_str, // 127
+ null_str // 127
};
// fill with MD5 pad size since biggest required
diff --git a/extra/yassl/mySTL/helpers.hpp b/extra/yassl/mySTL/helpers.hpp
index 10f120e914b..779389e322a 100644
--- a/extra/yassl/mySTL/helpers.hpp
+++ b/extra/yassl/mySTL/helpers.hpp
@@ -30,13 +30,25 @@
#include <stdlib.h>
+#ifdef __IBMCPP__
+/*
+ Workaround for the lack of operator new(size_t, void*)
+ in IBM VA C++ 6.0
+*/
+struct Dummy {};
+inline void *operator new(size_t size, Dummy *d) { return (void*) d; }
+typedef Dummy *yassl_pointer;
+#else
+typedef void *yassl_pointer;
+#endif
+
namespace mySTL {
template <typename T, typename T2>
inline void construct(T* p, const T2& value)
{
- new (static_cast<void*>(p)) T(value);
+ new ((yassl_pointer) p) T(value);
}
diff --git a/extra/yassl/mySTL/list.hpp b/extra/yassl/mySTL/list.hpp
index 5bbec6ab7c6..be149b1a984 100644
--- a/extra/yassl/mySTL/list.hpp
+++ b/extra/yassl/mySTL/list.hpp
@@ -38,6 +38,13 @@ namespace mySTL {
template<typename T>
class list {
+#ifdef __SUNPRO_CC
+/*
+ Sun Forte 7 C++ v. 5.4 needs class 'node' be public to be visible to
+ the nested class 'iterator' (a non-standard behaviour).
+*/
+public:
+#endif
struct node {
node(T t) : prev_(0), next_(0), value_(t) {}
diff --git a/extra/yassl/src/dummy.cpp b/extra/yassl/src/dummy.cpp
new file mode 100644
index 00000000000..19b7fe887cd
--- /dev/null
+++ b/extra/yassl/src/dummy.cpp
@@ -0,0 +1,4 @@
+/*
+ To make libtool always use a C++ linker when compiling with yaSSL we need
+ to add a dummy C++ file to the source list.
+*/
diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp
index 71633339a40..974bbf4c86f 100644
--- a/extra/yassl/taocrypt/include/asn.hpp
+++ b/extra/yassl/taocrypt/include/asn.hpp
@@ -79,7 +79,7 @@ enum ASNIdFlag
enum DNTags
{
- COMMON_NAME = 0x03,
+ COMMON_NAME = 0x03
};
@@ -92,7 +92,7 @@ enum Constants
MAX_SEQ_SZ = 5, // enum(seq|con) + length(4)
MAX_ALGO_SIZE = 9,
MAX_DIGEST_SZ = 25, // SHA + enum(Bit or Octet) + length(4)
- DSA_SIG_SZ = 40,
+ DSA_SIG_SZ = 40
};
diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp
index b9cc9a6fe71..b5b0a4575fc 100644
--- a/extra/yassl/taocrypt/include/misc.hpp
+++ b/extra/yassl/taocrypt/include/misc.hpp
@@ -59,7 +59,7 @@ typedef unsigned char byte;
typedef unsigned short word16;
typedef unsigned int word32;
-#if defined(__GNUC__) || defined(__MWERKS__)
+#if defined(__GNUC__) || defined(__MWERKS__) || defined(_LONGLONG_TYPE)
#define WORD64_AVAILABLE
typedef unsigned long long word64;
#define W64LIT(x) x##LL
@@ -79,8 +79,10 @@ typedef unsigned int word32;
typedef word32 lword;
#endif
+// FIXME the !defined(__sun) is a temporarely solution until asm for
+// __x86_64__ and Solaris is written
#if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || \
- defined(__x86_64__) || defined(__mips64)
+ defined(__mips64) || (defined(__x86_64__) && !defined(__sun))
// These platforms have 64-bit CPU registers. Unfortunately most C++ compilers
// don't allow any way to access the 64-bit by 64-bit multiply instruction
// without using assembly, so in order to use word64 as word, the assembly
diff --git a/include/my_global.h b/include/my_global.h
index 068832e927d..75a99133e33 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -44,7 +44,7 @@
#endif /* __CYGWIN__ */
/* Determine when to use "#pragma interface" */
-#if !defined(__CYGWIN__) && !defined(__ICC) && defined(__GNUC__) && (__GNUC__ < 3)
+#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
#define USE_PRAGMA_INTERFACE
#endif
diff --git a/mysys/default_modify.c b/mysys/default_modify.c
index 3476b8628cf..add4317bb56 100644
--- a/mysys/default_modify.c
+++ b/mysys/default_modify.c
@@ -42,7 +42,7 @@ int modify_defaults_file(const char *file_location, const char *option,
const char *section_name, int remove_option)
{
FILE *cnf_file;
- struct stat file_stat;
+ MY_STAT file_stat;
char linebuff[BUFF_SIZE], tmp[BUFF_SIZE], *tmp_ptr, *src_ptr, *dst_ptr,
*file_buffer;
uint optlen, optval_len, sect_len;
diff --git a/ndb/src/cw/cpcd/Process.cpp b/ndb/src/cw/cpcd/Process.cpp
index cfffec7d0ce..431c96e3320 100644
--- a/ndb/src/cw/cpcd/Process.cpp
+++ b/ndb/src/cw/cpcd/Process.cpp
@@ -223,11 +223,8 @@ set_ulimit(const BaseString & pair){
if(!(list[1].trim() == "unlimited")){
value = atoi(list[1].c_str());
}
-#if defined(__INTEL_COMPILER)
- struct rlimit64 rlp;
-#else
+
struct rlimit rlp;
-#endif
#define _RLIMIT_FIX(x) { res = getrlimit(x,&rlp); if(!res){ rlp.rlim_cur = value; res = setrlimit(x, &rlp); }}
if(list[0].trim() == "c"){
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index fe2df815f1f..baf5c7e5c83 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -2049,12 +2049,22 @@ NdbDictionaryImpl::getIndexImpl(const char * externalName,
return 0;
}
+ /*
+ * internalName may be pointer to m_ndb.theImpl->m_internalname.c_str()
+ * and may get deallocated in next call.
+ *
+ * Passing around pointers to volatile internal members may not be
+ * optimal. Suggest use BaseString instances passed by value.
+ */
+
+ BaseString save_me(internalName);
NdbTableImpl* prim = getTable(tab->m_primaryTable.c_str());
if(prim == 0){
m_error.code = 4243;
return 0;
}
-
+ internalName = save_me.c_str();
+
/**
* Create index impl
*/
diff --git a/sql/des_key_file.cc b/sql/des_key_file.cc
index c6b4c5f2c34..a5a3e78d70f 100644
--- a/sql/des_key_file.cc
+++ b/sql/des_key_file.cc
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <mysql_priv.h>
+#include "mysql_priv.h"
#include <m_ctype.h>
#ifdef HAVE_OPENSSL
diff --git a/vio/Makefile.am b/vio/Makefile.am
index 9c961025080..22e706efe4c 100644
--- a/vio/Makefile.am
+++ b/vio/Makefile.am
@@ -19,15 +19,17 @@ LDADD= @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs)
pkglib_LIBRARIES= libvio.a
noinst_PROGRAMS = test-ssl test-sslserver test-sslclient
noinst_HEADERS= vio_priv.h
-test_ssl_SOURCES= test-ssl.c
+test_ssl_SOURCES= test-ssl.c $(top_srcdir)/extra/yassl/src/dummy.cpp
test_ssl_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
../mysys/libmysys.a ../strings/libmystrings.a \
$(openssl_libs)
-test_sslserver_SOURCES= test-sslserver.c
+test_sslserver_SOURCES= test-sslserver.c \
+ $(top_srcdir)/extra/yassl/src/dummy.cpp
test_sslserver_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
../mysys/libmysys.a ../strings/libmystrings.a \
$(openssl_libs)
-test_sslclient_SOURCES= test-sslclient.c
+test_sslclient_SOURCES= test-sslclient.c \
+ $(top_srcdir)/extra/yassl/src/dummy.cpp
test_sslclient_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
../mysys/libmysys.a ../strings/libmystrings.a \
$(openssl_libs)