Changeset: 491bb7ad011c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=491bb7ad011c
Added Files:
common/utils/strptime.cpp
sql/test/BugTracker-2018/Tests/create_table_if_not_exists_returns_42000.Bug-6629.sql
sql/test/BugTracker-2018/Tests/create_table_if_not_exists_returns_42000.Bug-6629.stable.err
sql/test/BugTracker-2018/Tests/create_table_if_not_exists_returns_42000.Bug-6629.stable.out
sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.sql
sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.stable.err
sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.stable.out
sql/test/BugTracker-2018/Tests/or_in_subselect.Bug-6625.sql
sql/test/BugTracker-2018/Tests/or_in_subselect.Bug-6625.stable.err
sql/test/BugTracker-2018/Tests/or_in_subselect.Bug-6625.stable.out
sql/test/BugTracker-2018/Tests/strptime.Bug-6626.sql
sql/test/BugTracker-2018/Tests/strptime.Bug-6626.stable.err
sql/test/BugTracker-2018/Tests/strptime.Bug-6626.stable.out
Removed Files:
common/utils/strptime.c
Modified Files:
buildtools/autogen/autogen/am.py
buildtools/autogen/autogen/codegen.py
buildtools/autogen/autogen/filesplit.py
buildtools/autogen/autogen/msc.py
clients/mapiclient/eventparser.c
common/utils/Makefile.ag
gdk/gdk.h
gdk/gdk_batop.c
monetdb5/modules/atoms/mtime.c
monetdb5/modules/mal/tokenizer.c
monetdb5/tools/Makefile.ag
sql/backends/monet5/UDF/pyapi/pyapi.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql_statement.c
sql/server/rel_distribute.c
sql/server/rel_optimizer.c
sql/server/rel_psm.c
sql/server/rel_psm.h
sql/server/rel_schema.c
sql/server/rel_select.c
sql/test/BugTracker-2012/Tests/update_crash.Bug-2655.sql
sql/test/BugTracker-2018/Tests/All
sql/test/BugTracker-2018/Tests/dependency_column_on_sequence.Bug-6618.SQL.py
sql/test/BugTracker-2018/Tests/dependency_column_on_sequence.Bug-6618.stable.out
sql/test/BugTracker-2018/Tests/local_replica_table_not_detected.Bug-6620.stable.out
sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
sql/test/Tests/ifexists.sql
sql/test/Tests/ifexists.stable.err
testing/Mfilter.py
Branch: default
Log Message:
merged
diffs (truncated from 1596 to 300 lines):
diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py
+++ b/buildtools/autogen/autogen/am.py
@@ -722,6 +722,8 @@ def am_library(fd, var, libmap, am):
cond = ''
condname = ''
if 'COND' in libmap:
+ if len(libmap['COND']) == 1 and libmap['COND'][0] in ('WIN32',
'NATIVE_WIN32'):
+ return
for condname in libmap['COND']:
fd.write("if %s\n" % condname)
fd.write(" C_%s = %s\n" % (libname, libname))
diff --git a/buildtools/autogen/autogen/codegen.py
b/buildtools/autogen/autogen/codegen.py
--- a/buildtools/autogen/autogen/codegen.py
+++ b/buildtools/autogen/autogen/codegen.py
@@ -27,6 +27,7 @@ code_gen = {'y': [ '.tab.c', '.ta
'brg': [ '.c' ],
't': [ '.c' ],
'c': [ '.o' ],
+ 'cpp': [ '.o' ],
# 'java': [ '.class' ],
#'tex': [ '.html', '.dvi', '.pdf' ],
#'dvi': [ '.ps' ],
@@ -68,6 +69,7 @@ t_inc = re.compile(t_inc, re.MULTILINE)
scan_map = {
'c': [ c_inc, None, '' ],
+ 'cpp': [ c_inc, None, '' ],
'h': [ c_inc, None, '' ],
'y': [ c_inc, None, '' ],
'l': [ c_inc, None, '' ],
@@ -378,7 +380,6 @@ def codegen(tree, cwd, topdir, incdirsma
targets = []
if type(v) is type({}) and "SOURCES" in v:
for f in v["SOURCES"]:
- base,ext = split_filename(f)
if f not in targets:
targets.append(f)
targets = do_code_gen(targets,deps,code_gen)
diff --git a/buildtools/autogen/autogen/filesplit.py
b/buildtools/autogen/autogen/filesplit.py
--- a/buildtools/autogen/autogen/filesplit.py
+++ b/buildtools/autogen/autogen/filesplit.py
@@ -13,7 +13,7 @@ def rsplit_filename(f):
return f[:s], f[s+1:]
return base, ext
-automake_ext = ['', 'c', 'def', 'h', 'lo', 'o', 'pm.c', 'tab.c', 'tab.h',
'yy.c', 'pm.i']
+automake_ext = ['', 'c', 'cpp', 'def', 'h', 'lo', 'o', 'pm.c', 'tab.c',
'tab.h', 'yy.c', 'pm.i']
automake_extra_extensions = set([rsplit_filename(x)[1] for x in automake_ext
if '.' in x])
extra_extensions = ['in', 'bat', 'sed']
diff --git a/buildtools/autogen/autogen/msc.py
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -344,8 +344,8 @@ def msc_dep(fd, tar, deplist, msc):
name = name[1:]
if target == "LIB":
d, dext = split_filename(deplist[0])
- if dext in ("c", "yy.c", "tab.c"):
- fd.write('\t$(CC) $(CFLAGS) $(%s_CFLAGS) $(GENDLL)
-D_CRT_SECURE_NO_WARNINGS -DLIB%s "-Fo%s" -c "%s"\n' %
+ if dext in ("c", "cpp", "yy.c", "tab.c"):
+ fd.write('\t$(CC) /EHsc $(CFLAGS) $(%s_CFLAGS) $(GENDLL)
-D_CRT_SECURE_NO_WARNINGS -DLIB%s "-Fo%s" -c "%s"\n' %
(split_filename(msc_basename(src))[0], name, t, src))
if ext == 'res':
fd.write("\t$(RC) -fo%s %s\n" % (t, src))
@@ -749,17 +749,20 @@ def msc_library(fd, var, libmap, msc):
else:
makelib = makedll
if 'COND' in libmap:
- condname = 'defined(' + ') && defined('.join(libmap['COND']) + ')'
- mkname = (pref + v).replace('.', '_').replace('-', '_')
- fd.write('!IF %s\n' % condname)
- fd.write('C_%s_dll = %s%s%s\n' % (mkname, pref, v, dll))
- fd.write('C_%s_lib = %s%s.lib\n' % (mkname, pref, v))
- fd.write('!ELSE\n')
- fd.write('C_%s_dll =\n' % mkname)
- fd.write('C_%s_lib =\n' % mkname)
- fd.write('!ENDIF\n')
- makelib = '$(C_%s_lib)' % mkname
- makedll = '$(C_%s_dll)' % mkname
+ if len(libmap['COND']) == 1 and libmap['COND'][0] in ('WIN32',
'NATIVE_WIN32'):
+ condname = ''
+ else:
+ condname = 'defined(' + ') && defined('.join(libmap['COND']) + ')'
+ mkname = (pref + v).replace('.', '_').replace('-', '_')
+ fd.write('!IF %s\n' % condname)
+ fd.write('C_%s_dll = %s%s%s\n' % (mkname, pref, v, dll))
+ fd.write('C_%s_lib = %s%s.lib\n' % (mkname, pref, v))
+ fd.write('!ELSE\n')
+ fd.write('C_%s_dll =\n' % mkname)
+ fd.write('C_%s_lib =\n' % mkname)
+ fd.write('!ENDIF\n')
+ makelib = '$(C_%s_lib)' % mkname
+ makedll = '$(C_%s_dll)' % mkname
else:
condname = ''
diff --git a/clients/mapiclient/eventparser.c b/clients/mapiclient/eventparser.c
--- a/clients/mapiclient/eventparser.c
+++ b/clients/mapiclient/eventparser.c
@@ -25,11 +25,6 @@ int debug=0;
char *currentquery=0;
int eventcounter = 0;
-#ifndef HAVE_STRPTIME
-extern char *strptime(const char *, const char *, struct tm *);
-#include "strptime.c"
-#endif
-
#define DATETIME_CHAR_LENGTH 27
static void
diff --git a/common/utils/Makefile.ag b/common/utils/Makefile.ag
--- a/common/utils/Makefile.ag
+++ b/common/utils/Makefile.ag
@@ -30,4 +30,8 @@ lib_msabaoth = {
SOURCES = msabaoth.h msabaoth.c
}
-EXTRA_DIST = strptime.c
+lib_strptime = {
+ NOINST
+ SOURCES = strptime.cpp
+ COND = NATIVE_WIN32
+}
diff --git a/common/utils/strptime.c b/common/utils/strptime.c
deleted file mode 100644
--- a/common/utils/strptime.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * Copyright (c) 1999 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of KTH nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-
-#ifdef WIN32
-
-/* #include "platform/platform.h" */
-
-
-static const char *abb_weekdays[] = {
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat",
- NULL
-};
-
-static const char *full_weekdays[] = {
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- NULL
-};
-
-static const char *abb_month[] = {
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec",
- NULL
-};
-
-static const char *full_month[] = {
- "January",
- "February",
- "Mars",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December",
- NULL,
-};
-
-static const char *ampm[] = {
- "am",
- "pm",
- NULL
-};
-
-/*
- * Try to match `*buf' to one of the strings in `strs'. Return the
- * index of the matching string (or -1 if none). Also advance buf.
- */
-
-static int
-match_string (const char **buf, const char **strs)
-{
- int i = 0;
-
- for (i = 0; strs[i] != NULL; ++i) {
- size_t len = strlen (strs[i]);
-
- if (strncasecmp (*buf, strs[i], len) == 0) {
- *buf += len;
- return i;
- }
- }
- return -1;
-}
-
-/*
- * tm_year is relative this year */
-
-const int tm_year_base = 1900;
-
-/*
- * Return TRUE iff `year' was a leap year.
- */
-
-static int
-is_leap_year (int year)
-{
- return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0);
-}
-
-/*
- * Return the weekday [0,6] (0 = Sunday) of the first day of `year'
- */
-
-static int
-first_day (int year)
-{
- int ret = 4;
-
- for (; year > 1970; --year)
- ret = (ret + 365 + is_leap_year (year) ? 1 : 0) % 7;
- return ret;
-}
-
-/*
- * Set `timeptr' given `wnum' (week number [0, 53])
- */
-
-static void
-set_week_number_sun (struct tm *timeptr, int wnum)
-{
- int fday = first_day (timeptr->tm_year + tm_year_base);
-
- timeptr->tm_yday = wnum * 7 + timeptr->tm_wday - fday;
- if (timeptr->tm_yday < 0) {
- timeptr->tm_wday = fday;
- timeptr->tm_yday = 0;
- }
-}
-
-/*
- * Set `timeptr' given `wnum' (week number [0, 53])
- */
-
-static void
-set_week_number_mon (struct tm *timeptr, int wnum)
-{
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list