8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

[build] [cmake] Search for accept4 and SOCK_CLOEXEC symbols during configuration step.

This commit is contained in:
egorpugin 2015-03-30 14:34:28 +00:00
parent 4a05fea434
commit b5948553c9
2 changed files with 21 additions and 0 deletions

View File

@ -46,6 +46,19 @@ function(check_type_alignment type var)
endif()
endfunction(check_type_alignment)
#######################################
# FUNCTION check_symbol
#######################################
function(check_symbol symbol var)
foreach(f ${ARGN})
if (NOT ${var})
unset(${var} CACHE)
message(STATUS "Looking for ${symbol} - ${f}")
check_symbol_exists(${symbol} ${f} ${var})
endif()
endforeach()
endfunction(check_symbol)
#######################################
include(CheckCSourceCompiles)
@ -181,6 +194,7 @@ check_includes(include_files_list)
#fi
set(functions_list
accept4
AO_compare_and_swap_full
clock_gettime
dirname
@ -259,6 +273,7 @@ endif()
test_big_endian(WORDS_BIGENDIAN)
check_symbol_exists(INFINITY math.h HAVE_INFINITY)
check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY)
check_symbol(SOCK_CLOEXEC HAVE_DECL_SOCK_CLOEXEC socket.h sys/socket.h)
set(CMAKE_EXTRA_INCLUDE_FILES Windows.h)
check_type_size("char[MAX_PATH]" MAXPATHLEN)

View File

@ -393,6 +393,9 @@
* Functions
*
******************************************************************************/
/* Define to 1 if you have the `accept4' function. */
#cmakedefine HAVE_ACCEPT4 1
/* Define to 1 if you have the `AO_compare_and_swap_full' function. */
#cmakedefine HAVE_AO_COMPARE_AND_SWAP_FULL 1
@ -624,6 +627,9 @@
/* Define this if va_copy() is defined in stdarg.h */
#cmakedefine HAVE_VA_COPY 1
/* Define this if SOCK_CLOEXEC is defined in socket.h */
#cmakedefine HAVE_DECL_SOCK_CLOEXEC 1
/* Number of bits in a file offset, on hosts where this is settable. */
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@