Changeset: 1d4602cd98c2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d4602cd98c2
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
Branch: unlock-cands
Log Message:

merged


diffs (truncated from 26460 to 300 lines):

diff --git a/.readthedocs.yml b/.readthedocs.yml
new file mode 100644
--- /dev/null
+++ b/.readthedocs.yml
@@ -0,0 +1,14 @@
+# .readthedocs.yml
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Build documentation in the docs/ directory with Sphinx
+sphinx:
+  configuration: documentation/conf.py
+
+# Optionally build your docs in additional formats such as PDF
+formats:
+  - pdf
diff --git a/Config.cmake.in b/Config.cmake.in
--- a/Config.cmake.in
+++ b/Config.cmake.in
@@ -12,6 +12,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/monet
 include("${CMAKE_CURRENT_LIST_DIR}/streamTargets.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/mapiTargets.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/matomicTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/mstringTargets.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/gdkTargets.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/monetdb5Targets.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/sqlTargets.cmake")
diff --git a/clients/examples/C/streamcat.c b/clients/examples/C/streamcat.c
--- a/clients/examples/C/streamcat.c
+++ b/clients/examples/C/streamcat.c
@@ -191,8 +191,10 @@ int cmd_read(char *argv[])
                }
                if (wrapper != NULL)
                        s = wrapper(s, parms);
-               if (s == NULL)
-                       croak(2, "Wrapper %s did not return a stream", 
wrapper_name);
+               if (s == NULL || mnstr_errnr(s)) {
+                       char *msg = mnstr_error(s);
+                       croak(2, "Opener %s failed: %s", opener_name, msg ? msg 
: "<no error message>");
+               }
        }
 
        if (out == NULL) {
@@ -300,8 +302,10 @@ int cmd_write(char *argv[])
                }
                if (wrapper != NULL)
                        s = wrapper(s, parms);
-               if (s == NULL)
-                       croak(2, "Wrapper %s did not return a stream", 
wrapper_name);
+               if (s == NULL || mnstr_errnr(s)) {
+                       char *msg = mnstr_error(s);
+                       croak(2, "Opener %s failed: %s", opener_name, msg ? msg 
: "<no error message>");
+               }
        }
 
        if (in == NULL) {
diff --git a/clients/odbc/driver/CMakeLists.txt 
b/clients/odbc/driver/CMakeLists.txt
--- a/clients/odbc/driver/CMakeLists.txt
+++ b/clients/odbc/driver/CMakeLists.txt
@@ -120,7 +120,8 @@ target_link_libraries(MonetODBC
   PRIVATE
   monetdb_config_header
   mutils
-  mapi)
+  mapi
+       ODBC::ODBC)
 
 install(TARGETS
   MonetODBC
diff --git a/cmake/Modules/FindUUID.cmake b/cmake/Modules/FindUUID.cmake
--- a/cmake/Modules/FindUUID.cmake
+++ b/cmake/Modules/FindUUID.cmake
@@ -19,6 +19,8 @@ if(NOT UUID_LIBRARIES)
   set(UUID_LIBRARIES "" CACHE INTERNAL "uuid libraries path")
 endif()
 # Find uuid_generate symbol, which we require and some platforms don't have it
+set(CMAKE_REQUIRED_LIBRARIES ${UUID_LIBRARIES})
+set(CMAKE_REQUIRED_INCLUDES ${UUID_INCLUDE_DIR})
 check_symbol_exists("uuid_generate" "uuid/uuid.h" HAVE_UUID_GENERATE)
 cmake_pop_check_state()
 
diff --git a/cmake/Toolchains/linux-gnu.cmake b/cmake/Toolchains/linux-gnu.cmake
--- a/cmake/Toolchains/linux-gnu.cmake
+++ b/cmake/Toolchains/linux-gnu.cmake
@@ -16,7 +16,6 @@
     #  MT_checkCompilerFlag("-Wdisabled-optimization")
     #  MT_checkCompilerFlag("-Wfloat-equal")
     #  MT_checkCompilerFlag("-Winline")
-    #  MT_checkCompilerFlag("-Wmissing-noreturn")
     #  MT_checkCompilerFlag("-Wpadded")
     #  MT_checkCompilerFlag("-Wredundant-decls")
     #  MT_checkCompilerFlag("-Wshadow")
diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -43,7 +43,6 @@ function(monetdb_configure_defines)
   check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
   check_include_file("sys/uio.h" HAVE_SYS_UIO_H)
   check_include_file("sys/un.h" HAVE_SYS_UN_H)
-  check_include_file("sys/utime.h" HAVE_SYS_UTIME_H)
   check_include_file("sys/wait.h" HAVE_SYS_WAIT_H)
   check_include_file("unistd.h" HAVE_UNISTD_H)
   check_include_file("uuid/uuid.h" HAVE_UUID_UUID_H)
@@ -116,8 +115,11 @@ function(monetdb_configure_defines)
   check_function_exists("uname" HAVE_UNAME)
   # Some libc versions on Linux distributions don't have it
   check_symbol_exists("semtimedop" "sys/types.h;sys/ipc.h;sys/sem.h" 
HAVE_SEMTIMEDOP)
-  check_function_exists("pthread_kill" HAVE_PTHREAD_KILL)
-  check_function_exists("pthread_sigmask" HAVE_PTHREAD_SIGMASK)
+  cmake_push_check_state()
+    set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
+    check_function_exists("pthread_kill" HAVE_PTHREAD_KILL)
+    check_function_exists("pthread_sigmask" HAVE_PTHREAD_SIGMASK)
+  cmake_pop_check_state()
   check_symbol_exists("regcomp" "regex.h" HAVE_POSIX_REGEX)
 endfunction()
 
@@ -299,7 +301,12 @@ macro(monetdb_configure_sizes)
   check_type_size("long int" SIZEOF_LONG_INT LANGUAGE C)
   check_type_size(double SIZEOF_DOUBLE LANGUAGE C)
   check_type_size(wchar_t SIZEOF_WCHAR_T LANGUAGE C)
+  cmake_push_check_state()
+  if(WIN32)
+    set(CMAKE_EXTRA_INCLUDE_FILES "Ws2tcpip.h")
+  endif()
   check_type_size(socklen_t HAVE_SOCKLEN_T LANGUAGE C)
+  cmake_pop_check_state()
 
   if(INT128)
     cmake_push_check_state()
diff --git a/cmake/monetdb-toolchain.cmake b/cmake/monetdb-toolchain.cmake
--- a/cmake/monetdb-toolchain.cmake
+++ b/cmake/monetdb-toolchain.cmake
@@ -55,6 +55,8 @@ function(monetdb_default_toolchain)
       MT_checkCompilerFlag("-Wduplicated-branches")
       MT_checkCompilerFlag("-Wrestrict")
       MT_checkCompilerFlag("-Wnested-externs")
+      MT_checkCompilerFlag("-Wmissing-noreturn")
+      MT_checkCompilerFlag("-Wuninitialized")
 
       # since we use values of type "int8_t" as subscript,
       # and int8_t may be defined as plain "char", we cannot
diff --git a/common/stream/bz2_stream.c b/common/stream/bz2_stream.c
--- a/common/stream/bz2_stream.c
+++ b/common/stream/bz2_stream.c
@@ -21,7 +21,7 @@ struct inner_state {
        int (*work)(bz_stream *strm, int flush);
        int (*end)(bz_stream *strm);
        bool eof_reached;
-       Bytef buf[64*1024];
+       char buf[64*1024];
 };
 
 
diff --git a/common/stream/iconv_stream.c b/common/stream/iconv_stream.c
--- a/common/stream/iconv_stream.c
+++ b/common/stream/iconv_stream.c
@@ -292,8 +292,10 @@ iconv_rstream(stream *restrict ss, const
        if (ss->isutf8)
                return ss;
        cd = iconv_open("utf-8", charset);
-       if (cd == (iconv_t) -1)
+       if (cd == (iconv_t) -1) {
+               mnstr_set_open_error(name, errno, "iconv_open");
                return NULL;
+       }
        s = ic_open(cd, ss, name);
        if (s == NULL) {
                iconv_close(cd);
@@ -318,8 +320,10 @@ iconv_wstream(stream *restrict ss, const
        if (ss->isutf8)
                return ss;
        cd = iconv_open(charset, "utf-8");
-       if (cd == (iconv_t) -1)
+       if (cd == (iconv_t) -1) {
+               mnstr_set_open_error(name, errno, "iconv_open");
                return NULL;
+       }
        s = ic_open(cd, ss, name);
        if (s == NULL) {
                iconv_close(cd);
@@ -341,7 +345,7 @@ iconv_rstream(stream *restrict ss, const
            strcmp(charset, "UTF8") == 0)
                return ss;
 
-       mnstr_set_open_error(url, 0, "ICONV support has been left out of this 
MonetDB");
+       mnstr_set_open_error(name, 0, "ICONV support has been left out of this 
MonetDB");
        return NULL;
 }
 
@@ -356,7 +360,7 @@ iconv_wstream(stream *restrict ss, const
            strcmp(charset, "UTF8") == 0)
                return ss;
 
-       mnstr_set_open_error(url, 0, "ICONV support has been left out of this 
MonetDB");
+       mnstr_set_open_error(name, 0, "ICONV support has been left out of this 
MonetDB");
        return NULL;
 }
 #endif /* HAVE_ICONV */
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -86,7 +86,7 @@ get_tl_error_buf(void)
                p = malloc(sizeof(*p));
                if (p == NULL)
                        return NULL;
-               *p = (struct tl_error_buf) { .msg = 0 };
+               *p = (struct tl_error_buf) { .msg = {0} };
                pthread_setspecific(tl_error_key, p);
                struct tl_error_buf *second_attempt = 
pthread_getspecific(tl_error_key);
                assert(p == second_attempt /* maybe mnstr_init has not been 
called? */);
diff --git a/ctest/cmake/detect-bz2.cmake b/ctest/cmake/detect-bz2.cmake
--- a/ctest/cmake/detect-bz2.cmake
+++ b/ctest/cmake/detect-bz2.cmake
@@ -20,19 +20,7 @@ if (${LINUX_DISTRO} STREQUAL "debian")
       variablename BZIP2_FOUND)
   endif()
 elseif (${LINUX_DISTRO} STREQUAL "ubuntu")
-  if(${LINUX_DISTRO_VERSION} STREQUAL "18")
-    assert_package_detected(
-      detect FALSE
-      legacyvariable HAVE_LIBBZ2
-      variablename BZIP2_FOUND)
-  endif()
-  if(${LINUX_DISTRO_VERSION} STREQUAL "19")
-    assert_package_detected(
-      detect FALSE
-      legacyvariable HAVE_LIBBZ2
-      variablename BZIP2_FOUND)
-  endif()
-  if(${LINUX_DISTRO_VERSION} STREQUAL "20")
+  if(${LINUX_DISTRO_VERSION} VERSION_GREATER_EQUAL "18")
     assert_package_detected(
       detect FALSE
       legacyvariable HAVE_LIBBZ2
diff --git a/ctest/cmake/detect-commoncrypto.cmake 
b/ctest/cmake/detect-commoncrypto.cmake
--- a/ctest/cmake/detect-commoncrypto.cmake
+++ b/ctest/cmake/detect-commoncrypto.cmake
@@ -20,19 +20,7 @@ if (${LINUX_DISTRO} STREQUAL "debian")
       variablename COMMONCRYPTO_FOUND)
   endif()
 elseif (${LINUX_DISTRO} STREQUAL "ubuntu")
-  if(${LINUX_DISTRO_VERSION} STREQUAL "18")
-    assert_package_detected(
-      detect FALSE
-      legacyvariable HAVE_COMMONCRYPTO
-      variablename COMMONCRYPTO_FOUND)
-  endif()
-  if(${LINUX_DISTRO_VERSION} STREQUAL "19")
-    assert_package_detected(
-      detect FALSE
-      legacyvariable HAVE_COMMONCRYPTO
-      variablename COMMONCRYPTO_FOUND)
-  endif()
-  if(${LINUX_DISTRO_VERSION} STREQUAL "20")
+  if(${LINUX_DISTRO_VERSION} VERSION_GREATER_EQUAL "18")
     assert_package_detected(
       detect FALSE
       legacyvariable HAVE_COMMONCRYPTO
diff --git a/ctest/cmake/detect-curl.cmake b/ctest/cmake/detect-curl.cmake
--- a/ctest/cmake/detect-curl.cmake
+++ b/ctest/cmake/detect-curl.cmake
@@ -20,19 +20,7 @@ if (${LINUX_DISTRO} STREQUAL "debian")
       variablename CURL_FOUND)
   endif()
 elseif (${LINUX_DISTRO} STREQUAL "ubuntu")
-  if(${LINUX_DISTRO_VERSION} STREQUAL "18")
-    assert_package_detected(
-      detect FALSE
-      legacyvariable HAVE_CURL
-      variablename CURL_FOUND)
-  endif()
-  if(${LINUX_DISTRO_VERSION} STREQUAL "19")
-    assert_package_detected(
-      detect FALSE
-      legacyvariable HAVE_CURL
-      variablename CURL_FOUND)
-  endif()
-  if(${LINUX_DISTRO_VERSION} STREQUAL "20")
+  if(${LINUX_DISTRO_VERSION} VERSION_GREATER_EQUAL "18")
     assert_package_detected(
       detect FALSE
       legacyvariable HAVE_CURL
diff --git a/ctest/cmake/detect-fits.cmake b/ctest/cmake/detect-fits.cmake
--- a/ctest/cmake/detect-fits.cmake
+++ b/ctest/cmake/detect-fits.cmake
@@ -24,19 +24,7 @@ if (${LINUX_DISTRO} STREQUAL "debian")
       variablename CFITSIO_FOUND)
   endif()
 elseif (${LINUX_DISTRO} STREQUAL "ubuntu")
-  if(${LINUX_DISTRO_VERSION} STREQUAL "18")
-    assert_package_detected(
-      detect FALSE
-      legacyvariable HAVE_FITS
-      variablename CFITSIO_FOUND)
-  endif()
-  if(${LINUX_DISTRO_VERSION} STREQUAL "19")
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to