From 0b381c94cb262958fa672f00c308099b227c1fbe Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Oct 2006 10:43:15 +0200 Subject: [PATCH 1/4] When using yaSSL on NetWare some of the OpenSSL specifix hacks can be skipped vio/viossl.c: No need for special code to switch from WinSock to BSD sockets when using yaSSL vio/viosslfactories.c: The OpenSSL port to NetWare has added some extra functions to free up memory, no need to call them when using yaSSL --- vio/viossl.c | 5 +++++ vio/viosslfactories.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/vio/viossl.c b/vio/viossl.c index 9cc4523d32e..b5fd0e11c02 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -26,6 +26,10 @@ #ifdef HAVE_OPENSSL #ifdef __NETWARE__ + +/* yaSSL already uses BSD sockets */ +#ifndef HAVE_YASSL + /* The default OpenSSL implementation on NetWare uses WinSock. This code allows us to use the BSD sockets. @@ -47,6 +51,7 @@ static int SSL_set_fd_bsd(SSL *s, int fd) #define SSL_set_fd(A, B) SSL_set_fd_bsd((A), (B)) +#endif /* HAVE_YASSL */ #endif /* __NETWARE__ */ diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 2c528e9a2fc..9fd18579351 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -180,11 +180,15 @@ void netware_ssl_cleanup() /* free memory from SSL_library_init() */ EVP_cleanup(); +/* OpenSSL NetWare port specific functions */ +#ifndef HAVE_YASSL + /* free global X509 method */ X509_STORE_method_cleanup(); /* free the thread_hash error table */ ERR_free_state_table(); +#endif } From 375b04b9fe8826bd666b49421b5176a9316039e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Oct 2006 11:16:53 +0200 Subject: [PATCH 2/4] Temporary fixes for building from source dist in pushbuild netware/BUILD/compile-netware-END: If running as user pushbuild don't run autotools again netware/BUILD/mwenv: Set ARFLAGS to value of AR_FLAGS --- netware/BUILD/compile-netware-END | 9 +++++++-- netware/BUILD/mwenv | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/netware/BUILD/compile-netware-END b/netware/BUILD/compile-netware-END index a8d829499bd..6c531ab5c7c 100755 --- a/netware/BUILD/compile-netware-END +++ b/netware/BUILD/compile-netware-END @@ -18,8 +18,13 @@ rm -rf Makefile.in.bk # Setup Metrowerks environment . $path/mwenv -# Run autotools(use BUILD/autorun.sh) -. BUILD/autorun.sh +# Temporary hack to allow building from source dist +if [ ! "$USER"=pushbuild ] +then + # Run autotools(use BUILD/autorun.sh) + echo "Running autotools again(BUILD/autorun.sh)" + . BUILD/autorun.sh +fi # configure ./configure $base_configs $extra_configs diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv index a60da17d987..a8d31949736 100755 --- a/netware/BUILD/mwenv +++ b/netware/BUILD/mwenv @@ -65,5 +65,11 @@ then export TERM=linux fi +# Temporary hack to allow building from source dist +if [ "$USER"=pushbuild ] +then + export ARFLAGS=$AR_FLAGS +fi + # Print all env. variables export From b0626431808b30a4dac6f5442157ad878c8caa93 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Oct 2006 13:12:34 +0200 Subject: [PATCH 3/4] Replace all refernces to .la libraries with direct references to their .libs/*.a library Add comment describing why mwldnlm is called with "x" flag configure.in: Replace references to yassl .la libraries with direct reference to the .a libraries netware/BUILD/mwldnlm: Add comment about why mwldnlm is called with the "x" flag and how to avoid it --- configure.in | 4 ++++ netware/BUILD/mwldnlm | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/configure.in b/configure.in index 55da1dfb241..c050d31a917 100644 --- a/configure.in +++ b/configure.in @@ -1176,12 +1176,16 @@ EOF cat > $filesed << EOF s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.linux\2, s,\(: conf_to_src\),\1.linux, +s,libyassl.la,.libs/libyassl.a, +s,libtaocrypt.la,.libs/libtaocrypt.a, EOF ;; libmysql_r/Makefile.in) cat > $filesed << EOF s,\(\./conf_to_src\)\( \$(top_srcdir)\),\1.linux\2, s,\(: conf_to_src\),\1.linux, +s,libyassl.la,.libs/libyassl.a, +s,libtaocrypt.la,.libs/libtaocrypt.a, EOF ;; strings/Makefile.in) diff --git a/netware/BUILD/mwldnlm b/netware/BUILD/mwldnlm index cc8c9e63c6e..b1822827b59 100755 --- a/netware/BUILD/mwldnlm +++ b/netware/BUILD/mwldnlm @@ -3,6 +3,13 @@ # stop on errors set -e +# If libtool passes "x" as the first argument to this script +# it's an indication that libtool is trying to unpack .la's +# so they can be added to a new library +# This step does not work on Netware and we avoid it by +# replacing the .la library with the path to the .a library +# in Makefile.in + args=" $*" # NOTE: Option 'pipefail' is not standard sh From 8b3f82322eafdd369861f52eaef95ee26780cf70 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Oct 2006 13:52:50 +0200 Subject: [PATCH 4/4] Use same type for local variables as arguments, avoid compile error on NetWare --- client/mysqldump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 28a220bf61e..757bec09b50 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1195,7 +1195,7 @@ static void print_xml_tag(FILE * xml_file, const char* sbeg, const char* send, const char* first_attribute_name, ...) { va_list arg_list; - char *attribute_name, *attribute_value; + const char *attribute_name, *attribute_value; fputs(sbeg, xml_file); fputc('<', xml_file); @@ -1318,7 +1318,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name, static void print_blob_as_hex(FILE *output_file, const char *str, ulong len) { /* sakaik got the idea to to provide blob's in hex notation. */ - char *ptr= str, *end= ptr + len; + const char *ptr= str, *end= ptr + len; for (; ptr < end ; ptr++) fprintf(output_file, "%02X", *((uchar *)ptr)); check_io(output_file);