MonetDB: odbc_loader - need to link to odbc library

2025-02-01 Thread Niels Nes via checkin-list
Changeset: f7c1c26c4e16 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f7c1c26c4e16
Modified Files:
sql/backends/monet5/vaults/odbc/CMakeLists.txt
Branch: odbc_loader
Log Message:

need to link to odbc library


diffs (13 lines):

diff --git a/sql/backends/monet5/vaults/odbc/CMakeLists.txt 
b/sql/backends/monet5/vaults/odbc/CMakeLists.txt
--- a/sql/backends/monet5/vaults/odbc/CMakeLists.txt
+++ b/sql/backends/monet5/vaults/odbc/CMakeLists.txt
@@ -36,7 +36,8 @@ if(ODBC_FOUND)
 sqlinclude
 sql
 monetdb5
-bat)
+bat
+ODBC::ODBC)
 
   set_target_properties(odbc_loader
 PROPERTIES
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: odbc_loader - merged with default

2025-02-01 Thread Niels Nes via checkin-list
Changeset: 461af5cee2cf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/461af5cee2cf
Modified Files:
sql/server/CMakeLists.txt
testing/listexports.py
tools/mserver/mserver5.c
Branch: odbc_loader
Log Message:

merged with default


diffs (truncated from 1609 to 300 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -18,12 +18,8 @@
  */
 
 #include "monetdb_config.h"
-#ifndef HAVE_GETOPT_LONG
-#  include "monet_getopt.h"
-#else
-# ifdef HAVE_GETOPT_H
-#  include "getopt.h"
-# endif
+#ifdef HAVE_GETOPT_H
+#include "getopt.h"
 #endif
 #include "stream.h"
 #include "mapi.h"
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -11,12 +11,8 @@
  */
 
 #include "monetdb_config.h"
-#ifndef HAVE_GETOPT_LONG
-#  include "monet_getopt.h"
-#else
-# ifdef HAVE_GETOPT_H
-#  include "getopt.h"
-# endif
+#ifdef HAVE_GETOPT_H
+#include "getopt.h"
 #endif
 #include "mapi.h"
 #include 
diff --git a/cmake/Modules/FindGetopt.cmake b/cmake/Modules/FindGetopt.cmake
deleted file mode 100644
--- a/cmake/Modules/FindGetopt.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-# - Find Getopt
-# Find the native getopt headers and libraries.
-#
-# GETOPT_INCLUDE_DIR   - where to find getopt.h, etc.
-# GETOPT_LIBRARIES - List of libraries when using getopt.
-# GETOPT_FOUND - True if getopt found.
-
-##find_path(HAVE_GETOPT_H "getopt.h")
-##check_symbol_exists("getopt_long" "getopt.h" HAVE_GETOPT_LONG)
-
-##find_library(GETOPT_LIB "getopt.lib")
-#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@
-#cmakedefine HAVE_GETOPT_LONG @HAVE_GETOPT_LONG@
-
-#define HAVE_GETOPT_LONG 1
-#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@
-#cmakedefine GETOPT_LIB @GETOPT_LIB@
diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -74,10 +74,6 @@ function(monetdb_configure_defines)
   check_function_exists("getentropy" HAVE_GETENTROPY)
   check_function_exists("getexecname" HAVE_GETEXECNAME)
   check_function_exists("getlogin" HAVE_GETLOGIN)
-  cmake_push_check_state()
-set(CMAKE_REQUIRED_INCLUDES "${HAVE_GETOPT_H}")
-check_symbol_exists("getopt_long" "getopt.h" HAVE_GETOPT_LONG)
-  cmake_pop_check_state()
   check_function_exists("getrlimit" HAVE_GETRLIMIT)
   check_function_exists("gettid" HAVE_GETTID)
   check_function_exists("gettimeofday" HAVE_GETTIMEOFDAY)
@@ -175,9 +171,6 @@ macro(monetdb_macro_variables)
 CACHE
 INTERNAL
 "C udfs extension is available")
-  if(HAVE_GETOPT_H)
-set(HAVE_GETOPT 1)
-  endif()
   # compiler options, profiling (google perf tools), valgrind
   # Check that posix regex is available when pcre is not found
   # "monetdb5/module/mal/pcre.c" assumes the regex library is available
diff --git a/common/options/CMakeLists.txt b/common/options/CMakeLists.txt
--- a/common/options/CMakeLists.txt
+++ b/common/options/CMakeLists.txt
@@ -11,8 +11,7 @@
 #]]
 
 set(moptions_public_headers
-  ${CMAKE_CURRENT_SOURCE_DIR}/monet_options.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/monet_getopt.h)
+  ${CMAKE_CURRENT_SOURCE_DIR}/monet_options.h)
 
 add_library(moptions
   STATIC)
@@ -24,16 +23,13 @@ target_sources(moptions
   ${moptions_public_headers})
 
 target_include_directories(moptions
-  PRIVATE
-  $<$:${HAVE_GETOPT_H}>
   PUBLIC
   $
   $)
 
 target_link_libraries(moptions
   PRIVATE
-  monetdb_config_header
-  $<$:${GETOPT_LIB}>)
+  monetdb_config_header)
 
 if(NOT MONETDB_STATIC)
   set_target_properties(moptions
@@ -44,7 +40,6 @@ endif()
 
 install(FILES
   monet_options.h
-  monet_getopt.h
   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb
   COMPONENT
   monetdbdev)
diff --git a/common/options/getopt.c b/common/options/getopt.c
deleted file mode 100644
--- a/common/options/getopt.c
+++ /dev/null
@@ -1,941 +0,0 @@
-/*
- * SPDX-License-Identifier: MPL-2.0
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0.  If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2024, 2025 MonetDB Foundation;
- * Copyright August 2008 - 2023 MonetDB B.V.;
- * Copyright 1997 - July 2008 CWI.
- */
-
-/* Getopt for GNU.
-   NOTE: getopt is now part of the C library, so if you don't know what
-   "Keep this file name-space clean" means, talk to drep...@gnu.org
-   before changing it!
-   Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed

MonetDB: odbc_loader - link in some more libraries

2025-02-01 Thread Niels Nes via checkin-list
Changeset: 3560745efc4e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3560745efc4e
Modified Files:
sql/backends/monet5/vaults/odbc/CMakeLists.txt
sql/server/rel_remote.h
Branch: odbc_loader
Log Message:

link in some more libraries


diffs (45 lines):

diff --git a/sql/backends/monet5/vaults/odbc/CMakeLists.txt 
b/sql/backends/monet5/vaults/odbc/CMakeLists.txt
--- a/sql/backends/monet5/vaults/odbc/CMakeLists.txt
+++ b/sql/backends/monet5/vaults/odbc/CMakeLists.txt
@@ -21,8 +21,8 @@ if(ODBC_FOUND)
 PRIVATE
 $<$:${ODBC_INCLUDE_DIRS}>
 $
+$
 $
-$
 $
 $
 $
@@ -33,9 +33,10 @@ if(ODBC_FOUND)
   target_link_libraries(odbc_loader
 PRIVATE
 monetdb_config_header
-bat
+sqlinclude
+sql
 monetdb5
-sqlinclude)
+bat)
 
   set_target_properties(odbc_loader
 PROPERTIES
diff --git a/sql/server/rel_remote.h b/sql/server/rel_remote.h
--- a/sql/server/rel_remote.h
+++ b/sql/server/rel_remote.h
@@ -16,12 +16,11 @@
 #include "sql_relation.h"
 #include "msettings.h"
 
-// maybe this needs to be somewhere more global?
-extern msettings *sa_msettings_create(allocator *sa);
-extern char *sa_msettings_to_string(const msettings *mp, allocator *sa, size_t 
size_hint);
+sql_export msettings *sa_msettings_create(allocator *sa);
+sql_export char *sa_msettings_to_string(const msettings *mp, allocator *sa, 
size_t size_hint);
 
 sql_export int mapiuri_valid( const char *uri, allocator *sa);
-extern const char *mapiuri_uri(const char *uri, allocator *sa);
+sql_export const char *mapiuri_uri(const char *uri, allocator *sa);
 extern const char *mapiuri_schema(const char *uri, allocator *sa, const char 
*fallback);
 extern const char *mapiuri_table(const char *uri, allocator *sa, const char 
*fallback);
 
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: odbc_loader - include mal_exception/client

2025-02-01 Thread Niels Nes via checkin-list
Changeset: 606bb4ca95a0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/606bb4ca95a0
Modified Files:
sql/backends/monet5/vaults/odbc/odbc_loader.c
Branch: odbc_loader
Log Message:

include mal_exception/client


diffs (13 lines):

diff --git a/sql/backends/monet5/vaults/odbc/odbc_loader.c 
b/sql/backends/monet5/vaults/odbc/odbc_loader.c
--- a/sql/backends/monet5/vaults/odbc/odbc_loader.c
+++ b/sql/backends/monet5/vaults/odbc/odbc_loader.c
@@ -14,6 +14,9 @@
 #include "rel_proto_loader.h"
 #include "rel_exp.h"
 
+#include "mal_exception.h"
+#include "mal_client.h"
+
 //#ifdef _MSC_VER
 //#include 
 //#endif
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: nested - merged with default

2025-02-01 Thread Niels Nes via checkin-list
Changeset: c12bfa6f1c98 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c12bfa6f1c98
Modified Files:
sql/server/CMakeLists.txt
sql/server/rel_optimize_sel.c
Branch: nested
Log Message:

merged with default


diffs (truncated from 4396 to 300 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -18,12 +18,8 @@
  */
 
 #include "monetdb_config.h"
-#ifndef HAVE_GETOPT_LONG
-#  include "monet_getopt.h"
-#else
-# ifdef HAVE_GETOPT_H
-#  include "getopt.h"
-# endif
+#ifdef HAVE_GETOPT_H
+#include "getopt.h"
 #endif
 #include "stream.h"
 #include "mapi.h"
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -11,12 +11,8 @@
  */
 
 #include "monetdb_config.h"
-#ifndef HAVE_GETOPT_LONG
-#  include "monet_getopt.h"
-#else
-# ifdef HAVE_GETOPT_H
-#  include "getopt.h"
-# endif
+#ifdef HAVE_GETOPT_H
+#include "getopt.h"
 #endif
 #include "mapi.h"
 #include 
diff --git a/cmake/Modules/FindGetopt.cmake b/cmake/Modules/FindGetopt.cmake
deleted file mode 100644
--- a/cmake/Modules/FindGetopt.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-# - Find Getopt
-# Find the native getopt headers and libraries.
-#
-# GETOPT_INCLUDE_DIR   - where to find getopt.h, etc.
-# GETOPT_LIBRARIES - List of libraries when using getopt.
-# GETOPT_FOUND - True if getopt found.
-
-##find_path(HAVE_GETOPT_H "getopt.h")
-##check_symbol_exists("getopt_long" "getopt.h" HAVE_GETOPT_LONG)
-
-##find_library(GETOPT_LIB "getopt.lib")
-#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@
-#cmakedefine HAVE_GETOPT_LONG @HAVE_GETOPT_LONG@
-
-#define HAVE_GETOPT_LONG 1
-#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@
-#cmakedefine GETOPT_LIB @GETOPT_LIB@
diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -74,10 +74,6 @@ function(monetdb_configure_defines)
   check_function_exists("getentropy" HAVE_GETENTROPY)
   check_function_exists("getexecname" HAVE_GETEXECNAME)
   check_function_exists("getlogin" HAVE_GETLOGIN)
-  cmake_push_check_state()
-set(CMAKE_REQUIRED_INCLUDES "${HAVE_GETOPT_H}")
-check_symbol_exists("getopt_long" "getopt.h" HAVE_GETOPT_LONG)
-  cmake_pop_check_state()
   check_function_exists("getrlimit" HAVE_GETRLIMIT)
   check_function_exists("gettid" HAVE_GETTID)
   check_function_exists("gettimeofday" HAVE_GETTIMEOFDAY)
@@ -175,9 +171,6 @@ macro(monetdb_macro_variables)
 CACHE
 INTERNAL
 "C udfs extension is available")
-  if(HAVE_GETOPT_H)
-set(HAVE_GETOPT 1)
-  endif()
   # compiler options, profiling (google perf tools), valgrind
   # Check that posix regex is available when pcre is not found
   # "monetdb5/module/mal/pcre.c" assumes the regex library is available
diff --git a/common/options/CMakeLists.txt b/common/options/CMakeLists.txt
--- a/common/options/CMakeLists.txt
+++ b/common/options/CMakeLists.txt
@@ -11,8 +11,7 @@
 #]]
 
 set(moptions_public_headers
-  ${CMAKE_CURRENT_SOURCE_DIR}/monet_options.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/monet_getopt.h)
+  ${CMAKE_CURRENT_SOURCE_DIR}/monet_options.h)
 
 add_library(moptions
   STATIC)
@@ -24,16 +23,13 @@ target_sources(moptions
   ${moptions_public_headers})
 
 target_include_directories(moptions
-  PRIVATE
-  $<$:${HAVE_GETOPT_H}>
   PUBLIC
   $
   $)
 
 target_link_libraries(moptions
   PRIVATE
-  monetdb_config_header
-  $<$:${GETOPT_LIB}>)
+  monetdb_config_header)
 
 if(NOT MONETDB_STATIC)
   set_target_properties(moptions
@@ -44,7 +40,6 @@ endif()
 
 install(FILES
   monet_options.h
-  monet_getopt.h
   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb
   COMPONENT
   monetdbdev)
diff --git a/common/options/getopt.c b/common/options/getopt.c
deleted file mode 100644
--- a/common/options/getopt.c
+++ /dev/null
@@ -1,941 +0,0 @@
-/*
- * SPDX-License-Identifier: MPL-2.0
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0.  If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2024, 2025 MonetDB Foundation;
- * Copyright August 2008 - 2023 MonetDB B.V.;
- * Copyright 1997 - July 2008 CWI.
- */
-
-/* Getopt for GNU.
-   NOTE: getopt is now part of the C library, so if you don't know what
-   "Keep this file name-space clean" means, talk to drep...@gnu.org
-   before changing it!
-   Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be us