Changeset: eefe4e762523 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eefe4e762523 Modified Files: monetdb5/mal/Tests/dataflow00.mal sql/backends/monet5/sql_user.mx sql/backends/monet5/vaults/mseed.mx Branch: sciql Log Message:
Merge with default branch. diffs (truncated from 3325 to 300 lines): diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -795,6 +795,9 @@ # include <netdb.h> # include <netinet/in.h> #endif +#ifdef HAVE_SYS_UIO_H +# include <sys/uio.h> +#endif #ifdef HAVE_MALLOC_H #include <malloc.h> diff --git a/common/utils/mutils.c b/common/utils/mutils.c --- a/common/utils/mutils.c +++ b/common/utils/mutils.c @@ -36,12 +36,12 @@ # include <mach-o/dyld.h> /* _NSGetExecutablePath on OSX >=10.5 */ #endif -#ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> /* realpath on OSX */ +#ifdef HAVE_LIMITS_H +# include <limits.h> /* PATH_MAX on Solaris */ #endif -#ifdef HAVE_LIMITS_H -# include <limits.h> /* PATH_MAX on Solaris */ +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> /* realpath on OSX, prerequisite of sys/sysctl on OpenBSD */ #endif #ifdef HAVE_SYS_SYSCTL_H diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -1272,9 +1272,6 @@ AC_CHECK_PROG(MV,mv,mv -f) AC_PROG_LN_S AC_CHECK_PROG(LOCKFILE,lockfile,lockfile -r 2,echo) -if test x"$LOCKFILE" = x"echo" ; then - AC_MSG_WARN([no lockfile found, please do NOT parallelise the build process!]) -fi AC_CHECK_PROGS(RPMBUILD,rpmbuild rpm) @@ -1598,15 +1595,18 @@ AC_PROG_YACC AC_DEFINE(YYENABLE_NLS, 0, [Needed to compile bison-generated code.]) AC_DEFINE(YYLTYPE_IS_TRIVIAL, 0, [Needed to compile bison-generated code.]) -if test "x$YACC" = x; then - if test "x$enable_sql" = xyes; then - AC_MSG_ERROR([MonetDB/SQL requires YACC or BISON.]) - fi - enable_sql=no - if test "x$disable_sql" = x; then - disable_sql="(MonetDB/SQL requires YACC or BISON.)" - fi -fi +case "$YACC" in + bison*) YACC="$YACC" ;; + *) + if test "x$enable_sql" = xyes; then + AC_MSG_ERROR([MonetDB/SQL requires bison]) + fi + enable_sql=no + if test "x$disable_sql" = x; then + disable_sql="(MonetDB/SQL requires bison)" + fi + ;; +esac AC_CHECK_PROG(TEXI2HTML,texi2html,texi2html) AC_CHECK_PROG(LATEX2HTML,latex2html,latex2html) @@ -1815,16 +1815,14 @@ fi ;; *) - req_java_ver_min=1.5 # >= $req_java_ver_min required - req_java_ver_max=1.6 # < $req_java_ver_max required - if test MONETDB_VERSION_TO_NUMBER(echo $JAVA_VERSION) -ge MONETDB_VERSION_TO_NUMBER(echo "$req_java_ver_min") -a MONETDB_VERSION_TO_NUMBER(echo $JAVA_VERSION) -lt MONETDB_VERSION_TO_NUMBER(echo "$req_java_ver_max"); then + if test MONETDB_VERSION_TO_NUMBER(echo $JAVA_VERSION) = MONETDB_VERSION_TO_NUMBER(echo "1.5") ; then have_java_jdbc=yes else if test "x$enable_jdbc" = xyes; then - AC_MSG_ERROR([MonetDB JDBC requires ant and Java >= $req_java_ver_min, but < $req_java_ver_max.]) + AC_MSG_ERROR([MonetDB JDBC requires ant and Java 1.5]) else enable_jdbc=no - disable_jdbc="(MonetDB JDBC currently requires Java >= $req_java_ver_min, but < $req_java_ver_max to build)" + disable_jdbc="(MonetDB JDBC currently requires Java 1.5 to build)" fi fi ;; @@ -2051,6 +2049,11 @@ AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_INCS) +dnl sysctl is in libc on FreeBSD and NetBSD according to their manpages +C_LIBS="" +AC_CHECK_LIB(c, sysctl, [ C_LIBS="-lc" ] ) +AC_SUBST(C_LIBS) + dnl libreadline have_readline=auto READLINE_LIBS="" @@ -2498,10 +2501,10 @@ sys/param.h \ sys/resource.h \ sys/socket.h \ - sys/sysctl.h \ sys/time.h \ sys/times.h \ sys/types.h \ + sys/uio.h \ sys/un.h \ sys/utime.h \ sys/wait.h \ @@ -2514,6 +2517,15 @@ xmmintrin.h \ ]) +dnl on OpenBSD, sys/sysctl.h requires sys/param.h to be included beforehand +AC_CHECK_HEADERS([sys/sysctl.h], [], [], +[ + #ifdef HAVE_SYS_PARAM_H + # include <sys/param.h> + #endif +]) + + SOCKET_LIBS="" have_setsockopt=no @@ -2541,8 +2553,6 @@ AC_CHECK_LIB(socket, setsockopt, [ SOCKET_LIBS="-lsocket $SOCKET_LIBS"; have_setsockopt=yes; ])) fi -AC_CHECK_HEADERS([sys/socket.h winsock.h]) - have_getaddrinfo=no save_LIBS="$LIBS" LIBS="$LIBS $SOCKET_LIBS" @@ -2965,10 +2975,14 @@ AC_SUBST(QXlocalstatedir) Xlogdir="`$translatepath "$logdir"`" eval "Elogdir=${Xlogdir}" +# need second eval because localstatedir defaults to being ${prefix}/var +eval "Elogdir=${Elogdir}" AC_SUBST(logdir) AC_SUBST(Elogdir) Xrundir="`$translatepath "$rundir"`" eval "Erundir=${Xrundir}" +# need second eval because localstatedir defaults to being ${prefix}/var +eval "Erundir=${Erundir}" AC_SUBST(rundir) AC_SUBST(Erundir) Qlibdir="$libdir" @@ -3229,3 +3243,28 @@ echo echo "* Important options:" echo " OID size: " ${bits} bits +echo + +dnl give some hints to the user +case "`make -v 2>&1`" in +'GNU Make '*) + ;; +*) + echo "'make' not found in PATH or not GNU Make." + case "`gmake -v 2>&1`" in + 'GNU Make '*) + echo "Please use 'gmake' to build MonetDB." + ;; + *) + echo "'gmake' not found in PATH or not GNU Make." + echo "Please make sure you have GNU Make installed and use it to build MonetDB." + ;; + esac + echo + ;; +esac + +if test x"$LOCKFILE" = x"echo" ; then + echo "'lockfile' not found (usually part of a package named procmail)" + echo "Please do NOT parallelise the build process! (use -j1 with make)" +fi diff --git a/gdk/Makefile.ag b/gdk/Makefile.ag --- a/gdk/Makefile.ag +++ b/gdk/Makefile.ag @@ -50,5 +50,5 @@ ../common/stream/libstream \ ../common/utils/libmutils \ $(SOCKET_LIBS) $(zlib_LIBS) $(BZ_LIBS) \ - $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS) + $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS) $(C_LIBS) } diff --git a/gdk/gdk.mx b/gdk/gdk.mx --- a/gdk/gdk.mx +++ b/gdk/gdk.mx @@ -1381,7 +1381,7 @@ do { \ register BUN _p = BUNlast(b); \ if (_p == BUN_MAX || BATcount(b) == BUN_MAX) { \ - GDKerror("bunfastins: bat too large\n"); \ + GDKerror("bunfastins: too many elements to accomodate (INT_MAX)\n"); \ goto bunins_failed; \ } \ if (_p + 1 > BATcapacity(b)) { \ diff --git a/gdk/gdk_system.mx b/gdk/gdk_system.mx --- a/gdk/gdk_system.mx +++ b/gdk/gdk_system.mx @@ -75,6 +75,9 @@ # include <semaphore.h> #endif +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> /* prerequisite of sys/sysctl on OpenBSD */ +#endif #ifdef HAVE_SYS_SYSCTL_H # include <sys/sysctl.h> #endif @@ -855,18 +858,16 @@ #if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN) /* this works on Linux, Solaris and AIX */ ncpus = sysconf(_SC_NPROCESSORS_ONLN); -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__MACH__) +#elif defined(HAVE_SYS_SYSCTL_H) && defined(HW_NCPU) /* BSD */ size_t len = sizeof(int); - - /* sysctl should work on most BSDs (includes Darwin) */ - sysctlbyname("hw.ncpu", &ncpus, &len, NULL, 0); -#elif defined(__OpenBSD__) - size_t len = sizeof(int); - int mib[2]; + int mib[3]; /* Everyone should have permission to make this call, * if we get a failure something is really wrong. */ - sysctl(mib, 2, &ncpus, &len, NULL, 0); + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + mib[2] = -1; + sysctl(mib, 3, &ncpus, &len, NULL, 0); #elif defined(WIN32) SYSTEM_INFO sysinfo; diff --git a/gdk/gdk_utils.mx b/gdk/gdk_utils.mx --- a/gdk/gdk_utils.mx +++ b/gdk/gdk_utils.mx @@ -58,6 +58,9 @@ # include <pwd.h> #endif +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> /* prerequisite of sys/sysctl on OpenBSD */ +#endif #ifdef HAVE_SYS_SYSCTL_H # include <sys/sysctl.h> #endif @@ -468,20 +471,20 @@ GetSystemInfo(&sysInfo); _MT_pagesize = sysInfo.dwPageSize; } -#else -# if defined(HAVE_SYS_SYSCTL_H) && defined(HW_PAGESIZE) +#elif defined(HAVE_SYS_SYSCTL_H) && defined(HW_PAGESIZE) { - int size = 0; - size_t len = sizeof(size); + size_t len = sizeof(_MT_pagesize); + int mib[3]; - sysctlbyname("hw.pagesize", &size, &len, NULL, 0); - _MT_pagesize = size; + /* Everyone should have permission to make this call, + * if we get a failure something is really wrong. */ + mib[0] = CTL_HW; + mib[1] = HW_PAGESIZE; + mib[2] = -1; + sysctl(mib, 3, &_MT_pagesize, &len, NULL, 0); } -# else -# if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) +#elif defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) _MT_pagesize = sysconf(_SC_PAGESIZE); -# endif -# endif #endif if (_MT_pagesize <= 0) _MT_pagesize = 4096; /* default */ @@ -494,32 +497,49 @@ if (GlobalMemoryStatusEx(&memStatEx)) _MT_npages = (size_t) (memStatEx.ullTotalPhys / _MT_pagesize); } -#else -# ifdef HAVE_GLOBALMEMORYSTATUS +#elif defined(HAVE_GLOBALMEMORYSTATUS) if (_MT_npages <= 0) { MEMORYSTATUS memStat; _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list