Changeset: dd34e12f9443 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd34e12f9443
Modified Files:
        
Branch: sciql
Log Message:

Merge with default branch.


diffs (truncated from 981 to 300 lines):

diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -364,24 +364,14 @@
 PSAPILIB = psapi.lib
 
 # When compiled with plain `nmake`,
-# 32-bit OIDs are used by default on 64-bit Windows
-# (see winconfig.h for details);
-# compile with `nmake MONET_OID64=1` to use 64-bit OIDs on 64-bit Windows;
-# compile with `nmake MONET_OID32=1` to use 32-bit OIDs on 64-bit Windows
-# in case the default is altered in winconfig.h .
-#!IFDEF BITS64
+# 64-bit OIDs are used by default on 64-bit Windows
+# (see monetdb_config.h.in for details);
+# compile with `nmake MONET_OID32=1` to use 32-bit OIDs on 64-bit Windows.
 !IF $(bits) == 64
-!IFNDEF MONET_OID64
 !IFDEF MONET_OID32
 CFLAGS = $(CFLAGS) -DMONET_OID32
 !ENDIF
 !ENDIF
-!IFNDEF MONET_OID32
-!IFDEF MONET_OID64
-CFLAGS = $(CFLAGS) -DMONET_OID64
-!ENDIF
-!ENDIF
-!ENDIF
 
 CONFIG_H = monetdb_config.h
 
diff --git a/geom/monetdb5/geom.mx b/geom/monetdb5/geom.mx
--- a/geom/monetdb5/geom.mx
+++ b/geom/monetdb5/geom.mx
@@ -957,7 +957,7 @@
        GEOSGeom_destroy(geosGeometry);
 
        if (ret != MAL_SUCCEED)
-               throw(MAL, "geom.@1", ret);
+               throw(MAL, "geom.@1", "%s", ret);
 
        return ret;
 }
@@ -1030,7 +1030,7 @@
                        BBPreleaseref(bx->batCacheid);
                        BBPreleaseref(by->batCacheid);
                        BBPreleaseref(bo->batCacheid);
-                       throw(MAL, "geom.point", err);
+                       throw(MAL, "geom.point", "%s", err);
                }
                tfastins_nocheck(bo, o, p, Tsize(bo));
                GDKfree(p);
@@ -1189,7 +1189,7 @@
        GEOSGeom_destroy(ga);
 
        if (ret != MAL_SUCCEED)
-               throw(MAL, "geom.@1", ret);
+               throw(MAL, "geom.@1", "%s", ret);
        return ret;
 }
 @= analysis2
@@ -1221,7 +1221,7 @@
        GEOSGeom_destroy(gb);
 
        if (ret != MAL_SUCCEED)
-               throw(MAL, "geom.@1", ret);
+               throw(MAL, "geom.@1", "%s", ret);
        return ret;
 }
 @= analysis3
diff --git a/monetdb5/mal/mal_exception.mx b/monetdb5/mal/mal_exception.mx
--- a/monetdb5/mal/mal_exception.mx
+++ b/monetdb5/mal/mal_exception.mx
@@ -155,10 +155,18 @@
 #define rethrow(FCN, TMP, PRV) \
        if ((TMP = PRV) != MAL_SUCCEED) return(TMP);
 
-mal_export str createException(enum malexception, str, str, ...);
-mal_export void        showException(enum malexception, str, str, ...);
-mal_export str createScriptException(MalBlkPtr, int, enum malexception, str, 
str, ...);
-mal_export void        showScriptException(MalBlkPtr, int, enum malexception, 
str, ...);
+mal_export str createException(enum malexception, const char *,
+       _In_z_ _Printf_format_string_ const char *, ...)
+       __attribute__((__format__(__printf__, 3, 4)));
+mal_export void        showException(enum malexception, const char *,
+       _In_z_ _Printf_format_string_ const char *, ...)
+       __attribute__((__format__(__printf__, 3, 4)));
+mal_export str createScriptException(MalBlkPtr, int, enum malexception, const 
char *,
+       _In_z_ _Printf_format_string_ const char *, ...)
+       __attribute__((__format__(__printf__, 5, 6)));
+mal_export void        showScriptException(MalBlkPtr, int, enum malexception,
+       _In_z_ _Printf_format_string_ const char *, ...)
+       __attribute__((__format__(__printf__, 4, 5)));
 mal_export int isExceptionVariable(str nme);
 
 mal_export enum malexception   getExceptionType(str);
@@ -212,7 +220,7 @@
  * is good.
  */
 static str
-createExceptionInternal(enum malexception type, str fcn, str format, va_list 
ap)
+createExceptionInternal(enum malexception type, const char *fcn, const char 
*format, va_list ap)
 {
        char *message;
        int len;
@@ -237,7 +245,7 @@
  * the exceptionNames array.
  */
 str
-createException(enum malexception type, str fcn, str format, ...)
+createException(enum malexception type, const char *fcn, const char *format, 
...)
 {
        va_list ap;
        str ret;
@@ -284,7 +292,7 @@
  * console as defined by GDKout.
  */
 void
-showException(enum malexception type, str fcn, str format, ...)
+showException(enum malexception type, const char *fcn, const char *format, ...)
 {
        va_list ap;
        str msg;
@@ -307,7 +315,7 @@
  * is good.
  */
 static str
-createScriptExceptionInternal(MalBlkPtr mb, int pc, enum malexception type, 
str prev, str format, va_list ap)
+createScriptExceptionInternal(MalBlkPtr mb, int pc, enum malexception type, 
const char *prev, const char *format, va_list ap)
 {
        char buf[GDKMAXERRLEN];
        size_t i;
@@ -337,7 +345,7 @@
  * malexception enum is not aligned with the exceptionNames array.
  */
 str
-createScriptException(MalBlkPtr mb, int pc, enum malexception type, str prev, 
str format, ...)
+createScriptException(MalBlkPtr mb, int pc, enum malexception type, const char 
*prev, const char *format, ...)
 {
        va_list ap;
        str ret;
@@ -355,7 +363,7 @@
  * defined by GDKout.
  */
 void
-showScriptException(MalBlkPtr mb, int pc, enum malexception type, str format, 
...)
+showScriptException(MalBlkPtr mb, int pc, enum malexception type, const char 
*format, ...)
 {
        va_list ap;
        str msg;
diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx
--- a/monetdb5/mal/mal_interpreter.mx
+++ b/monetdb5/mal/mal_interpreter.mx
@@ -1684,7 +1684,7 @@
                ret = NULL;
                if (getVarType(mb, getDestVar(pci)) == TYPE_str) {
                        ret = createScriptException(mb, stkpc, MAL, NULL,
-                               stk->stk[getDestVar(pci)].val.sval);
+                               "%s", stk->stk[getDestVar(pci)].val.sval);
                }
                @:skipToCatch(exceptionVar, @2, stk)@
                if (stkpc == mb->stop)
diff --git a/monetdb5/mal/mal_parser.mx b/monetdb5/mal/mal_parser.mx
--- a/monetdb5/mal/mal_parser.mx
+++ b/monetdb5/mal/mal_parser.mx
@@ -1795,7 +1795,7 @@
        sprintf(buf,"input%d",(int)(cntxt-mal_clients));
        f = fopen(buf,"w");
        if (f==NULL)
-               showException(SYNTAX, "temp file not writeable", "");
+               showException(SYNTAX, "parser", "temp file not writeable");
        while( (c=currChar(cntxt)) == '[' && c){
                do {
                        if (f && c) fputc(c, f);
@@ -1804,8 +1804,8 @@
                if (f && c && fputc(c, f)  == EOF){
                        (void)fclose(f);
                        if (unlink(buf) < 0)
-                               showException(SYNTAX, "out of temp file space 
and unable to unlink", "");
-                       showException(SYNTAX, "out of temp file space", "");
+                               showException(SYNTAX, "parser", "out of temp 
file space and unable to unlink");
+                       showException(SYNTAX, "parser", "out of temp file 
space");
                        return;
                }
                nextChar(cntxt);
@@ -2005,7 +2005,7 @@
        *s++= '\n';
        *s = 0;
        if( s != buf+1 && strlen(buf)<1024){
-               showException(SYNTAX, "parseError", buf);
+               showException(SYNTAX, "parseError", "%s", buf);
                /* produce the position marker*/
                s= buf;
                i = position(cntxt) -1;
@@ -2019,7 +2019,7 @@
        if( msg && strlen(msg))
                snprintf(s,1020,"%s", msg);
        skipToEnd(cntxt);
-       showException(SYNTAX, "parseError", buf);
+       showException(SYNTAX, "parseError", "%s", buf);
        return 0;
 }
 @}
diff --git a/monetdb5/mal/mal_session.mx b/monetdb5/mal/mal_session.mx
--- a/monetdb5/mal/mal_session.mx
+++ b/monetdb5/mal/mal_session.mx
@@ -680,7 +680,7 @@
                msg = (str) runMAL(c, prg->def, 1, 0, c->glb, 0);
        if (msg) {
                str place = getExceptionPlace(msg);
-               showException(getExceptionType(msg), place, 
getExceptionMessage(msg));
+               showException(getExceptionType(msg), place, "%s", 
getExceptionMessage(msg));
                GDKfree(place);
                if (!c->listing)
                        printFunction(c->fdout, c->curprg->def, 0, c->listing);
diff --git a/monetdb5/modules/atoms/batxml.mx b/monetdb5/modules/atoms/batxml.mx
--- a/monetdb5/modules/atoms/batxml.mx
+++ b/monetdb5/modules/atoms/batxml.mx
@@ -332,7 +332,7 @@
                xmlFreeDoc(doc);
        if (content != NULL)
                GDKfree(content);
-       throw(MAL, "xml.text", err );
+       throw(MAL, "xml.text", "%s", err );
 }
 
 @-
@@ -395,7 +395,7 @@
        BBPunfix(bn->batCacheid);
        if ( buf != NULL )
                GDKfree(buf);
-       throw(MAL, "xml.xml", err);
+       throw(MAL, "xml.xml", "%s", err);
 }
 
 str
@@ -454,7 +454,7 @@
        GDKfree(buf);
        BBPreleaseref(b->batCacheid);
        BBPunfix(bn->batCacheid);
-       throw(MAL, "xml.document",err);
+       throw(MAL, "xml.document", "%s", err);
 }
 
 str
@@ -533,7 +533,7 @@
                GDKfree(buf);
        BBPreleaseref(b->batCacheid);
        BBPunfix(bn->batCacheid);
-       throw(MAL, "xml.document", err);
+       throw(MAL, "xml.document", "%s", err);
 }
 
 str
@@ -649,7 +649,7 @@
                GDKfree(buf);
        if ( val != NULL)
                GDKfree(val);
-       throw(MAL, "batxml.options", err);
+       throw(MAL, "batxml.options", "%s", err);
 }
 
 str
@@ -705,7 +705,7 @@
        BBPunfix(bn->batCacheid);
        if ( buf != NULL)
                GDKfree(buf);
-       throw(MAL, "xml.comment", err);
+       throw(MAL, "xml.comment", "%s", err);
 }
 
 str
@@ -775,7 +775,7 @@
        BBPunfix(bn->batCacheid);
        if ( buf != NULL )
                GDKfree(buf);
-       throw(MAL, "xml.pi", err);
+       throw(MAL, "xml.pi", "%s", err);
 }
 
 str
@@ -854,7 +854,7 @@
        BBPunfix(bn->batCacheid);
        if ( buf != NULL )
                GDKfree(buf);
-       throw(MAL, "xml.root", err);
+       throw(MAL, "xml.root", "%s", err);
 }
 
 str
@@ -915,7 +915,7 @@
        BBPunfix(bn->batCacheid);
        if ( buf != NULL )
                GDKfree(buf);
-       throw(MAL, "xml.attribute", err);
+       throw(MAL, "xml.attribute", "%s", err);
 }
 
 str
@@ -1002,7 +1002,7 @@
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to