Changeset: dfb4775c2bfc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dfb4775c2bfc
Modified Files:
CMakeLists.txt
cmake/monetdb_config.h.in
Branch: cmake-fun
Log Message:
Added cmakedefine in monetdb_config.h.in
diffs (truncated from 595 to 300 lines):
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1661,7 +1661,7 @@ check_type_size(SOCKET SIZEOF_SOCKET LAN
if(NOT HAVE_SIZEOF_SOCKET OR "${SIZEOF_SOCKET}" STREQUAL "0")
set(SOCKET int)
endif()
-set(CMAKE_EXTRA_INCLUDE_FILES "${PREV_CMAKE_EXTRA_INCLUDE_FILES}")
+check_type_size(socklen_t SIZEOF_SOCKETLEN_T LANGUAGE C)
if(HAVE_SIZEOF_SOCKETLEN_T AND NOT "${SIZEOF_SOCKETLEN_T}" STREQUAL "0")
set(HAVE_SOCKLEN_T ON)
else()
@@ -1672,12 +1672,14 @@ set(CMAKE_EXTRA_INCLUDE_FILES "${PREV_CM
check_type_size(size_t SIZEOF_SIZE_T LANGUAGE C)
if(HAVE_SIZEOF_SIZE_T AND NOT "${SIZEOF_SIZE_T}" STREQUAL "0")
set(SIZEOF_SIZE_T ${SIZEOF_SIZE_T})
- set(size_t ON)
+else()
+ set(size_t "unsigned int")
endif()
check_type_size(ssize_t SIZEOF_SSIZE_T LANGUAGE C)
if(HAVE_SIZEOF_SSIZE_T AND NOT "${SIZEOF_SSIZE_T}" STREQUAL "0")
set(SIZEOF_SSIZE_T ${SIZEOF_SSIZE_T})
- set(ssize_t ON)
+else()
+ set(ssize_t "int")
endif()
check_type_size(pid_t SIZEOF_PID_T LANGUAGE C)
@@ -1751,7 +1753,7 @@ endif()
set(FLEXIBLE_ARRAY_MEMBER ON) # We compile according to C99 standard onwards
#
https://github.com/Unidata/netcdf-c/commit/b432a527c4a38af45498691a44c5a88961b9c751
-message(STATUS "Check if char type is unsigned or not")
+message(STATUS "Test if char type is unsigned or not")
check_c_source_compiles("
#include <stdlib.h>
@@ -1767,7 +1769,7 @@ if(__CHAR_UNSIGNED__)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CHAR_UNSIGNED__")
endif()
-message(STATUS "Check if __hidden macro is supported")
+message(STATUS "Test if __hidden macro is supported")
check_c_source_compiles("
#include <stdlib.h>
@@ -1784,7 +1786,7 @@ if(NOT HAVE_HIDDEN)
set(__hidden ON)
endif()
-message(STATUS "If your compiler can use NAN as an initializer")
+message(STATUS "Test if compiler can use NAN as an initializer")
check_c_source_compiles("
#include <math.h>
@@ -1855,10 +1857,22 @@ check_c_source_compiles("
(void) argc;(void) argv;
__int128 a=(__int128)atoll(getenv(\"a\"))<<64,
b=(__int128)atoll(getenv(\"b\"))<<64, c;
if (!__builtin_mul_overflow(a, b, &c))
- printf(\"%lld %lld\\n\",(long long)(c>>64), (long long)c);
+ printf(\"%lld %lld\",(long long)(c>>64), (long long)c);
return 0;
}" HAVE___BUILTIN_ADD_OVERFLOW)
+if(HAVE_ASCTIME_R)
+ message(STATUS "Test if asctime_R3 takes 3 arguments")
+ check_c_source_compiles("
+ #include <time.h>
+
+ int main(int argc, char **argv) {
+ (void) argc;(void) argv;
+ char buf[26]; struct tm t; asctime_r(&t,buf,26);(void) t; (void)
buf;
+ return 0;
+ }" HAVE_ASCTIME_R3)
+endif()
+
# leave for last
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_REENTRANT")
configure_file(${CMAKE_SOURCE_DIR}/cmake/monetdb_config.h.in
${CMAKE_SOURCE_DIR}/debugme.h)
diff --git a/cmake/monetdb_config.h.in b/cmake/monetdb_config.h.in
--- a/cmake/monetdb_config.h.in
+++ b/cmake/monetdb_config.h.in
@@ -30,22 +30,22 @@
(struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
MSVC and with C++ compilers. */
-#undef FLEXIBLE_ARRAY_MEMBER
+#cmakedefine FLEXIBLE_ARRAY_MEMBER
/* Define to 1 if you have the `accept4' function. */
-#undef HAVE_ACCEPT4
+#cmakedefine HAVE_ACCEPT4
/* Define to 1 if you have the `asctime_r' function. */
-#undef HAVE_ASCTIME_R
+#cmakedefine HAVE_ASCTIME_R
/* Define if you have asctime_r(struct tm*,char *buf,size_t s) */
-#undef HAVE_ASCTIME_R3
+#cmakedefine HAVE_ASCTIME_R3
/* Define to 1 if you have the <atomic_ops.h> header file. */
-#undef HAVE_ATOMIC_OPS_H
+#cmakedefine HAVE_ATOMIC_OPS_H
/* Define to 1 if you have the `backtrace' function. */
-#undef HAVE_BACKTRACE
+#cmakedefine HAVE_BACKTRACE
/* Define to 1 if you have the <bam/bam.h> header file. */
#cmakedefine HAVE_BAM_BAM_H
@@ -59,11 +59,8 @@
/* Define to 1 if you have the <bam/sam.h> header file. */
#cmakedefine HAVE_BAM_SAM_H
-/* Define to 1 if you have the `cbrt' function. */
-#undef HAVE_CBRT
-
/* Define to 1 if you have the `clock_gettime' function. */
-#undef HAVE_CLOCK_GETTIME
+#cmakedefine HAVE_CLOCK_GETTIME
/* Define if you have the CommonCrypto library */
#cmakedefine HAVE_COMMONCRYPTO
@@ -72,18 +69,14 @@
#cmakedefine HAVE_CONSOLE
/* Define to 1 if you have the `ctime_r' function. */
-#undef HAVE_CTIME_R
+#cmakedefine HAVE_CTIME_R
/* Define if you have ctime_r(time_t*,char *buf,size_t s) */
-#undef HAVE_CTIME_R3
+#cmakedefine HAVE_CTIME_R3
/* Define if you have the cURL library */
#cmakedefine HAVE_CURL
-/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
- */
-#undef HAVE_DECL_TZNAME
-
/* Define to 1 if you have the <dirent.h> header file. */
#cmakedefine HAVE_DIRENT_H
@@ -100,16 +93,16 @@
#cmakedefine HAVE_EXECINFO_H
/* Define to 1 if you have the `fallocate' function. */
-#undef HAVE_FALLOCATE
+#cmakedefine HAVE_FALLOCATE
/* Define to 1 if you have the `fcntl' function. */
-#undef HAVE_FCNTL
+#cmakedefine HAVE_FCNTL
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* If the system has a working fdatasync */
-#undef HAVE_FDATASYNC
+#cmakedefine HAVE_FDATASYNC
/* Define if the fits module is to be enabled */
#cmakedefine HAVE_FITS
@@ -118,37 +111,37 @@
#cmakedefine HAVE_FORK
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-#undef HAVE_FSEEKO
+#cmakedefine HAVE_FSEEKO
/* Define to 1 if you have the `fsync' function. */
-#undef HAVE_FSYNC
+#cmakedefine HAVE_FSYNC
/* Define to 1 if you have the `ftime' function. */
-#undef HAVE_FTIME
+#cmakedefine HAVE_FTIME
/* Define to 1 if you have the `getaddrinfo' function. */
#cmakedefine HAVE_GETADDRINFO
/* Define to 1 if you have the `getexecname' function. */
-#undef HAVE_GETEXECNAME
+#cmakedefine HAVE_GETEXECNAME
/* Define to 1 if you have the `getlogin' function. */
-#undef HAVE_GETLOGIN
+#cmakedefine HAVE_GETLOGIN
/* Define to 1 if you have the `getopt' function. */
-#undef HAVE_GETOPT
+#cmakedefine HAVE_GETOPT
/* Define to 1 if you have the <getopt.h> header file. */
#cmakedefine HAVE_GETOPT_H
/* Define to 1 if you have the `getopt_long' function. */
-#undef HAVE_GETOPT_LONG
+#cmakedefine HAVE_GETOPT_LONG
/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
+#cmakedefine HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `getuid' function. */
-#undef HAVE_GETUID
+#cmakedefine HAVE_GETUID
/* Define if you have the iconv() function and it works. */
#cmakedefine HAVE_ICONV
@@ -156,12 +149,6 @@
/* Define to 1 if you have the <iconv.h> header file. */
#cmakedefine HAVE_ICONV_H
-/* Define to 1 if the system has the type `intptr_t'. */
-#undef HAVE_INTPTR_T
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine HAVE_IO_H
@@ -214,10 +201,10 @@
#cmakedefine HAVE_LIBZ
/* Define to 1 if you have the `localtime_r' function. */
-#undef HAVE_LOCALTIME_R
+#cmakedefine HAVE_LOCALTIME_R
/* Define to 1 if you have the `lockf' function. */
-#undef HAVE_LOCKF
+#cmakedefine HAVE_LOCKF
/* Define to 1 if you have the <mach/mach_init.h> header file. */
#cmakedefine HAVE_MACH_MACH_INIT_H
@@ -229,7 +216,7 @@
#cmakedefine HAVE_MACH_TASK_H
/* Define to 1 if you have the `madvise' function. */
-#undef HAVE_MADVISE
+#cmakedefine HAVE_MADVISE
/* Enable MAPI */
#cmakedefine HAVE_MAPI
@@ -237,11 +224,8 @@
/* Define to 1 if you have the `MD5_Update' function. */
#cmakedefine HAVE_MD5_UPDATE
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
/* Define to 1 if you have the `mremap' function. */
-#undef HAVE_MREMAP
+#cmakedefine HAVE_MREMAP
/* Define if the netcdf module is to be enabled */
#cmakedefine HAVE_NETCDF
@@ -253,7 +237,7 @@
#cmakedefine HAVE_NETINET_IN_H
/* Define to 1 if you have the `nl_langinfo' function. */
-#undef HAVE_NL_LANGINFO
+#cmakedefine HAVE_NL_LANGINFO
/* Define to 1 if you have the <odbcinst.h> header file. */
#cmakedefine HAVE_ODBCINST_H
@@ -262,19 +246,19 @@
#cmakedefine HAVE_OPENSSL
/* Define to 1 if you have the `pipe2' function. */
-#undef HAVE_PIPE2
+#cmakedefine HAVE_PIPE2
/* Define to 1 if you have the `popen' function. */
-#undef HAVE_POPEN
+#cmakedefine HAVE_POPEN
/* Define to 1 if you have the `posix_fadvise' function. */
-#undef HAVE_POSIX_FADVISE
+#cmakedefine HAVE_POSIX_FADVISE
/* Define to 1 if you have the `posix_fallocate' function. */
-#undef HAVE_POSIX_FALLOCATE
+#cmakedefine HAVE_POSIX_FALLOCATE
/* Define to 1 if you have the `posix_madvise' function. */
-#undef HAVE_POSIX_MADVISE
+#cmakedefine HAVE_POSIX_MADVISE
/* Define to 1 if you have the <procfs.h> header file. */
#cmakedefine HAVE_PROCFS_H
@@ -291,11 +275,8 @@
/* Define if you have the pthread_sigmask function */
#cmakedefine HAVE_PTHREAD_SIGMASK
-/* Define to 1 if the system has the type `ptrdiff_t'. */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list