diff options
-rw-r--r-- | configure.in | 36 | ||||
-rw-r--r-- | extra/yassl/src/buffer.cpp | 3 | ||||
-rw-r--r-- | extra/yassl/taocrypt/benchmark/benchmark.cpp | 4 | ||||
-rw-r--r-- | extra/yassl/taocrypt/test/test.cpp | 4 | ||||
-rw-r--r-- | include/my_pthread.h | 4 |
5 files changed, 51 insertions, 0 deletions
diff --git a/configure.in b/configure.in index fdcad1db195..b124c0fac0a 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp index 66107dbe0a9..5bd69905772 100644 --- a/extra/yassl/src/buffer.cpp +++ b/extra/yassl/src/buffer.cpp @@ -21,6 +21,9 @@ * with SSL types and sockets */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> // memcpy #include "runtime.hpp" diff --git a/extra/yassl/taocrypt/benchmark/benchmark.cpp b/extra/yassl/taocrypt/benchmark/benchmark.cpp index bb725a90187..1d38b080d0d 100644 --- a/extra/yassl/taocrypt/benchmark/benchmark.cpp +++ b/extra/yassl/taocrypt/benchmark/benchmark.cpp @@ -1,6 +1,10 @@ // benchmark.cpp // TaoCrypt benchmark +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <string.h> #include <stdio.h> diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp index 0af278404ab..09836a2ef56 100644 --- a/extra/yassl/taocrypt/test/test.cpp +++ b/extra/yassl/taocrypt/test/test.cpp @@ -1,6 +1,10 @@ // test.cpp // test taocrypt functionality +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <string.h> #include <stdio.h> diff --git a/include/my_pthread.h b/include/my_pthread.h index 9ada1d90712..f1b9320a075 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -223,7 +223,11 @@ extern int my_pthread_getprio(pthread_t thread_id); 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 */ |