mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Bug #58699 cannot build with gcc dbg on solaris
cmake/os/SunOS.cmake:
Remove TARGET_OS_SOLARIS
config.h.cmake:
Remove TARGET_OS_SOLARIS
Add PTHREAD_ONCE_INITIALIZER
configure.cmake:
Add function for testing whether we need { PTHREAD_ONCE_INIT } rather than PTHREAD_ONCE_INIT
include/my_pthread.h:
Use PTHREAD_ONCE_INITIALIZER if set by cmake.
include/mysql/psi/mysql_file.h:
Include my_global.h first, to get correct platform definitions.
mysys/ptr_cmp.c:
Hide the unused static functions in #ifdef's on solaris.
Use __sun (defined by both gcc and SunPro cc) rather than TARGET_OS_SOLARIS
sql/my_decimal.cc:
Include my_global.h first, to get correct platform definitions.
sql/mysqld.cc:
Fix signed/unsigned comparison warning.
sql/sql_audit.h:
Include my_global.h first, to get correct platform definitions.
sql/sql_plugin.h:
Include my_global.h first, to get correct platform definitions.
sql/sql_show.cc:
Fix: warning: cast from pointer to integer of different size
sql/sys_vars.h:
Use reinterpret_cast rather than c-style cast.
storage/perfschema/pfs_instr.cc:
Include my_global.h first, to get correct platform definitions.
This commit is contained in:
parent
3dcdd6957a
commit
029a5df870
13 changed files with 78 additions and 14 deletions
|
|
@ -269,6 +269,49 @@ ENDIF()
|
|||
#
|
||||
FIND_PACKAGE (Threads)
|
||||
|
||||
FUNCTION(MY_CHECK_PTHREAD_ONCE_INIT)
|
||||
CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG)
|
||||
IF(NOT HAVE_WERROR_FLAG)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <pthread.h>
|
||||
void foo(void) {}
|
||||
int main()
|
||||
{
|
||||
pthread_once_t once_control = PTHREAD_ONCE_INIT;
|
||||
pthread_once(&once_control, foo);
|
||||
return 0;
|
||||
}"
|
||||
HAVE_PTHREAD_ONCE_INIT
|
||||
)
|
||||
# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6611808
|
||||
IF(NOT HAVE_PTHREAD_ONCE_INIT)
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <pthread.h>
|
||||
void foo(void) {}
|
||||
int main()
|
||||
{
|
||||
pthread_once_t once_control = { PTHREAD_ONCE_INIT };
|
||||
pthread_once(&once_control, foo);
|
||||
return 0;
|
||||
}"
|
||||
HAVE_ARRAY_PTHREAD_ONCE_INIT
|
||||
)
|
||||
ENDIF()
|
||||
IF(HAVE_PTHREAD_ONCE_INIT)
|
||||
SET(PTHREAD_ONCE_INITIALIZER "PTHREAD_ONCE_INIT" PARENT_SCOPE)
|
||||
ENDIF()
|
||||
IF(HAVE_ARRAY_PTHREAD_ONCE_INIT)
|
||||
SET(PTHREAD_ONCE_INITIALIZER "{ PTHREAD_ONCE_INIT }" PARENT_SCOPE)
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
||||
IF(CMAKE_USE_PTHREADS_INIT)
|
||||
MY_CHECK_PTHREAD_ONCE_INIT()
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
# Tests for functions
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue