Changeset: cf0bcf23dd9d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf0bcf23dd9d
Branch: Oct2020
Log Message:
merged
diffs (truncated from 1081 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -519,8 +519,6 @@ exit 0
%exclude %{_bindir}/stethoscope
%{_libdir}/libmonetdb5.so.*
%dir %{_libdir}/monetdb5
-%{_libdir}/monetdb5/microbenchmark.mal
-%{_libdir}/monetdb5/run_*.mal
%if %{with cintegration}
%{_libdir}/monetdb5/lib_capi.so
%endif
@@ -819,6 +817,10 @@ install -d -m 0775 %{buildroot}%{_rundir
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/monetdb5/*.la
rm -f %{buildroot}%{_libdir}/monetdb5/lib_opt_sql_append.so
+rm -f %{buildroot}%{_libdir}/monetdb5/run_*.mal
+rm -f %{buildroot}%{_libdir}/monetdb5/lib_run_*.so
+rm -f %{buildroot}%{_libdir}/monetdb5/microbenchmark.mal
+rm -f %{buildroot}%{_libdir}/monetdb5/lib_microbenchmark*.so
rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh
rm -rf %{buildroot}%{_datadir}/monetdb # /cmake
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -171,11 +171,9 @@ def main():
print(r' <Directory Id="lib" Name="lib">')
print(r' <Directory Id="monetdb5" Name="monetdb5">')
id = comp(features, id, 16,
- [r'lib\monetdb5\microbenchmark.mal'])
- id = comp(features, id, 16,
- [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x:
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' not
in x) and ('opt_sql_append' not in x), os.listdir(os.path.join(sys.argv[3],
'lib', 'monetdb5'))))])
+ [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x:
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' not
in x) and ('opt_sql_append' not in x) and ('run_' not in x) and
('microbenchmark' not in x), os.listdir(os.path.join(sys.argv[3], 'lib',
'monetdb5'))))])
id = comp(debug, id, 16,
- [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x:
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and
('opt_sql_append' not in x), os.listdir(os.path.join(sys.argv[3], 'lib',
'monetdb5'))))])
+ [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x:
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and
('opt_sql_append' not in x) and ('run_' not in x) and ('microbenchmark' not in
x), os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5'))))])
id = comp(geom, id, 16,
[r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x:
x.startswith('_') and (x.endswith('.dll') or x.endswith('.pdb')) and ('geom' in
x), os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5'))))])
id = comp(pyapi3, id, 16,
diff --git a/common/stream/stdio_stream.c b/common/stream/stdio_stream.c
--- a/common/stream/stdio_stream.c
+++ b/common/stream/stdio_stream.c
@@ -410,9 +410,6 @@ stream *
stdin_rastream(void)
{
const char *name = "<stdin>";
-#ifdef _MSC_VER
- return win_console_in_stream(name);
-#else
// Make an attempt to skip a BOM marker.
// It would be nice to integrate this with with the BOM removal code
// in text_stream.c but that is complicated. In text_stream,
@@ -433,6 +430,9 @@ stdin_rastream(void)
}
}
+#ifdef _MSC_VER
+ return win_console_in_stream(name);
+#else
return file_rstream(stdin, false, name);
#endif
}
diff --git a/common/utils/CMakeLists.txt b/common/utils/CMakeLists.txt
--- a/common/utils/CMakeLists.txt
+++ b/common/utils/CMakeLists.txt
@@ -63,7 +63,7 @@ target_link_libraries(mcrypt
if(WIN32)
target_compile_definitions(mcrypt
PRIVATE
- LIBMAL
+ LIBMONETDB5
LIBMAPI
LIBMCRYPT)
endif()
@@ -102,12 +102,7 @@ target_link_libraries(msabaoth
if(WIN32)
target_compile_definitions(msabaoth
PRIVATE
- LIBMAL
- LIBATOMS
- LIBKERNEL
LIBMSABAOTH
- LIBOPTIMIZER
- LIBSCHEDULER
LIBMONETDB5)
endif()
diff --git a/common/utils/mcrypt.h b/common/utils/mcrypt.h
--- a/common/utils/mcrypt.h
+++ b/common/utils/mcrypt.h
@@ -10,7 +10,7 @@
#define _SEEN_MCRYPT_H 1
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
-#if !defined(LIBMAPI) && !defined(LIBMCRYPT) && !defined(LIBMAL)
+#if !defined(LIBMAPI) && !defined(LIBMCRYPT) && !defined(LIBMONETDB5)
#define mcrypt_export extern __declspec(dllimport)
#else
#define mcrypt_export extern __declspec(dllexport)
@@ -45,4 +45,3 @@ mcrypt_export char *mcrypt_RIPEMD160Sum(
mcrypt_export char *mcrypt_BackendSum(const char *string, size_t len);
mcrypt_export char *mcrypt_hashPassword(const char *algo, const char
*password, const char *challenge);
#endif
-
diff --git a/common/utils/msabaoth.h b/common/utils/msabaoth.h
--- a/common/utils/msabaoth.h
+++ b/common/utils/msabaoth.h
@@ -56,7 +56,7 @@ typedef struct Ssabuplog {
} sabuplog;
#ifdef WIN32
-#if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) &&
!defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) &&
!defined(LIBMONETDB5) && !defined(LIBMSABAOTH)
+#if !defined(LIBMONETDB5) && !defined(LIBMSABAOTH)
#define msab_export extern __declspec(dllimport)
#else
#define msab_export extern __declspec(dllexport)
diff --git a/ctest/monetdb5/mal/CMakeLists.txt
b/ctest/monetdb5/mal/CMakeLists.txt
--- a/ctest/monetdb5/mal/CMakeLists.txt
+++ b/ctest/monetdb5/mal/CMakeLists.txt
@@ -15,7 +15,7 @@ target_link_libraries(test_malEmbeddedBo
mal
${CMAKE_DL_LIBS}
Threads::Threads)
-target_compile_definitions(test_malEmbeddedBoot PRIVATE LIBMAL)
+target_compile_definitions(test_malEmbeddedBoot PRIVATE LIBMONETDB5)
add_test(malEmbeddedBoot test_malEmbeddedBoot)
add_executable(test_malInclude test_malInclude.c)
@@ -27,5 +27,5 @@ target_link_libraries(test_malInclude
mal
${CMAKE_DL_LIBS}
Threads::Threads)
-target_compile_definitions(test_malInclude PRIVATE LIBMAL)
+target_compile_definitions(test_malInclude PRIVATE LIBMONETDB5)
add_test(malInclude test_malInclude)
diff --git a/debian/monetdb5-server.install b/debian/monetdb5-server.install
--- a/debian/monetdb5-server.install
+++ b/debian/monetdb5-server.install
@@ -1,10 +1,7 @@
debian/tmp/usr/bin/mserver5 usr/bin
debian/tmp/usr/lib/x86_64-linux-gnu/libmonetdb5.so.* usr/lib/x86_64-linux-gnu
-# usr/lib/x86_64-linux-gnu/monetdb5/lib_*.so EXCEPT:
lib_{fits,geom,gsl,opt_sql_append,pyapi*,rapi,sql}.so
+# usr/lib/x86_64-linux-gnu/monetdb5/lib_*.so EXCEPT:
lib_{fits,geom,gsl,microbenchmark,opt_sql_append,pyapi*,rapi,run_*,sql}.so
debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_capi.so
usr/lib/x86_64-linux-gnu/monetdb5
debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_generator.so
usr/lib/x86_64-linux-gnu/monetdb5
debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_udf.so
usr/lib/x86_64-linux-gnu/monetdb5
-
-debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/microbenchmark.mal
usr/lib/x86_64-linux-gnu/monetdb5
-debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/run_*.mal
usr/lib/x86_64-linux-gnu/monetdb5
diff --git a/monetdb5/mal/CMakeLists.txt b/monetdb5/mal/CMakeLists.txt
--- a/monetdb5/mal/CMakeLists.txt
+++ b/monetdb5/mal/CMakeLists.txt
@@ -51,7 +51,7 @@ target_sources(mal
mal_type.c
mal_utils.c mal_utils.h
mal_embedded.c mal_embedded.h
- mal_private.h
+ mal_private.h mal_internal.h
mal_prelude.c
mel.h
PUBLIC
@@ -65,10 +65,6 @@ target_include_directories(mal
target_compile_definitions(mal
PRIVATE
LIBMAL
- LIBATOMS
- LIBKERNEL
- LIBOPTIMIZER
- LIBSCHEDULER
LIBMONETDB5)
target_link_libraries(mal
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -17,7 +17,7 @@
#include "gdk.h"
#ifdef WIN32
-#if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) &&
!defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) &&
!defined(LIBMONETDB5)
+#ifndef LIBMONETDB5
#define mal_export extern __declspec(dllimport)
#else
#define mal_export extern __declspec(dllexport)
diff --git a/monetdb5/mal/mal_internal.h b/monetdb5/mal/mal_internal.h
new file mode 100644
--- /dev/null
+++ b/monetdb5/mal/mal_internal.h
@@ -0,0 +1,16 @@
+/*
+ * 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 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V.
+ */
+
+/* This file should not be included in any file outside of the monetdb5
library */
+
+#ifndef LIBMONETDB5
+#error this file should not be included outside its source directory
+#endif
+
+void setqptimeout(lng usecs)
+ __attribute__((__visibility__("hidden")));
diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -1054,14 +1054,14 @@ parseInclude(Client cntxt)
return 0;
}
- /*
- s = loadLibrary(modnme, FALSE);
- if (s) {
- parseError(cntxt, s);
- freeException(s);
- return 0;
+ if (getModule(modnme) == NULL) {
+ s = loadLibrary(modnme, FALSE);
+ if (s) {
+ parseError(cntxt, s);
+ freeException(s);
+ return 0;
+ }
}
- */
if ((s = malInclude(cntxt, modnme, 0))) {
parseError(cntxt, s);
freeException(s);
diff --git a/monetdb5/mal/mal_private.h b/monetdb5/mal/mal_private.h
--- a/monetdb5/mal/mal_private.h
+++ b/monetdb5/mal/mal_private.h
@@ -48,9 +48,6 @@ str malAtomDefinition(str name,int tpe)
str malAtomProperty(MalBlkPtr mb, InstrPtr pci)
__attribute__((__visibility__("hidden")));
-void setqptimeout(lng usecs)
- __attribute__((__visibility__("hidden")));
-
bool mdbInit(void)
__attribute__((__visibility__("hidden")));
void mdbExit(void)
diff --git a/monetdb5/modules/atoms/CMakeLists.txt
b/monetdb5/modules/atoms/CMakeLists.txt
--- a/monetdb5/modules/atoms/CMakeLists.txt
+++ b/monetdb5/modules/atoms/CMakeLists.txt
@@ -49,11 +49,6 @@ if(WIN32)
target_compile_definitions(atoms
PRIVATE
- LIBMAL
- LIBATOMS
- LIBKERNEL
- LIBOPTIMIZER
- LIBSCHEDULER
LIBMONETDB5)
target_link_libraries(atoms
diff --git a/monetdb5/modules/kernel/CMakeLists.txt
b/monetdb5/modules/kernel/CMakeLists.txt
--- a/monetdb5/modules/kernel/CMakeLists.txt
+++ b/monetdb5/modules/kernel/CMakeLists.txt
@@ -7,6 +7,7 @@
#]]
add_library(kernel OBJECT)
+add_library(microbenchmark MODULE)
target_sources(kernel
PRIVATE
@@ -20,7 +21,11 @@ target_sources(kernel
batmmath.c
batstr.c
batcolor.c
- microbenchmark.c microbenchmark.h
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/bat5.h)
+target_sources(microbenchmark
+ PRIVATE
+ microbenchmark.c
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/bat5.h)
@@ -28,15 +33,14 @@ target_include_directories(kernel
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${INCLUDEDIR}/monetdb>)
+target_include_directories(microbenchmark
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:${INCLUDEDIR}/monetdb>)
if(WIN32)
target_compile_definitions(kernel
PRIVATE
- LIBMAL
- LIBATOMS
- LIBKERNEL
- LIBOPTIMIZER
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list