Changeset: 5f5f5846a558 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5f5f5846a558 Modified Files: NT/monetdb_config.h.in clients/mapiclient/mclient.c configure.ag monetdb5/optimizer/opt_commonTerms.c monetdb5/optimizer/opt_mergetable.c sql/backends/monet5/sql_gencode.c Branch: sfcgal Log Message:
Merge with Default diffs (truncated from 2694 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 @@ -187,6 +187,11 @@ /* Define to 1 if you have the `getaddrinfo' function. */ #define HAVE_GETADDRINFO 1 +/* Define to 1 if you have the `GetDynamicTimeZoneInformation' function. */ +#ifdef _MSC_VER +#define HAVE_GETDYNAMICTIMEZONEINFORMATION 1 +#endif + /* Define to 1 if you have the `getexecname' function. */ /* #undef HAVE_GETEXECNAME */ @@ -205,11 +210,6 @@ /* Define to 1 if you have the `gettimeofday' function. */ /* #undef HAVE_GETTIMEOFDAY */ -/* Define to 1 if you have the `_get_timezone' function. */ -#ifdef _MSC_VER -#define HAVE__GET_TIMEZONE 1 -#endif - /* Define to 1 if you have the `getuid' function. */ /* #undef HAVE_GETUID */ diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -2849,15 +2849,33 @@ set_timezone(Mapi mid) MapiHdl hdl; /* figure out our current timezone */ -#ifdef HAVE__GET_TIMEZONE - __time64_t ltime, lt, gt; - struct tm loctime; +#if defined HAVE_GETDYNAMICTIMEZONEINFORMATION + DYNAMIC_TIME_ZONE_INFORMATION tzinf; - _time64(<ime); - _localtime64_s(&loctime, <ime); - lt = _mktime64(&loctime); - gt = _mkgmtime64(&loctime); - tzone = (int) (lt - gt); + /* documentation says: UTC = localtime + Bias (in minutes), + * but experimentation during DST period says, UTC = localtime + * + Bias + DaylightBias, and presumably during non DST + * period, UTC = localtime + Bias */ + switch (GetDynamicTimeZoneInformation(&tzinf)) { + case TIME_ZONE_ID_STANDARD: + case TIME_ZONE_ID_UNKNOWN: + tzone = (int) tzinf.Bias * 60; + break; + case TIME_ZONE_ID_DAYLIGHT: + tzone = (int) (tzinf.Bias + tzinf.DaylightBias) * 60; + break; + default: + /* call failed, we don't know the time zone */ + tzone = 0; + break; + } +#elif defined HAVE_STRUCT_TM_TM_ZONE + time_t t; + struct tm *tmp; + + t = time(NULL); + tmp = localtime(&t); + tzone = (int) -tmp->tm_gmtoff; #else time_t t, lt, gt; struct tm *tmp; diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -9,7 +9,7 @@ dnl Copyright 1997 - July 2008 CWI, Augu # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.60) +AC_PREREQ([2.60]) AC_INIT([MonetDB], [11.24.0], [i...@monetdb.org], [MonetDB], [http://www.monetdb.org/]) AC_CONFIG_AUX_DIR([buildtools/conf]) AC_CONFIG_MACRO_DIR([buildtools/conf]) @@ -22,13 +22,13 @@ AC_CONFIG_HEADERS([monetdb_config.h]) AC_SUBST([CONFIG_H], [monetdb_config.h]) HOST=[$target] -AC_DEFINE_UNQUOTED(HOST, "$HOST", [Host identifier]) +AC_DEFINE_UNQUOTED([HOST], ["$HOST"], [Host identifier]) if test x"$target_os" = xcygwin; then - AC_DEFINE(WIN32, 1, [Define on Microsoft Windows (also under Cygwin)]) + AC_DEFINE([WIN32], 1, [Define on Microsoft Windows (also under Cygwin)]) fi -AM_CONDITIONAL(NOT_WIN32, test x"$target_os" != xcygwin) -AM_CONDITIONAL(NATIVE_WIN32, false) +AM_CONDITIONAL([NOT_WIN32], [test x"$target_os" != xcygwin]) +AM_CONDITIONAL([NATIVE_WIN32], [false]) m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([Could not locate the pkg-config autoconf @@ -57,16 +57,16 @@ AC_DEFUN([MONETDB_VERSION_TO_NUMBER], # except set the variables. The command to set them in case we do # need to escape the \'s is Qvar=`echo "$var" | sed 's/\\\\/\\\\\\\\/g'` BUILD=[`pwd`] -AC_SUBST(BUILD) +AC_SUBST([BUILD]) SOURCE=[`(cd $srcdir && pwd)`] -AC_SUBST(SOURCE) +AC_SUBST([SOURCE]) . $srcdir/libversions -AC_SUBST(GDK_VERSION) -AC_SUBST(MAPI_VERSION) -AC_SUBST(MONETDB5_VERSION) -AC_SUBST(STREAM_VERSION) +AC_SUBST([GDK_VERSION]) +AC_SUBST([MAPI_VERSION]) +AC_SUBST([MONETDB5_VERSION]) +AC_SUBST([STREAM_VERSION]) # if no --prefix option, we must set Qprefix to the default value # the problem is that prefix is set very late in the process if it @@ -77,14 +77,14 @@ else Qprefix="${prefix}" fi Qprefix="`echo "$Qprefix" | sed 's/\\\\/\\\\\\\\/g'`" -AC_SUBST(Qprefix) +AC_SUBST([Qprefix]) # exec_prefix is created very late, so let make do the expansion if test "${exec_prefix}x" = "NONEx"; then Qexec_prefix='${prefix}' else Qexec_prefix="`echo "$exec_prefix" | sed 's/\\\\/\\\\\\\\/g'`" fi -AC_SUBST(Qexec_prefix) +AC_SUBST([Qexec_prefix]) if test -f "$srcdir"/vertoo.data; then dnl Developers compiling from Mercurial: @@ -124,21 +124,21 @@ case "$CC" in ;; esac -AC_DEFINE(MONETDB_RELEASE, "unreleased", [Release name or "unreleased"]) +AC_DEFINE([MONETDB_RELEASE], ["unreleased"], [Release name or "unreleased"]) dft_gdk=yes -AC_ARG_ENABLE(gdk, - AS_HELP_STRING([--enable-gdk], - [enable support for GDK (default=yes)]), - enable_gdk=$enableval, - enable_gdk=$dft_gdk) +AC_ARG_ENABLE([gdk], + [AS_HELP_STRING([--enable-gdk], + [enable support for GDK (default=yes)])], + [enable_gdk=$enableval], + [enable_gdk=$dft_gdk]) dft_monetdb5=yes -AC_ARG_ENABLE(monetdb5, - AS_HELP_STRING([--enable-monetdb5], - [enable support for MonetDB5 (default=yes)]), - enable_monetdb5=$enableval, - enable_monetdb5=$dft_monetdb5) +AC_ARG_ENABLE([monetdb5], + [AS_HELP_STRING([--enable-monetdb5], + [enable support for MonetDB5 (default=yes)])], + [enable_monetdb5=$enableval], + [enable_monetdb5=$dft_monetdb5]) case "$enable_gdk-$enable_monetdb5" in no-yes) AC_MSG_ERROR([MonetDB5 requires GDK.]) @@ -150,32 +150,32 @@ no-auto) esac dft_fits=auto -AC_ARG_ENABLE(fits, - AS_HELP_STRING([--enable-fits], - [enable support for FITS (default=auto)]), - enable_fits=$enableval, - enable_fits=$dft_fits) +AC_ARG_ENABLE([fits], + [AS_HELP_STRING([--enable-fits], + [enable support for FITS (default=auto)])], + [enable_fits=$enableval], + [enable_fits=$dft_fits]) dft_netcdf=auto -AC_ARG_ENABLE(netcdf, - AS_HELP_STRING([--enable-netcdf], - [enable support for netcdf (default=auto)]), - enable_netcdf=$enableval, - enable_netcdf=$dft_netcdf) +AC_ARG_ENABLE([netcdf], + [AS_HELP_STRING([--enable-netcdf], + [enable support for netcdf (default=auto)])], + [enable_netcdf=$enableval], + [enable_netcdf=$dft_netcdf]) dft_lidar=auto -AC_ARG_ENABLE(lidar, - AS_HELP_STRING([--enable-lidar], - [enable support for LiDAR data (default=auto)]), - have_lidar=$enableval, - have_lidar=$dft_lidar) +AC_ARG_ENABLE([lidar], + [AS_HELP_STRING([--enable-lidar], + [enable support for LiDAR data (default=auto)])], + [have_lidar=$enableval], + [have_lidar=$dft_lidar]) dft_sql=yes -AC_ARG_ENABLE(sql, - AS_HELP_STRING([--enable-sql], - [enable support for MonetDB/SQL (default=yes)]), - enable_sql=$enableval, - enable_sql=$dft_sql) +AC_ARG_ENABLE([sql], + [AS_HELP_STRING([--enable-sql], + [enable support for MonetDB/SQL (default=yes)])], + [enable_sql=$enableval], + [enable_sql=$dft_sql]) case "$enable_monetdb5-$enable_sql" in no-yes) AC_MSG_ERROR([MonetDB/SQL requires MonetDB5.]) @@ -187,11 +187,11 @@ no-auto) esac dft_geom=auto -AC_ARG_ENABLE(geom, - AS_HELP_STRING([--enable-geom], - [enable support for geom module (default=auto)]), - enable_geom=$enableval, - enable_geom=$dft_geom) +AC_ARG_ENABLE([geom], + [AS_HELP_STRING([--enable-geom], + [enable support for geom module (default=auto)])], + [enable_geom=$enableval], + [enable_geom=$dft_geom]) case "$enable_monetdb5-$enable_geom" in no-yes) AC_MSG_ERROR([geom module requires MonetDB5]) @@ -203,11 +203,11 @@ no-auto) esac dft_shp=auto -AC_ARG_ENABLE(shp, - AS_HELP_STRING([--enable-shp], - [enable support for ESRI Shapefiles (default=auto)]), - have_shp=$enableval, - have_shp=$dft_shp) +AC_ARG_ENABLE([shp], + [AS_HELP_STRING([--enable-shp], + [enable support for ESRI Shapefiles (default=auto)])], + [have_shp=$enableval], + [have_shp=$dft_shp]) case "$enable_geom-$have_shp" in no-yes) AC_MSG_ERROR([ESRI Shapefile vault requires the geom module]) @@ -219,14 +219,14 @@ no-auto) esac dft_mapi=yes -AC_ARG_ENABLE(mapi, - AS_HELP_STRING([--enable-mapi], - [Enable MAPI (default=yes)]), - enable_mapi=$enableval, - enable_mapi=$dft_mapi) -AM_CONDITIONAL(HAVE_MAPI, test x$enable_mapi != xno) +AC_ARG_ENABLE([mapi], + [AS_HELP_STRING([--enable-mapi], + [Enable MAPI (default=yes)])], + [enable_mapi=$enableval], + [enable_mapi=$dft_mapi]) +AM_CONDITIONAL([HAVE_MAPI], [test x$enable_mapi != xno]) if test "x$enable_mapi" != xno; then - AC_DEFINE(HAVE_MAPI, 1, [Enable MAPI]) + AC_DEFINE([HAVE_MAPI], 1, [Enable MAPI]) fi dft_sfcgal=auto @@ -246,78 +246,76 @@ no-auto) esac dft_embedded=no -AC_ARG_ENABLE(embedded, - AS_HELP_STRING([--enable-embedded], - [enable support for running MonetDB as a library (default=no)]), - enable_embedded=$enableval, - enable_embedded=$dft_embedded) -AM_CONDITIONAL(HAVE_EMBEDDED, test x$enable_embedded != xno) - +AC_ARG_ENABLE([embedded], + [AS_HELP_STRING([--enable-embedded], + [enable support for running MonetDB as a library (default=no)])], + [enable_embedded=$enableval], + [enable_embedded=$dft_embedded]) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list