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
This commit is contained in:
parent
d313516294
commit
4e17ec5a29
36
configure.in
36
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
|
||||
|
@ -21,6 +21,9 @@
|
||||
* with SSL types and sockets
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h> // memcpy
|
||||
#include "runtime.hpp"
|
||||
|
@ -1,6 +1,10 @@
|
||||
// benchmark.cpp
|
||||
// TaoCrypt benchmark
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
// test.cpp
|
||||
// test taocrypt functionality
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user