[Commits] Rev 3025: fixes for solaris 10 in http://bazaar.launchpad.net/~maria-captains/maria/5.1/

serg at askmonty.org serg at askmonty.org
Thu Jan 27 12:18:26 EET 2011


At http://bazaar.launchpad.net/~maria-captains/maria/5.1/

------------------------------------------------------------
revno: 3025
revision-id: sergii at pisem.net-20110126171639-w33azs8c13ddf92b
parent: sergii at pisem.net-20110126131613-3q6vpwuhc5f8of1y
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.1
timestamp: Wed 2011-01-26 18:16:39 +0100
message:
  fixes for solaris 10
  
  configure.in:
    * don't use assembler when building with native linker and --with-embedded.
      Embedded uses PIC and our assembler sources aren't PIC
    * workaround for OpenSolaris Bug 6611808
  extra/libevent/devpoll.c:
    compiler warning
  extra/yassl/src/buffer.cpp:
    include config.h first to make sure that _FILE_OFFSET_BITS is defined
    before including system headers
  extra/yassl/taocrypt/benchmark/benchmark.cpp:
    include config.h first to make sure that _FILE_OFFSET_BITS is defined
    before including system headers
  extra/yassl/taocrypt/test/test.cpp:
    include config.h first to make sure that _FILE_OFFSET_BITS is defined
    before including system headers
  include/my_pthread.h:
    workaround for OpenSolaris Bug 6611808
-------------- next part --------------
=== modified file 'configure.in'
--- a/configure.in	2010-12-21 17:23:50 +0000
+++ b/configure.in	2011-01-26 17:16:39 +0000
@@ -715,6 +715,17 @@ AC_ARG_ENABLE(assembler,
     [ ENABLE_ASSEMBLER=no ]
     )
 
+# Don't use assembler if building on Solaris with native linker
+# and with embedded. Because our asm code is not PIC and solaris ld
+# aborts with an error when creating .so
+if test "x$ENABLE_ASSEMBLER" = "xyes" -a \
+     "x$LD_VERSION_SCRIPT" = "x" -a \
+     "x$with_embedded_server" = "xyes" -a \
+     `expr "$SYSTEM_TYPE" : "^.*solaris"` -gt 0; then
+  ENABLE_ASSEMBLER=no
+  AC_MSG_WARN([No assembler functions when non-GNU linker is used and embedded-server is enabled])
+fi
+
 AC_MSG_CHECKING(if we should use assembler functions)
 # For now we only support assembler on i386 and sparc systems
 AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $CCAS $CCASFLAGS -c strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
@@ -1595,6 +1606,31 @@ else
   fi
 fi
 
+#
+# Solaris bug http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6611808
+# Detect and work around.
+#
+AC_MSG_CHECKING([for OpenSolaris Bug 6611808])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror"
+AC_COMPILE_IFELSE([
+  #include <pthread.h>
+  void dummy() {}
+  int main()
+  {
+    pthread_once_t once_control = { PTHREAD_ONCE_INIT };
+    pthread_once(&once_control, dummy);
+    return 0;
+  }
+], [
+  AC_DEFINE([PTHREAD_ONCE_INITIALIZER], [{PTHREAD_ONCE_INIT}],
+            [See OpenSolaris Bug 6611808])
+  AC_MSG_RESULT([yes])
+], [
+  AC_MSG_RESULT([no])
+]);
+CFLAGS="$save_CFLAGS"
+
 #---START: Used in for client configure
 # Must be checked after, because strtok_r may be in -lpthread
 # On AIX strtok_r is in libc_r

=== modified file 'extra/yassl/src/buffer.cpp'
--- a/extra/yassl/src/buffer.cpp	2009-02-10 22:47:54 +0000
+++ b/extra/yassl/src/buffer.cpp	2011-01-26 17:16:39 +0000
@@ -21,6 +21,9 @@
  * with SSL types and sockets
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <string.h>             // memcpy
 #include "runtime.hpp"

=== modified file 'extra/yassl/taocrypt/benchmark/benchmark.cpp'
--- a/extra/yassl/taocrypt/benchmark/benchmark.cpp	2007-03-23 10:52:25 +0000
+++ b/extra/yassl/taocrypt/benchmark/benchmark.cpp	2011-01-26 17:16:39 +0000
@@ -1,6 +1,10 @@
 // benchmark.cpp
 // TaoCrypt benchmark
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <stdio.h>
 

=== modified file 'extra/yassl/taocrypt/test/test.cpp'
--- a/extra/yassl/taocrypt/test/test.cpp	2007-03-23 16:15:44 +0000
+++ b/extra/yassl/taocrypt/test/test.cpp	2011-01-26 17:16:39 +0000
@@ -1,6 +1,10 @@
 // test.cpp
 // test taocrypt functionality
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <stdio.h>
 

=== modified file 'include/my_pthread.h'
--- a/include/my_pthread.h	2010-12-01 20:37:03 +0000
+++ b/include/my_pthread.h	2011-01-26 17:16:39 +0000
@@ -223,7 +223,11 @@ extern int my_pthread_getprio(pthread_t 
 typedef void *(* pthread_handler)(void *);
 
 #define my_pthread_once_t pthread_once_t
+#if defined(PTHREAD_ONCE_INITIALIZER)
+#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER
+#else
 #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#endif
 #define my_pthread_once(C,F) pthread_once(C,F)
 
 /* Test first for RTS or FSU threads */



More information about the commits mailing list