Changeset: 5b74cd4bd4c4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5b74cd4bd4c4
Modified Files:
buildtools/autogen/autogen.py
buildtools/autogen/autogen/am.py
buildtools/autogen/autogen/msc.py
clients/mapiclient/mnc.c
common/stream/stream_socket.h
common/utils/mutils.c
common/utils/mutils.h
configure.ag
gdk/gdk.h
gdk/gdk_logger.c
gdk/gdk_posix.c
gdk/gdk_posix.h
gdk/gdk_private.h
gdk/gdk_system.h
gdk/gdk_utils.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/remote.c
monetdb5/tools/Makefile.ag
Branch: default
Log Message:
Merge with Aug2018 branch.
diffs (truncated from 736 to 300 lines):
diff --git a/buildtools/autogen/autogen.py b/buildtools/autogen/autogen.py
--- a/buildtools/autogen/autogen.py
+++ b/buildtools/autogen/autogen.py
@@ -163,7 +163,7 @@ def filter(st):
return st + '\n'
return ''
-OutList.sort(key=lambda x: x.count(os.sep))
+OutList.sort(key=lambda x: x.count('/'))
OutList = map(filter, OutList)
OutListFd = open("acout.in", "w")
OutListFd.writelines(OutList)
diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py
+++ b/buildtools/autogen/autogen/am.py
@@ -762,6 +762,8 @@ def am_library(fd, var, libmap, am):
if 'MODULE' in libmap:
ldflags.append('-module')
ldflags.append('-avoid-version')
+ if 'NOINST' not in libmap:
+ ldflags.append('@NO_UNDEFINED@')
if "LDFLAGS" in libmap:
for x in libmap["LDFLAGS"]:
ldflags.append(x)
diff --git a/buildtools/autogen/autogen/msc.py
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -123,25 +123,24 @@ def msc_libdir(fd, var, values, msc):
def msc_mtsafe(fd, var, values, msc):
fd.write("CFLAGS=$(CFLAGS) $(thread_safe_flag_spec)\n")
-def msc_add_srcdir(path, msc, prefix =""):
- dir = path
+def msc_add_srcdir(dir, msc, prefix = ""):
if dir[0] == '$':
return ""
elif not os.path.isabs(dir):
- dir = "$(srcdir)/" + dir
+ return prefix + "$(srcdir)\\" + dir.replace('/', '\\')
else:
return ""
- return prefix+dir.replace('/', '\\')
def msc_translate_dir(path, msc):
- dir = path
- rest = ""
- if path.find('/') >= 0:
- dir, rest = path.split('/', 1)
+ path = path.replace('/' , '\\')
+ if path.find('\\') >= 0:
+ dir, rest = path.split('\\', 1)
+ else:
+ dir, rest = path, ''
if dir == "top_builddir":
dir = "$(TOPDIR)"
elif dir == "top_srcdir":
- dir = "$(TOPDIR)/.."
+ dir = "$(TOPDIR)\\.."
elif dir == "builddir":
dir = "."
elif dir == "srcdir":
@@ -155,12 +154,12 @@ def msc_translate_dir(path, msc):
dir = "$("+dir+")"
if rest:
dir = dir+ "\\" + rest
- return dir.replace('/', '\\')
+ return dir
def msc_translate_file(path, msc):
if os.path.isfile(os.path.join(msc['cwd'], path)):
- return "$(srcdir)\\" + path
- return path
+ path = "$(srcdir)/" + path
+ return path.replace('/', '\\')
def msc_space_sep_list(l):
res = ""
@@ -321,8 +320,8 @@ def msc_dep(fd, tar, deplist, msc):
msc['_IN'].append(y)
getsrc = ""
src = msc_translate_dir(msc_translate_ext(msc_translate_file(deplist[0],
msc)), msc)
- if os.path.split(src)[0]:
- getsrc = '\t$(INSTALL) "%s" "%s"\n' % (src, os.path.split(src)[1])
+ if '\\' in src:
+ getsrc = '\t$(INSTALL) "%s" "%s"\n' % (src, src.split('\\')[-1])
if ext == "tab.h":
fd.write(getsrc)
x, de = split_filename(deplist[0])
diff --git a/clients/mapiclient/mnc.c b/clients/mapiclient/mnc.c
--- a/clients/mapiclient/mnc.c
+++ b/clients/mapiclient/mnc.c
@@ -30,7 +30,7 @@
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
-#ifdef NATIVE_WIN32
+#ifdef HAVE_WINSOCK_H
# include <winsock.h>
#endif
#ifdef HAVE_NETDB_H
diff --git a/common/stream/stream_socket.h b/common/stream/stream_socket.h
--- a/common/stream/stream_socket.h
+++ b/common/stream/stream_socket.h
@@ -15,7 +15,7 @@
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef NATIVE_WIN32
+#ifdef HAVE_WINSOCK_H
# include <winsock.h>
#endif
diff --git a/common/utils/mutils.c b/common/utils/mutils.c
--- a/common/utils/mutils.c
+++ b/common/utils/mutils.c
@@ -444,7 +444,7 @@ get_bin_path(void)
{
/* getting the path to the executable's binary, isn't all that
* simple, unfortunately */
-#ifdef WIN32
+#ifdef NATIVE_WIN32
if (GetModuleFileName(NULL, _bin_path,
(DWORD) sizeof(_bin_path)) != 0)
return _bin_path;
@@ -479,7 +479,7 @@ get_bin_path(void)
if (realpath(execn, _bin_path) != NULL)
return(_bin_path);
}
-#else /* try Linux approach */
+#else /* try Linux approach, also works on Cygwin */
if (readlink("/proc/self/exe",
_bin_path, sizeof(_bin_path)) != -1)
return _bin_path;
diff --git a/common/utils/mutils.h b/common/utils/mutils.h
--- a/common/utils/mutils.h
+++ b/common/utils/mutils.h
@@ -9,7 +9,7 @@
#ifndef _MUTILS_H_
#define _MUTILS_H_
-#ifdef NATIVE_WIN32
+#ifdef WIN32
#if !defined(LIBMUTILS) && !defined(LIBGDK) && !defined(LIBMEROUTIL)
#define mutils_export extern __declspec(dllimport)
#else
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -588,7 +588,9 @@ AS_VAR_IF([enable_strict], [yes], [
MCHECK_ADD_FLAG([-Wno-format-truncation])
MCHECK_ADD_FLAG([-Wno-format-nonliteral])
dnl MCHECK_ADD_FLAG([-Wformat-signedness]) -- numpy messes this up
- MCHECK_ADD_FLAG([-Wno-cast-function-type])
+ AS_VAR_IF([target_os], [cygwin],
+
[MCHECK_ADD_FLAG([-Wno-error=suggest-attribute=format])],
+ [MCHECK_ADD_FLAG([-Wno-cast-function-type])])
MCHECK_ADD_FLAG([-Winit-self])
MCHECK_ADD_FLAG([-Winvalid-pch])
MCHECK_ADD_FLAG([-Wmissing-declarations])
@@ -764,6 +766,9 @@ AC_LINK_IFELSE([
[result=yes],
[LDFLAGS="$save_LDFLAGS"; result=no])
AC_MSG_RESULT([$result])
+AS_VAR_IF([target_os], [cygwin],
+ [NO_UNDEFINED="-no-undefined"])
+AC_SUBST(NO_UNDEFINED)
# icc needs -fPIC (but the current autoconf still uses -KPIC)
AS_CASE([$GCC-$CC-$host_os],
@@ -1774,7 +1779,7 @@ AC_ARG_WITH([libxml2],
[include libxml2 support (default=yes)])],
[have_libxml2=$withval])
AS_VAR_IF([have_libxml2], [no], [], [
- PKG_CHECK_MODULES([libxml2], [libxml-2.0], [have_libxml2="yes"],
[have_libxml2="no"; why_not_libxml2="(libxml2 not found)"])
+ PKG_CHECK_MODULES([libxml2], [libxml-2.0], [have_libxml2=yes],
[have_libxml2=no; why_not_libxml2="(libxml2 not found)"])
AS_VAR_IF([have_libxml2], [yes], [
AC_DEFINE([HAVE_LIBXML], 1, [Define if you have the xml
library])])])
AM_CONDITIONAL([HAVE_LIBXML], [test x"$have_libxml2" != xno])
@@ -1787,14 +1792,14 @@ AC_ARG_WITH([curl],
[include cURL support (default=yes)])],
[have_curl=$withval])
AS_VAR_IF([have_curl], [no], [], [
- PKG_CHECK_MODULES([curl], [libcurl], [have_curl="yes"],
[have_curl="no"; why_not_curl="(libcurl not found)"])
+ PKG_CHECK_MODULES([curl], [libcurl], [have_curl=yes], [have_curl=no;
why_not_curl="(libcurl not found)"])
AS_VAR_IF([have_curl], [yes], [
AC_DEFINE([HAVE_CURL], 1, [Define if you have the cURL library])
AC_SUBST([PKG_CURL], [libcurl])])])
AM_CONDITIONAL([HAVE_CURL], [test x"$have_curl" != xno])
-PKG_CHECK_MODULES([zlib], [zlib], [have_zlib="yes"], [have_zlib="no";
why_not_zlib="(zlib not found)"])
+PKG_CHECK_MODULES([zlib], [zlib], [have_zlib=yes], [have_zlib=no;
why_not_zlib="(zlib not found)"])
AS_CASE([$have_zlib],
[no],
[# Solaris doesn't provide zlib.pc, but zlib may well be present
@@ -1812,7 +1817,7 @@ AC_ARG_WITH([lzma],
[include lzma support (default=yes)])],
[have_lzma=$withval])
AS_VAR_IF([have_lzma], [no], [], [
- PKG_CHECK_MODULES([liblzma], [liblzma], [have_liblzma="yes"],
[have_liblzma="no"; why_not_liblzma="(liblzma not found, install xz-libs and
xz-devel)"])
+ PKG_CHECK_MODULES([liblzma], [liblzma], [have_liblzma=yes],
[have_liblzma=no; why_not_liblzma="(liblzma not found, install xz-libs and
xz-devel)"])
AS_VAR_IF([have_liblzma], [yes], [
AC_SUBST([PKG_LIBLZMA], [liblzma])])
AS_VAR_IF([have_liblzma], [yes], [
@@ -1842,7 +1847,7 @@ AS_VAR_IF([enable_rintegration], [no], [
AS_VAR_IF([RCMD], [],
[AS_VAR_IF([enable_rintegration], [yes],
[AC_MSG_ERROR([libR library required for R integration
support])],
- [have_libr="no"
+ [have_libr=no
why_not_libr="(libR library not found)"
enable_rintegration=no
why_not_rintegration="(libR library not found)"])],
@@ -1869,51 +1874,51 @@ AS_VAR_IF([enable_pyintegration], [no],
AC_PATH_PROG([PYCMD2], [python-config], [no], [$PATH])
AS_VAR_IF([PYCMD2], [no], [
AS_VAR_IF([enable_pyintegration], [yes],
- [AC_MSG_ERROR([python2-config library required
for Python integration support])],
- [have_libpy="no"
- why_not_libpy="(python2-config command not
found)"
- enable_pyintegration="no"
- why_not_pyintegration="(python2-config command
not found)"
- ])
+ [AC_MSG_ERROR([python2-config library
required for Python integration support])],
+ [have_libpy=no
+ why_not_libpy="(python2-config command
not found)"
+ enable_pyintegration=no
+ why_not_pyintegration="(python2-config
command not found)"])
], [PY2CONFIG="$PYCMD2"])
], [])
], [PY2CONFIG="$have_py2config"])
- PYTHON_CMD=$PYTHON2
- NUMPYVER=`$PYTHON_CMD -c "import numpy;
print(int(numpy.__version__.split('.').__getitem__(1)) >= 7)" 2> /dev/null`
- # check numpyconfig.h because autoconf tests includes by
- # compiling a small C program, and other numpy headers do
- # not compile without Python.h
- AC_CHECK_HEADER([numpy/numpyconfig.h],
- [NUMPYHEADERS=True],
- [NUMPYHEADERS=`$PYTHON_CMD -c "import numpy, os;
print(os.path.isfile(os.path.join(numpy.get_include(),
'numpy/arrayobject.h')))" 2> /dev/null`])
- AS_IF([test "x$NUMPYVER" = x || test "x$NUMPYVER" = xFalse],
- [AS_VAR_IF([enable_pyintegration], [yes],
- [AC_MSG_ERROR([numpy version >= 1.7.0 required for
Python integration support])],
- [have_libpy="no"
- why_not_libpy="(numpy version >= 1.7.0 not found)"
- enable_pyintegration="no"
- why_not_pyintegration="(numpy version >= 1.7.0 not
found)"])],
- [test "x$NUMPYHEADERS" = xFalse ],
- [AS_VAR_IF([enable_pyintegration], [yes],
- [AC_MSG_ERROR([numpy/arrayobject.h not found])],
- [have_libpy="no"
- why_not_libpy="(numpy/arrayobject.h not found)"
- enable_pyintegration="no"
- why_not_pyintegration="(numpy/arrayobject.h not
found)"])],
- [libpy_CFLAGS=`$PYTHON_CMD -c "from distutils.sysconfig import
get_python_inc; import numpy; print(' -I' + get_python_inc() + ' -I' +
numpy.get_include());" 2> /dev/null`
- libpy_LIBS=`$PY2CONFIG --ldflags`
- HAVEPYTHONHEADER=`$PYTHON_CMD -c "import distutils.sysconfig,
os; print(os.path.isfile(os.path.join(distutils.sysconfig.get_python_inc(),
'Python.h')))" 2> /dev/null`
- AS_VAR_IF([HAVEPYTHONHEADER], [True],
- [have_libpy=yes
- AC_DEFINE([HAVE_LIBPY], 1, [Define if we can link to
python])
- AC_SUBST([libpy_CFLAGS], [$libpy_CFLAGS])
- AC_SUBST([libpy_LIBS], [$libpy_LIBS])],
+ AS_VAR_IF([enable_pyintegration], [no], [], [
+ PYTHON_CMD=$PYTHON2
+ NUMPYVER=`$PYTHON_CMD -c "import numpy;
print(int(numpy.__version__.split('.').__getitem__(1)) >= 7)" 2> /dev/null`
+ # check numpyconfig.h because autoconf tests includes by
+ # compiling a small C program, and other numpy headers do
+ # not compile without Python.h
+ AC_CHECK_HEADER([numpy/numpyconfig.h],
+ [NUMPYHEADERS=True],
+ [NUMPYHEADERS=`$PYTHON_CMD -c "import numpy, os;
print(os.path.isfile(os.path.join(numpy.get_include(),
'numpy/arrayobject.h')))" 2> /dev/null`])
+ AS_IF([test "x$NUMPYVER" = x || test "x$NUMPYVER" = xFalse],
+ [AS_VAR_IF([enable_pyintegration], [yes],
+ [AC_MSG_ERROR([numpy version >= 1.7.0 required
for Python integration support])],
+ [have_libpy=no
+ why_not_libpy="(numpy version >= 1.7.0 not
found)"
+ enable_pyintegration=no
+ why_not_pyintegration="(numpy version >= 1.7.0
not found)"])],
+ [test "x$NUMPYHEADERS" = xFalse ],
[AS_VAR_IF([enable_pyintegration], [yes],
- [AC_MSG_ERROR([Python.h not found])],
- [have_libpy="no"
- why_not_libpy="Python.h not found"
- enable_pyintegration="no"
- why_not_pyintegration="Python.h not
found"])])])])
+ [AC_MSG_ERROR([numpy/arrayobject.h not found])],
+ [have_libpy=no
+ why_not_libpy="(numpy/arrayobject.h not found)"
+ enable_pyintegration=no
+ why_not_pyintegration="(numpy/arrayobject.h
not found)"])],
+ [libpy_CFLAGS=`$PYTHON_CMD -c "from distutils.sysconfig
import get_python_inc; import numpy; print(' -I' + get_python_inc() + ' -I' +
numpy.get_include());" 2> /dev/null`
+ libpy_LIBS=`$PY2CONFIG --ldflags`
+ HAVEPYTHONHEADER=`$PYTHON_CMD -c "import
distutils.sysconfig, os;
print(os.path.isfile(os.path.join(distutils.sysconfig.get_python_inc(),
'Python.h')))" 2> /dev/null`
+ AS_VAR_IF([HAVEPYTHONHEADER], [True],
+ [have_libpy=yes
+ AC_DEFINE([HAVE_LIBPY], 1, [Define if we can
link to python])
+ AC_SUBST([libpy_CFLAGS], [$libpy_CFLAGS])
+ AC_SUBST([libpy_LIBS], [$libpy_LIBS])],
+ [AS_VAR_IF([enable_pyintegration], [yes],
+ [AC_MSG_ERROR([Python.h not found])],
+ [have_libpy=no
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list