Changeset: 15edade6ac49 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=15edade6ac49 Modified Files: NT/monetdb_config.h.in clients/mapiclient/mclient.c monetdb5/modules/atoms/json.c sql/test/leaks/Tests/check0.stable.out.int128 sql/test/leaks/Tests/temp2.stable.out.int128 sql/test/leaks/Tests/temp3.stable.out.int128 Branch: default Log Message:
Merge with Jul2015 branch. diffs (60 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 @@ -205,6 +205,9 @@ /* Define to 1 if you have the `gettimeofday' function. */ /* #undef HAVE_GETTIMEOFDAY */ +/* Define to 1 if you have the `_get_timezone' function. */ +#define HAVE__GET_TIMEZONE 1 + /* Define if you have the gsl library */ /* #undef HAVE_GSL */ diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -2911,12 +2911,22 @@ static void set_timezone(Mapi mid) { char buf[128]; - time_t t, lt, gt; - struct tm *tmp; int tzone; MapiHdl hdl; /* figure out our current timezone */ +#ifdef HAVE__GET_TIMEZONE + long tz; + int dst; + + _tzset(); + _get_timezone(&tz); + _get_dstbias(&dst); + tzone = (int) (tz + dst); +#else + time_t t, lt, gt; + struct tm *tmp; + t = time(NULL); tmp = gmtime(&t); gt = mktime(tmp); @@ -2925,6 +2935,7 @@ set_timezone(Mapi mid) lt = mktime(tmp); assert((lng) gt - (lng) lt >= (lng) INT_MIN && (lng) gt - (lng) lt <= (lng) INT_MAX); tzone = (int) (gt - lt); +#endif if (tzone < 0) snprintf(buf, sizeof(buf), "SET TIME ZONE INTERVAL '+%02d:%02d' HOUR TO MINUTE", diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c --- a/monetdb5/modules/atoms/json.c +++ b/monetdb5/modules/atoms/json.c @@ -600,6 +600,7 @@ JSONfilterInternal(json *ret, json *js, l = 3; s = GDKzalloc(l + 3); snprintf(s, l + 3, "[%s]", (result ? result : "")); + GDKfree(result); for (l = 0; terms[l].token; l++) if (terms[l].name) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list