Changeset: 3b2401cc353f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b2401cc353f
Modified Files:
        NT/monetdb_config.h.in
        NT/rules.msc
        clients/Tests/All
        common/stream/stream.c
        configure.ag
        gdk/gdk_private.h
        gdk/gdk_system_private.h
        geom/lib/libgeom.h
        geom/monetdb5/geom.c
        monetdb5/mal/mal.h
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_private.h
        monetdb5/mal/mal_stack.c
        monetdb5/mal/mal_stack.h
        monetdb5/modules/atoms/blob.c
        monetdb5/modules/atoms/blob.h
        monetdb5/modules/mal/inspect.c
        monetdb5/optimizer/opt_macro.c
        monetdb5/optimizer/opt_reorder.c
        monetdb5/optimizer/opt_wrapper.c
        sql/backends/monet5/Makefile.ag
        sql/backends/monet5/datacell/Tests/All
        sql/backends/monet5/embeddedclient.c.in
        sql/backends/monet5/vaults/Makefile.ag
        sql/jdbc/tests/Tests/All
        sql/test/BugTracker-2011/Tests/All
        sql/test/BugTracker-2012/Tests/All
        sql/test/Dependencies/Tests/All
        sql/test/Tests/All
        sql/test/bugs/Tests/All
        sql/test/leaks/Tests/All
        testing/Mtest.py.in
Branch: default
Log Message:

Various configuration changes.
- Some changes to what gets reported at the end of configure.  All
  features that can be --enable-d are reported (except profile and
  instrument).
- Don't report separately on libraries that are required for features
  (if the feature is enabled, the library must have been found, if the
  feature is disabled, it says why).
- Removed last vestige of alloca().
- Add __hidden flag to private functions (for Solaris).
- Use autoconf's way of having flexibly sized arrays at the end of
  structs (FLEXIBLE_ARRAY_MEMBER -- usually empty), also using
  offsetof to get the correct size to allocate dynamically.


diffs (truncated from 1492 to 300 lines):

diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -29,6 +29,9 @@
  * _MSC_VER = 1800: Visual Studio 12.0
  */
 
+#ifndef _SEEN_MONETDB_CONFIG_H
+#define _SEEN_MONETDB_CONFIG_H 1
+
 /* Prevent pollution through excessive inclusion of include files by
  * Windows.h. */
 #ifndef WIN32_LEAN_AND_MEAN
@@ -40,7 +43,7 @@
 #define _CRT_SECURE_NO_DEPRECATE 1
 #endif
 
-#include <malloc.h>            /* we need malloc.h for alloca() */
+#include <malloc.h>
 
 #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
 /* In this case, malloc and friends are redefined in crtdbg.h to debug
@@ -68,14 +71,6 @@
 /* location where binaries are installed */
 /* #undef BINDIR */
 
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define to 1 if using `alloca.c'. */
-/* #undef C_ALLOCA */
-
 /* Directory separator */
 #define DIR_SEP '\\'
 
@@ -85,13 +80,6 @@
 /* architecture-dependent files */
 #define EXEC_PREFIX PREFIX
 
-/* Define to 1 if you have `alloca', as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-   */
-/* #undef HAVE_ALLOCA_H */
-
 /* Define to 1 if you have the `asctime_r' function. */
 #define HAVE_ASCTIME_R 1
 
@@ -100,8 +88,14 @@
 /* there is something very similar to asctime_r on Windows: */
 #define asctime_r(t,b,s)       asctime_s(b,s,t)
 
-/* Define if you have the cfitsio library */
-/* #undef HAVE_CFITSIO */
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+   not. That way, with a declaration like `struct s { int n; double
+   d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+   compilers. When computing the size of such an object, don't use 'sizeof
+   (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+   instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+   MSVC and with C++ compilers. */
+#undef FLEXIBLE_ARRAY_MEMBER
 
 /* If the console should be used */
 #define HAVE_CONSOLE 1
@@ -150,6 +144,9 @@
 #define HAVE_FENV_H 1
 #endif
 
+/* Define if the fits module is to be enabled */
+/* #undef HAVE_FITS */
+
 /* Define to 1 if you have the `fpclass' function. */
 #define HAVE_FPCLASS 1         /* uses _fpclass, see mmath.c */
 
@@ -171,9 +168,6 @@
 #define HAVE_FTRUNCATE 1
 #define ftruncate(fd, sz)      (-(_chsize_s((fd), (__int64) (sz)) != 0))
 
-/* Does your compiler support function attributes (__attribute__)? */
-/* #undef HAVE_FUNCTION_ATTRIBUTES */
-
 /* Define if you use garbage collection */
 /* #undef HAVE_GC */
 
@@ -351,12 +345,12 @@
 /* Define to 1 if you have the `MD5' function. */
 #define HAVE_MD5 1
 
-/* Define if you have the LibMicroHTTPD library */
-/* #undef HAVE_MICROHTTPD */
-
 /* Define to 1 if you have the <memory.h> header file. */
 #define HAVE_MEMORY_H 1
 
+/* Define if the microhttpd server is to be enabled */
+/* #undef HAVE_MICROHTTPD */
+
 /* Define to 1 if you have the `mremap' function. */
 /* #undef HAVE_MREMAP */
 
@@ -974,10 +968,10 @@
 
 /* If the compiler does not support function attributes via __attribute__,
    we just define __attribute__(a) to nothing. */
-#ifndef HAVE_FUNCTION_ATTRIBUTES
 #define __attribute__(a)
-#endif
 
+/* Does your compiler support the `__hidden' specifier? */
+#define __hidden
 
 /* function to close a socket */
 /* #undef closesocket */
@@ -1040,9 +1034,6 @@ typedef unsigned __int64 uint64_t;
 #endif
 #endif
 
-#ifndef _SEEN_MONETDB_CONFIG_H
-#define _SEEN_MONETDB_CONFIG_H 1
-
 #include <sys/types.h>
 #include <stdio.h>             /* NULL, printf etc. */
 #include <stdlib.h>
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -312,15 +312,15 @@ create_winconfig_conds_new_py:
 !ELSE
        $(ECHO) CROSS_COMPILING_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ENDIF
-!IFDEF ENABLE_DATACELL
-       $(ECHO) ENABLE_DATACELL_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
+!IFDEF HAVE_DATACELL
+       $(ECHO) HAVE_DATACELL_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ELSE
-       $(ECHO) ENABLE_DATACELL_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
+       $(ECHO) HAVE_DATACELL_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ENDIF
-!IFDEF HAVE_CFITSIO
-       $(ECHO) HAVE_CFITSIO_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
+!IFDEF HAVE_FITS
+       $(ECHO) HAVE_FITS_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ELSE
-       $(ECHO) HAVE_CFITSIO_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
+       $(ECHO) HAVE_FITS_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ENDIF
 !IFDEF HAVE_CURL
        $(ECHO) HAVE_CURL_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
diff --git a/clients/Tests/All b/clients/Tests/All
--- a/clients/Tests/All
+++ b/clients/Tests/All
@@ -1,9 +1,9 @@
 exports
-HAVE_CFITSIO&HAVE_GEOM&HAVE_GSL&HAVE_LIBR&HAVE_SAMTOOLS&HAVE_SPHINXCLIENT&!ENABLE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_all
-HAVE_CFITSIO&HAVE_GEOM&!HAVE_GSL&!HAVE_LIBR&!HAVE_SAMTOOLS&!HAVE_SPHINXCLIENT&!ENABLE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_fits_geom
-!HAVE_CFITSIO&HAVE_GEOM&!HAVE_GSL&!HAVE_LIBR&!HAVE_SAMTOOLS&!HAVE_SPHINXCLIENT&!ENABLE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_geom
-!HAVE_CFITSIO&!HAVE_GEOM&!HAVE_GSL&!HAVE_LIBR&!HAVE_SAMTOOLS&!HAVE_SPHINXCLIENT&!ENABLE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_none
-HAVE_GEOM&HAVE_GSL&HAVE_SAMTOOLS&!ENABLE_DATACELL&!BITS32?SQL-dump_all
-HAVE_GEOM&!HAVE_GSL&!HAVE_SAMTOOLS&!ENABLE_DATACELL?SQL-dump_geom
-!HAVE_GEOM&!HAVE_GSL&!HAVE_SAMTOOLS&!ENABLE_DATACELL&!BITS32?SQL-dump_none
+HAVE_FITS&HAVE_GEOM&HAVE_GSL&HAVE_LIBR&HAVE_SAMTOOLS&HAVE_SPHINXCLIENT&!HAVE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_all
+HAVE_FITS&HAVE_GEOM&!HAVE_GSL&!HAVE_LIBR&!HAVE_SAMTOOLS&!HAVE_SPHINXCLIENT&!HAVE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_fits_geom
+!HAVE_FITS&HAVE_GEOM&!HAVE_GSL&!HAVE_LIBR&!HAVE_SAMTOOLS&!HAVE_SPHINXCLIENT&!HAVE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_geom
+!HAVE_FITS&!HAVE_GEOM&!HAVE_GSL&!HAVE_LIBR&!HAVE_SAMTOOLS&!HAVE_SPHINXCLIENT&!HAVE_DATACELL&!HAVE_JSONSTORE?MAL-signatures_none
+HAVE_GEOM&HAVE_GSL&HAVE_SAMTOOLS&!HAVE_DATACELL&!BITS32?SQL-dump_all
+HAVE_GEOM&!HAVE_GSL&!HAVE_SAMTOOLS&!HAVE_DATACELL?SQL-dump_geom
+!HAVE_GEOM&!HAVE_GSL&!HAVE_SAMTOOLS&!HAVE_DATACELL&!BITS32?SQL-dump_none
 MERCURIAL?malcheck
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -67,6 +67,7 @@
 #include <string.h>
 #include <stdio.h>             /* NULL, printf etc. */
 #include <stdlib.h>
+#include <stddef.h>
 #include <errno.h>
 #include <stdarg.h>            /* va_alist.. */
 #include <assert.h>
@@ -3618,7 +3619,7 @@ bstream_destroy(bstream *s)
 typedef struct {
        stream *s;
        size_t len, pos;
-       char buf[];             /* NOTE: buf extends beyond array for wbs->len 
bytes */
+       char buf[FLEXIBLE_ARRAY_MEMBER]; /* NOTE: buf extends beyond array for 
wbs->len bytes */
 } wbs_stream;
 
 static int
@@ -3720,7 +3721,7 @@ wbstream(stream *s, size_t buflen)
        ns = create_stream(s->name);
        if (ns == NULL)
                return NULL;
-       wbs = (wbs_stream *) malloc(sizeof(wbs_stream) + buflen);
+       wbs = (wbs_stream *) malloc(offsetof(wbs_stream, buf) + buflen);
        if (wbs == NULL) {
                destroy(ns);
                return NULL;
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -21,7 +21,7 @@ dnl All Rights Reserved.
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.60)
-AC_INIT([MonetDB], [11.20.0], [[email protected]], [MonetDB])
+AC_INIT([MonetDB], [11.20.0], [[email protected]], [MonetDB], 
[http://www.monetdb.org/])
 AC_CONFIG_AUX_DIR([buildtools/conf])
 AC_CONFIG_MACRO_DIR([buildtools/conf])
 AC_CANONICAL_HOST
@@ -232,7 +232,7 @@ yes-no)
        ;;
 auto-no)
        enable_jsonstore=no
-       disable_jsonstore="(jsonstore required microhttpd)"
+       disable_jsonstore="(jsonstore requires microhttpd)"
        ;;
 esac
 
@@ -276,12 +276,13 @@ dnl handy only during development.
 dnl We simply can't disable it for now because Testing gets hopelessly
 dnl upset about it, but we can offer to the user to disable it for
 dnl increased security.
-use_console=yes
+dft_console=yes
 AC_ARG_ENABLE(console,
        AS_HELP_STRING([--enable-console],
                [enables direct console on the server (involves security risks) 
(default=yes)]),
-       use_console="$enableval")
-if test x$use_console = xyes ; then
+       enable_console="$enableval",
+       enable_console=$dft_console)
+if test x$enable_console != xno ; then
        AC_DEFINE([HAVE_CONSOLE], 1, [If the console should be used])
 fi
 
@@ -291,7 +292,7 @@ AC_ARG_ENABLE(jdbc,
        enable_jdbc="$enableval",
        enable_jdbc=$dft_jdbc)
 case $enable_jdbc in
-       yes|auto) enable_jdbc=$enable_jdbc;;
+       yes|auto) ;;
        *) enable_jdbc=no;;
 esac
 
@@ -301,7 +302,7 @@ AC_ARG_ENABLE(merocontrol,
        enable_control="$enableval",
        enable_control=$dft_control)
 case $enable_control in
-       yes|auto) enable_control=$enable_control;;
+       yes|auto) ;;
        *) enable_control=no;;
 esac
 
@@ -398,8 +399,8 @@ esac
 
 dnl  (try to) determine compiler type (gcc, icc, clang) (and version)
 dnl  independent of call ($CC) and result of AC_PROG_CC() ($GCC)
-dnl  (e.g., on OSX, Apple pretends its clang were gcc)
-AC_MSG_CHECKING(compiler type & version)
+dnl  (e.g., on OSX, Apple pretends its clang is gcc)
+AC_MSG_CHECKING([compiler type & version])
 gcc_ver=""
 icc_ver=""
 CC_ver=""
@@ -456,22 +457,8 @@ CC_version=
        ]);;
 esac
 
-AC_ARG_WITH(bits,
-       AS_HELP_STRING([--with-bits=BITS],
-               [obsolete: specify by setting CC in the environment]),
-       AC_MSG_ERROR([argument --with-bits is obsolete: specify by setting CC 
in the environment]))
-
 AC_CHECK_SIZEOF(long)
-native_bits=`expr $ac_cv_sizeof_long \* 8`
-bits=$native_bits
-AC_ARG_ENABLE(bits,
-       AS_HELP_STRING([--enable-bits],
-               [obsolete: specify by setting CC in the environment]),
-       if test x$enableval = x$bits; then
-               AC_MSG_WARN([argument --enable-bits is obsolete: specify by 
setting CC in the environment])
-       else
-               AC_MSG_ERROR([argument --enable-bits is obsolete: specify by 
setting CC in the environment])
-       fi)
+bits=`expr $ac_cv_sizeof_long \* 8`
 AC_SUBST(bits)
 AM_CONDITIONAL(BITS32, test x"$bits" = x32)
 AM_CONDITIONAL(BITS64, test x"$bits" = x64)
@@ -2190,7 +2177,7 @@ if test "x$enable_rdf" != xno; then
 fi
 AM_CONDITIONAL(HAVE_RAPTOR, test x"$have_raptor" != xno)
 
-AM_CONDITIONAL(ENABLE_DATACELL, test x"$enable_datacell" != xno)
+AM_CONDITIONAL(HAVE_DATACELL, test x"$enable_datacell" != xno)
 
 PKG_CHECK_MODULES([curl], [libcurl], [have_curl="yes"], [have_curl="no"; 
why_have_curl="(libcurl not found)"])
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to