Changeset: 1e6572338aa6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e6572338aa6
Modified Files:
configure.ag
gdk/gdk.h
gdk/gdk_logger.c
monetdb5/extras/crackers/crackers_index.mx
monetdb5/extras/crackers/crackers_sortmerge.mx
monetdb5/mal/mal_recycle.c
monetdb5/modules/mal/mat.c
monetdb5/optimizer/opt_cluster.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_mitosis.c
monetdb5/optimizer/opt_prejoin.c
monetdb5/optimizer/opt_support.c
sql/backends/monet5/sql.mx
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_scenario.c
Branch: headless
Log Message:
Merge with default branch.
diffs (truncated from 971 to 300 lines):
diff --git a/NT/winconfig.py b/NT/winconfig.py
--- a/NT/winconfig.py
+++ b/NT/winconfig.py
@@ -41,7 +41,6 @@
("@pkgincludedir@", r'%prefix%\include\@PACKAGE@'),
("@DIRSEP@", '\\'),
("@CROSS_COMPILING_FALSE@", ''),
- ("@LINK_STATIC_FALSE@", ''),
("@HAVE_CLIENTS_FALSE@", '#'),
("@HAVE_MONETDB_FALSE@", '#'),
("@NATIVE_WIN32_FALSE@", '#'),
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -3271,11 +3271,11 @@
switch (hdl->params[i].intype) {
case MAPI_TINY:
checkSpace(5);
- sprintf(hdl->query + k, "%hhd", *(signed char
*) src);
+ sprintf(hdl->query + k, "%d", *(signed char *)
src);
break;
case MAPI_UTINY:
checkSpace(5);
- sprintf(hdl->query + k, "%hhu", *(unsigned char
*) src);
+ sprintf(hdl->query + k, "%u", *(unsigned char
*) src);
break;
case MAPI_SHORT:
checkSpace(10);
@@ -3283,7 +3283,7 @@
break;
case MAPI_USHORT:
checkSpace(10);
- sprintf(hdl->query + k, "%hu", *(unsigned short
*) src);
+ sprintf(hdl->query + k, "%u", *(unsigned short
*) src);
break;
case MAPI_INT:
checkSpace(20);
@@ -3320,7 +3320,7 @@
case MAPI_DATE:
checkSpace(50);
sprintf(hdl->query + k,
- "DATE '%04d-%02hu-%02hu'",
+ "DATE '%04d-%02u-%02u'",
((MapiDate *) src)->year,
((MapiDate *) src)->month,
((MapiDate *) src)->day);
@@ -3328,7 +3328,7 @@
case MAPI_TIME:
checkSpace(60);
sprintf(hdl->query + k,
- "TIME '%02hu:%02hu:%02hu'",
+ "TIME '%02u:%02u:%02u'",
((MapiTime *) src)->hour,
((MapiTime *) src)->minute,
((MapiTime *) src)->second);
@@ -3336,7 +3336,7 @@
case MAPI_DATETIME:
checkSpace(110);
sprintf(hdl->query + k,
- "TIMESTAMP '%04d-%02hu-%02hu
%02hu:%02hu:%02hu.%09u'",
+ "TIMESTAMP '%04d-%02u-%02u
%02u:%02u:%02u.%09u'",
((MapiDateTime *) src)->year,
((MapiDateTime *) src)->month,
((MapiDateTime *) src)->day,
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -865,33 +865,119 @@
AC_MSG_RESULT([$noexpand])
fi
-dnl --enable-debug
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable full debugging (default=yes for development sources)]),
enable_debug=$enableval,
- enable_debug=$dft_debug)
+ enable_debug=def_$dft_debug)
+
+AC_ARG_ENABLE(assert,
+ AS_HELP_STRING([--enable-assert],
+ [enable assertions in the code (default=yes for development
sources)]),
+ enable_assert=$enableval,
+ enable_assert=def_$dft_assert)
+
+AC_ARG_ENABLE(optimize,
+ AS_HELP_STRING([--enable-optimize],
+ [enable extra optimization (default=no)]),
+ enable_optim=$enableval,
+ enable_optim=def_$dft_optimi)
+
+AC_ARG_ENABLE(warning,
+ AS_HELP_STRING([--enable-warning],
+ [enable extended compiler warnings (default=$dft_warning)]),
+ enable_warning=$enableval,
+ enable_warning=def_$dft_warning)
+
+need_profiling=no
+AC_ARG_ENABLE(profile,
+ AS_HELP_STRING([--enable-profile], [enable profiling (default=no)]),
+ enable_prof=$enableval,
+ enable_prof=no)
+
+need_instrument=no
+AC_ARG_ENABLE(instrument,
+ AS_HELP_STRING([--enable-instrument],
+ [enable instrument (default=no)]),
+ enable_instrument=$enableval,
+ enable_instrument=no)
+
+dnl check whether no (explictly chosen) mutual exclusive combinations
+dnl were made, compatability matrix:
+dnl deb ass opt war pro ins
+dnl debug \ C X C C C
+dnl assert C \ C C C C
+dnl optimize X C \ C X X
+dnl warnings C C C \ C C
+dnl profile C C X C \ C
+dnl instrument C C X C C \
+
+case "x$enable_debug.$enable_optim.$enable_prof.$enable_instrument" in
+ # find conflicts
+ xyes.yes.*.*)
+ AC_MSG_ERROR([combining --enable-optimize and --enable-debug is
not possible])
+ ;;
+ x*.yes.yes.*)
+ AC_MSG_ERROR([combining --enable-optimize and --enable-profile
is not possible])
+ ;;
+ x*.yes.*.yes)
+ AC_MSG_ERROR([combining --enable-optimize and
--enable-instrument is not possible])
+ ;;
+ # handle defaults after user requests
+ xyes.*.*.*)
+ enable_debug=yes
+ enable_optim=no
+ enable_prof="`echo $enable_prof | sed 's:^def_::'`"
+ enable_instrument="`echo $enable_instrument | sed 's:^def_::'`"
+ ;;
+ x*.*.yes.*)
+ enable_debug="`echo $enable_debug | sed 's:^def_::'`"
+ enable_optim=no
+ enable_prof=yes
+ enable_instrument="`echo $enable_instrument | sed 's:^def_::'`"
+ ;;
+ x*.*.*.yes)
+ enable_debug="`echo $enable_debug | sed 's:^def_::'`"
+ enable_optim=no
+ enable_prof="`echo $enable_prof | sed 's:^def_::'`"
+ enable_instrument=yes
+ ;;
+ x*.*no.*.*)
+ enable_debug="`echo $enable_debug | sed 's:^def_::'`"
+ enable_optim=no
+ enable_prof="`echo $enable_prof | sed 's:^def_::'`"
+ enable_instrument="`echo $enable_instrument | sed 's:^def_::'`"
+ ;;
+ x*.*yes.*.*) # enable-optimize overrules other defaults
+ enable_optim=yes
+ enable_debug=no
+ enable_prof=no
+ enable_instrument=no
+ ;;
+ x*)
+ AC_MSG_WARN([unhandled configuration
$enable_debug.$enable_optim.$enable_prof.$enable_instrument, please file a bug
on bugs.monetdb.org])
+ ;;
+esac
+# make defaults real for flags which don't conflict with anything
+enable_assert="`echo $enable_assert | sed 's:^def_::'`"
+enable_warning="`echo $enable_warning | sed 's:^def_::'`"
AC_MSG_CHECKING([for --enable-debug])
-origCFLAGS=$CFLAGS
if test "x$enable_debug" = xyes; then
- if test "x$enable_optim" = xyes; then
- AC_MSG_ERROR([combining --enable-optimize and --enable-debug is
not possible.])
- else
- dnl remove "-Ox" as some compilers don't like "-g -Ox"
combinations
- CFLAGS=" $CFLAGS "
- CFLAGS="`echo "$CFLAGS" | sed -e 's| -O[[0-9]] | |g' -e 's| -g
| |g' -e 's|^ ||' -e 's| $||'`"
- JAVACFLAGS=" $JAVACFLAGS "
- JAVACFLAGS="`echo "$JAVACFLAGS" | sed -e 's| -O | |g' -e 's| -g
| |g' -e 's| -g:[[a-z]]* | |g' -e 's|^ ||' -e 's| $||'`"
- dnl add "-g"
- CFLAGS="$CFLAGS -g"
- JAVACFLAGS="$JAVACFLAGS -g"
- case "$GCC-$host_os" in
- yes-aix*)
- CFLAGS="$CFLAGS -gxcoff"
- ;;
- esac
- fi
+ origCFLAGS=$CFLAGS
+ dnl remove "-Ox" as some compilers don't like "-g -Ox" combinations
+ CFLAGS=" $CFLAGS "
+ CFLAGS="`echo "$CFLAGS" | sed -e 's| -O[[0-9]] | |g' -e 's| -g | |g' -e
's|^ ||' -e 's| $||'`"
+ JAVACFLAGS=" $JAVACFLAGS "
+ JAVACFLAGS="`echo "$JAVACFLAGS" | sed -e 's| -O | |g' -e 's| -g | |g'
-e 's| -g:[[a-z]]* | |g' -e 's|^ ||' -e 's| $||'`"
+ dnl add "-g"
+ CFLAGS="$CFLAGS -g"
+ JAVACFLAGS="$JAVACFLAGS -g"
+ case "$GCC-$host_os" in
+ yes-aix*)
+ CFLAGS="$CFLAGS -gxcoff"
+ ;;
+ esac
changedCFLAGS=
for flag in $origCFLAGS ; do
@@ -912,13 +998,6 @@
AC_MSG_RESULT([no])
fi
-dnl --enable-assert
-AC_ARG_ENABLE(assert,
- AS_HELP_STRING([--enable-assert],
- [enable assertions in the code (default=yes for development
sources)]),
- enable_assert=$enableval,
- enable_assert=$dft_assert)
-
AC_MSG_CHECKING([for --enable-assert])
if test "x$enable_assert" = xno; then
AC_DEFINE(NDEBUG, 1, [Define if you do not want assertions])
@@ -927,31 +1006,19 @@
AC_MSG_RESULT([yes])
fi
-dnl --enable-optimize
-AC_ARG_ENABLE(optimize,
- AS_HELP_STRING([--enable-optimize],
- [enable extra optimization (default=no)]),
- enable_optim=$enableval, enable_optim=$dft_optimi)
AC_MSG_CHECKING([for --enable-optimize])
if test "x$enable_optim" = xyes; then
- if test "x$enable_debug" = xyes; then
- AC_MSG_ERROR([combining --enable-optimize and --enable-debug is not
possible.])
- elif test "x$enable_prof" = xyes; then
- AC_MSG_ERROR([combining --enable-optimize and --enable-profile is not
(yet?) possible.])
- elif test "x$enable_instrument" = xyes; then
- AC_MSG_ERROR([combining --enable-optimize and --enable-instrument is not
(yet?) possible.])
- else
origCFLAGS="$CFLAGS"
- dnl remove "-g" as some compilers don't like "-g -Ox" combinations
- dnl remove "-O2" as we add "-Ox" and some compilers don't like "-Oy -Ox"
combinations
- CFLAGS=" $CFLAGS "
- CFLAGS="`echo "$CFLAGS" | sed -e 's| -g | |g' -e 's| -O2 | |g' -e 's|^ ||'
-e 's| $||'`"
- JAVACFLAGS=" $JAVACFLAGS "
- JAVACFLAGS="`echo "$JAVACFLAGS" | sed -e 's| -g | |g' -e 's| -g:[[a-z]]* |
|g' -e 's|^ ||' -e 's| $||'`"
- dnl Optimization flags
- JAVACFLAGS="$JAVACFLAGS -g:none -O"
- case "$GCC-$CC" in
+ dnl remove "-g" as some compilers don't like "-g -Ox" combinations
+ dnl remove "-O2" as we add "-Ox" and some compilers don't like "-Oy
-Ox" combinations
+ CFLAGS=" $CFLAGS "
+ CFLAGS="`echo "$CFLAGS" | sed -e 's| -g | |g' -e 's| -O2 | |g' -e 's|^
||' -e 's| $||'`"
+ JAVACFLAGS=" $JAVACFLAGS "
+ JAVACFLAGS="`echo "$JAVACFLAGS" | sed -e 's| -g | |g' -e 's|
-g:[[a-z]]* | |g' -e 's|^ ||' -e 's| $||'`"
+ dnl Optimization flags
+ JAVACFLAGS="$JAVACFLAGS -g:none -O"
+ case "$GCC-$CC" in
yes-*clang*)
CFLAGS="$CFLAGS -O3 -fomit-frame-pointer
-finline-functions"
;;
@@ -1086,6 +1153,10 @@
esac
;;
esac
+ # for stack-traces with assert, we DO want a frame-pointer
+ if test "x$enable_assert" = xyes ; then
+ CFLAGS="`echo $CFLAGS | sed 's:-fomit-frame-pointer::'`"
+ fi
changedCFLAGS=
for flag in $origCFLAGS ; do
case " $CFLAGS " in
@@ -1101,7 +1172,6 @@
done
changedCFLAGS="`echo $changedCFLAGS | sed -e 's|^, ||'`"
AC_MSG_RESULT([yes: $changedCFLAGS])
- fi
else
AC_MSG_RESULT([no])
fi
@@ -1112,112 +1182,53 @@
AC_SUBST(GCC_SWIG_CFLAGS)
AC_SUBST(ICC_SWIG_CFLAGS)
-dnl --enable-warning (only gcc & icc/ecc)
-AC_ARG_ENABLE(warning,
- AS_HELP_STRING([--enable-warning],
- [enable extended compiler warnings (default=$dft_warning)]),
- enable_warning=$enableval,
- enable_warning=$dft_warning)
-
AC_MSG_CHECKING([for --enable-warning])
if test "x$enable_warning" = xyes; then
- dnl Basically, we disable/overule X_CFLAGS, i.e., "-Werror" and some
"-Wno-*".
- dnl All warnings should be on by default (see above).
- case $GCC-$host_os in
- yes-*)
- dnl GNU (gcc/g++)
- X_CFLAGS="-pedantic -Wno-long-long"
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list