Changeset: 5323c72004c9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5323c72004c9
Modified Files:
        bootstrap
        clients/Tests/exports.stable.out
        configure.ag
        sql/backends/monet5/datacell/datacell.c
        sql/backends/monet5/datacell/emitter.c
        sql/backends/monet5/datacell/receptor.c
        sql/common/sql_changeset.c
        sql/storage/store.c
        sql/storage/store_sequence.c
        testing/difflib.c
Branch: default
Log Message:

Merge with Jan2014 branch.


diffs (truncated from 488 to 300 lines):

diff --git a/bootstrap b/bootstrap
--- a/bootstrap
+++ b/bootstrap
@@ -56,3 +56,6 @@ aclocal ${_m4_extra_dirs} &&
 autoheader  &&
 automake --add-missing --copy --foreign  &&
 autoconf
+if [ -f buildtools/conf/install-sh -a ! -x buildtools/conf/install-sh ]; then
+    chmod +x buildtools/conf/install-sh
+fi
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -269,14 +269,14 @@ MT_Lock *volatile GDKlocklist;
 ATOMIC_FLAG volatile GDKlocklistlock;
 ATOMIC_TYPE volatile GDKlocksleepcnt;
 void GDKlockstatistics(int);
-void *GDKmalloc(size_t size) __attribute__((__alloc_size__(1)));
+void *GDKmalloc(size_t size);
 size_t GDKmem_cursize(void);
-void *GDKmmap(const char *path, int mode, size_t len) 
__attribute__((__alloc_size__(3)));
+void *GDKmmap(const char *path, int mode, size_t len);
 int GDKms(void);
 int GDKnr_threads;
 void GDKqsort(void *h, void *t, const void *base, size_t n, int hs, int ts, 
int tpe);
 void GDKqsort_rev(void *h, void *t, const void *base, size_t n, int hs, int 
ts, int tpe);
-void *GDKrealloc(void *pold, size_t size) __attribute__((__alloc_size__(2)));
+void *GDKrealloc(void *pold, size_t size);
 void GDKsetenv(str name, str value);
 ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t 
len);
 str GDKstrdup(const char *s);
@@ -287,7 +287,7 @@ lng GDKusec(void);
 BAT *GDKval;
 const char *GDKversion(void);
 size_t GDKvm_cursize(void);
-void *GDKzalloc(size_t size) __attribute__((__alloc_size__(1)));
+void *GDKzalloc(size_t size);
 void HASHdestroy(BAT *b);
 BUN HASHlist(Hash *h, BUN i);
 BUN HASHprobe(Hash *h, const void *v);
@@ -318,7 +318,7 @@ void MT_locktrace_end(void);
 char *MT_locktrace_nme[65536];
 void MT_locktrace_start(void);
 struct Mallinfo MT_mallinfo(void);
-void *MT_mmap(const char *path, int mode, size_t len) 
__attribute__((__alloc_size__(3)));
+void *MT_mmap(const char *path, int mode, size_t len);
 int MT_munmap(void *p, size_t len);
 int MT_path_absolute(const char *path);
 void MT_sleep_ms(unsigned int ms);
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -407,9 +407,20 @@ case "$CC_version" in
        CC_ver="clang-$gcc_ver"
        ;;
 *)
-       AC_MSG_WARN([compiler not recognized: `$CC --version` says
+       CC_version="`$CC -V 2>&1`"
+       case "$CC_version" in
+       *Sun\ Ceres\ C\ *|*Sun\ C\ *)
+               # developer/sunstudioexpress and
+               # developer/sunstudio12u1 respectively
+               CC_ver="suncc-`echo "$CC_version" | sed -n 's/.*Sun Ceres C 
\(.*\) SunOS.*/\1/p;s/.*Sun C \(.*\) SunOS.*/\1/p'`"
+               ;;
+       *)
+               AC_MSG_WARN([compiler not recognized: `$CC --version` says
 $CC_version
-       ]);;
+       ])
+               ;;
+       esac
+       ;;
 esac
 AC_MSG_RESULT($CC_ver)
 
@@ -419,6 +430,7 @@ yes!*clang*!clang-*)        ;;
 yes!*gcc*!clang-*)     ;;
 yes!*gcc*!gcc-*)       ;;
 !*icc*!icc-*)  ;;
+*!*!suncc-*)   ;;
 *)     AC_MSG_WARN([compiler potentially not (correctly) recognized:
 GCC=$GCC
 CC=$CC
@@ -1129,6 +1141,8 @@ AC_PATH_PROG(BASH,bash, /usr/bin/bash, $
 AC_CHECK_PROG(RM,rm,rm -f)
 AC_CHECK_PROG(MV,mv,mv -f)
 AC_PROG_LN_S
+AC_CHECK_PROGS(DIFF,gdiff diff)
+AC_DEFINE_UNQUOTED([DIFF], "$DIFF", [Program to perform diffs])
 
 AC_CHECK_PROGS(RPMBUILD,rpmbuild rpm)
 
@@ -1873,8 +1887,8 @@ if test "x$have_pthread" != xno; then
        save_LIBS="$LIBS"
        save_CPPFLAGS="$CPPFLAGS"
        case $GCC-$have_pthread-$CC_ver in
-               yes-auto-clang-5.0|yes-yes-clang-5.0)
-                       # clang 5.0 (at least on Mac OSX Mavericks) does not
+               yes-auto-clang-5.*|yes-yes-clang-5.*)
+                       # clang 5.* (at least on Mac OSX Mavericks) does not
                        # seem to have / require -pthread as compiler
                        # option; on Mac OSX Mavericks, "Apple LLVM version
                        # 5.0 (clang-500.2.79) (based on LLVM 3.3svn)"
@@ -1900,7 +1914,7 @@ if test "x$have_pthread" != xno; then
                        LIBS="$LIBS $PTHREAD_LIBS"
                        pthread_found=yes
                        AC_SEARCH_LIBS([sem_init], [pthreadGC2 pthreadGC1 
pthreadGC pthread],
-                               [LIBS="$LIBS $ac_cv_search_sem_init"],
+                               [test "$ac_cv_search_sem_init" = "none 
required" || LIBS="$LIBS $ac_cv_search_sem_init"],
                                [pthread_found=no])
                        if test x"$pthread_found" = xno ; then
                                pthread_found=yes
@@ -2467,9 +2481,21 @@ if test x"$have_atomic_ops" = x"yes" ; t
                why_have_atomic_ops="(atomic_ops do not compile with Intel's 
icc)"
                ;;
        *)
-               AC_DEFINE(HAVE_LIBATOMIC_OPS, 1, [Define if you have the 
libatomic_ops library])
+               # On some systems, notably OpenIndiana, atomic_ops may
+               # seem to be installed in that there is a pkg-config
+               # file for it, but that file contains incorrect
+               # information, and can not, in fact, be used.  The
+               # bogus pkg-config file for atomic_ops is part of the
+               # library/gc package.
+               save_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS $atomic_ops_CFLAGS"
-               LIBS="$LIBS $atomic_ops_LIBS"
+               
AC_CHECK_HEADERS([atomic_ops.h],[have_atomic_ops=yes],[have_atomic_ops=no 
why_have_atomic_ops="(atomic_ops was incorrectly installed (happens on at least 
Solaris/OpenIndiana))"])
+               CFAGS="$save_CFLAGS"
+               if test x"$have_atomic_ops" = x"yes" ; then
+                       AC_DEFINE(HAVE_LIBATOMIC_OPS, 1, [Define if you have 
the libatomic_ops library])
+                       CFLAGS="$CFLAGS $atomic_ops_CFLAGS"
+                       LIBS="$LIBS $atomic_ops_LIBS"
+               fi
                ;;
        esac
 fi
@@ -2996,6 +3022,9 @@ AC_SUBST(HWCOUNTERS_LIBS)
 AC_SUBST(HWCOUNTERS_INCS)
 
 dnl check dependencies (might need more than just SQL)
+if test x"$enable_sql" = xyes && test x"$enable_monetdb5" = x"no" ; then
+       AC_MSG_ERROR([MonetDB/SQL requires MonetDB5${disable_monetdb5:+ 
$disable_monetdb5}.])
+fi
 if test x"$enable_sql" = xauto && test x"$enable_monetdb5" = x"no" ; then
        enable_sql=no
        if test "x$disable_sql" = x; then
diff --git a/sql/backends/monet5/datacell/datacell.c 
b/sql/backends/monet5/datacell/datacell.c
--- a/sql/backends/monet5/datacell/datacell.c
+++ b/sql/backends/monet5/datacell/datacell.c
@@ -89,12 +89,12 @@ DCprelude(Client cntxt, MalBlkPtr mb, Ma
        MT_lock_init( &dcLock, "datacellLock");
 #endif
        addPipeDefinition(cntxt, "datacell_pipe",
-               
"optimizer.inline();optimizer.remap();optimizer.datacell();optimizer.garbageCollector();"
-               
"optimizer.evaluate();optimizer.costModel();optimizer.coercions();optimizer.emptySet();"
-               
"optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();"
-               
"optimizer.commonTerms();optimizer.groups();optimizer.joinPath();optimizer.reorder();"
-               
"optimizer.deadcode();optimizer.reduce();optimizer.dataflow();optimizer.history();"
-               
"optimizer.multiplex();optimizer.accumulators();optimizer.garbageCollector();");
+       "optimizer.inline(); 
optimizer.remap();optimizer.datacell();optimizer.costModel();"
+       "optimizer.coercions(); optimizer.evaluate(); optimizer.emptySet(); 
optimizer.aliases();"
+       "optimizer.pushselect(); optimizer.mitosis(); optimizer.mergetable(); 
optimizer.deadcode();"
+       "optimizer.commonTerms(); optimizer.joinPath(); optimizer.reorder(); 
optimizer.deadcode();"
+       "optimizer.reduce(); optimizer.matpack(); optimizer.dataflow(); 
optimizer.querylog();"
+       "optimizer.multiplex(); optimizer.garbageCollector();");
        return MAL_SUCCEED;
 }
 
diff --git a/sql/backends/monet5/datacell/emitter.c 
b/sql/backends/monet5/datacell/emitter.c
--- a/sql/backends/monet5/datacell/emitter.c
+++ b/sql/backends/monet5/datacell/emitter.c
@@ -114,7 +114,7 @@ EMemitterStartInternal(int *ret, str *tb
                throw(MAL, "emitter.new", "Group '%s' has no members", *tbl);
 
        em->table.format = GDKzalloc(sizeof(Column) * (len + 1));
-       em->table.format[0].c[0] = NULL;
+       em->table.format[0].c = NULL;
        em->table.format[0].name = NULL;
        em->table.format[0].sep = "[ ";
        em->table.format[0].seplen = (int) strlen(em->table.format[0].sep);
@@ -126,23 +126,22 @@ EMemitterStartInternal(int *ret, str *tb
                        throw(MAL, "receptor.new", "Could not access 
descriptor");
                }
 
-               em->table.format[j].c[0] = BATcopy(b, b->htype, b->ttype, 
FALSE);
-               em->table.format[j].ci[0] = 
bat_iterator(em->table.format[j].c[0]);
+               em->table.format[j].c = BATcopy(b, b->htype, b->ttype, FALSE);
+               em->table.format[j].ci = bat_iterator(em->table.format[j].c);
                em->table.format[j].name = baskets[idx].cols[i];
                em->table.format[j].sep = ",";
                em->table.format[j].seplen = (int) 
strlen(em->table.format[j].sep);
-               em->table.format[j].type = 
GDKstrdup(ATOMname(em->table.format[j].c[0]->ttype));
-               em->table.format[j].adt = em->table.format[j].c[0]->ttype;
+               em->table.format[j].type = 
GDKstrdup(ATOMname(em->table.format[j].c->ttype));
+               em->table.format[j].adt = em->table.format[j].c->ttype;
                em->table.format[j].nullstr = "";
-               em->table.format[j].tostr = &TABLETadt_toStr;
-               em->table.format[j].frstr = &TABLETadt_frStr;
+               em->table.format[j].tostr = (void*) &TABLETadt_toStr;
+               em->table.format[j].frstr = (void*) &TABLETadt_frStr;
                em->table.format[j].extra = em->table.format + j;
                em->table.format[j].len = 0;
                em->table.format[j].nillen = 0;
                em->table.format[j].data = NULL;
                j++;
        }
-       GDKfree(em->table.format[j - 1].sep);
        em->table.format[j - 1].sep = "\n";
        em->table.format[j - 1].seplen = (int) strlen(em->table.format[j - 
1].sep);
        em->table.nr_attrs = j;
@@ -274,7 +273,6 @@ static void
 EMbody(Emitter em)
 {
        BUN cnt;
-       size_t j;
        int k, ret;
        BAT *b;
 
@@ -326,27 +324,27 @@ bodyRestart:
                 */
                BSKTlock(&em->lck, &em->name, &em->delay);
                for (k = 0; k < baskets[em->bskt].colcount; k++) {
-                       if (em->table.format[k].c[0])
-                               BBPunfix(em->table.format[k].c[0]->batCacheid);
+                       if (em->table.format[k].c)
+                               BBPunfix(em->table.format[k].c->batCacheid);
                        b = baskets[em->bskt].primary[k];
-                       em->table.format[k].c[0] = BATcopy(b, b->htype, 
b->ttype, TRUE);
-                       em->table.format[k].ci[0] = bat_iterator(b);
+                       em->table.format[k].c = BATcopy(b, b->htype, b->ttype, 
TRUE);
+                       em->table.format[k].ci = bat_iterator(b);
                        BATclear(b, FALSE);
                }
                BSKTunlock(&em->lck, &em->name);
-               if ((cnt = BATcount(em->table.format[0].c[0]))) {
+               if ((cnt = BATcount(em->table.format[0].c))) {
                        MTIMEcurrent_timestamp(&baskets[em->bskt].seen);
                        em->cycles++;
 
-                       cnt = BATcount(em->table.format[1].c[0]);
+                       cnt = BATcount(em->table.format[1].c);
 #ifdef _DEBUG_EMITTER_
                        mnstr_printf(EMout, "#Emit " BUNFMT " tuples \n", cnt);
 #endif
                        em->table.nr = cnt;
 
                        (void) MTIMEcurrent_timestamp(&em->lastseen);
-                       ret = TABLEToutput_file(&em->table, 
em->table.format[1].c[0], em->emitter);
-                       em->sent += (int) BATcount(em->table.format[1].c[0]);
+                       ret = TABLEToutput_file(&em->table, 
em->table.format[1].c, em->emitter);
+                       em->sent += (int) BATcount(em->table.format[1].c);
 #ifdef _DEBUG_EMITTER_
                        if (ret < 0)
                                mnstr_printf(EMout, "#Tuple emission failed\n");
@@ -491,7 +489,7 @@ EMtable(int *nameId, int *hostId, int *p
        BATseqbase(status, 0);
 
        for (; em; em = em->nxt)
-       if ( em->table.format[1].c[0]){
+       if ( em->table.format[1].c){
                BUNappend(name, em->name, FALSE);
                BUNappend(host, em->host, FALSE);
                BUNappend(port, &em->port, FALSE);
@@ -500,7 +498,7 @@ EMtable(int *nameId, int *hostId, int *p
                BUNappend(status, statusname[em->status], FALSE);
                BUNappend(seen, &em->lastseen, FALSE);
                BUNappend(cycles, &em->cycles, FALSE);
-               em->pending += (int) BATcount(em->table.format[1].c[0]);
+               em->pending += (int) BATcount(em->table.format[1].c);
                BUNappend(pending, &em->pending, FALSE);
                BUNappend(sent, &em->sent, FALSE);
        }
diff --git a/sql/backends/monet5/datacell/receptor.c 
b/sql/backends/monet5/datacell/receptor.c
--- a/sql/backends/monet5/datacell/receptor.c
+++ b/sql/backends/monet5/datacell/receptor.c
@@ -139,14 +139,14 @@ RCreceptorStartInternal(int *ret, str *t
                        throw(MAL, "receptor.new", "Could not access 
descriptor");
                }
                BBPincref(b->batCacheid, TRUE);
-               fmt[j].c[0] = b;
+               fmt[j].c = b;
                fmt[j].name = baskets[idx].cols[i];
                fmt[j].sep = ",";
                fmt[j].seplen = 1;
                fmt[j].type = GDKstrdup(ATOMname(b->ttype));
                fmt[j].adt = (b)->ttype;
-               fmt[j].tostr = &TABLETadt_toStr;
-               fmt[j].frstr = &TABLETadt_frStr;
+               fmt[j].tostr = (void*) &TABLETadt_toStr;
+               fmt[j].frstr = (void*) &TABLETadt_frStr;
                fmt[j].extra = fmt + j;
                fmt[j].len = fmt[j].nillen =
                                                 ATOMlen(fmt[j].adt, 
ATOMnilptr(fmt[j].adt));
@@ -345,7 +345,7 @@ insert_val(Column *fmt, char *s, char *e
                /* string needs the quotes included */
                s = find_quote(s, quote);
                if (!s) {
-                       snprintf(buf, BUFSIZ, "quote '%c' expected but not 
found in \"%s\" from line " BUNFMT "\n", quote, s, BATcount(fmt->c[0]));
+                       snprintf(buf, BUFSIZ, "quote '%c' expected but not 
found in \"%s\" from line " BUNFMT "\n", quote, s, BATcount(fmt->c));
                        *err = GDKstrdup(buf);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to