# HG changeset patch
# User Bastian K��cher <git@kchr.de>
# Date 1430127303 -7200
#      Mon Apr 27 11:35:03 2015 +0200
# Node ID 15b3616d864516fbca3d2f10491231f5f31526a2
# Parent  17fed0f3e9773b87533a89a2df9863fc79029112
Fixed compile bug and warnings which occur when you include MonetDB in a c++ project

diff -r 17fed0f3e977 -r 15b3616d8645 gdk/gdk.h
--- a/gdk/gdk.h	Wed Apr 08 10:39:07 2015 +0200
+++ b/gdk/gdk.h	Mon Apr 27 11:35:03 2015 +0200
@@ -3272,7 +3272,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATorder([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATorder([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATorder(_b);						\
@@ -3282,7 +3282,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATorder_rev([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATorder_rev([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATorder_rev(_b);					\
@@ -3292,7 +3292,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATsort([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATsort([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATsort(_b);						\
@@ -3302,7 +3302,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATsort_rev([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATsort_rev([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATsort_rev(_b);					\
@@ -3312,7 +3312,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATssort([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATssort([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATssort(_b);						\
@@ -3322,7 +3322,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATssort_rev([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATssort_rev([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATssort_rev(_b);					\
@@ -3332,7 +3332,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATselect_([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATselect_([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATselect_(_b, (h), (t), (li), (hi));			\
@@ -3342,7 +3342,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATuselect_([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATuselect_([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATuselect_(_b, (h), (t), (li), (hi));			\
@@ -3352,7 +3352,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATselect([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATselect([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATselect(_b, (h), (t));				\
@@ -3362,7 +3362,7 @@
 	({								\
 		BAT *_b = (b);						\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATuselect([%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATuselect([%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
 			__func__, __FILE__, __LINE__);			\
 		BATuselect(_b, (h), (t));				\
@@ -3372,7 +3372,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATsemijoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n", \
+			"#BATsemijoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n", \
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3383,7 +3383,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATjoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n", \
+			"#BATjoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n", \
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3394,7 +3394,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATleftjoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n", \
+			"#BATleftjoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n", \
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3405,7 +3405,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATthetajoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATthetajoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3416,7 +3416,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATouterjoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n",	\
+			"#BATouterjoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n",	\
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3427,7 +3427,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATleftfetchjoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n", \
+			"#BATleftfetchjoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n", \
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3438,7 +3438,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATantijoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n", \
+			"#BATantijoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n", \
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3449,7 +3449,7 @@
 	({								\
 		BAT *_l = (l), *_r = (r);				\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATbandjoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n", \
+			"#BATbandjoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n", \
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_r->H), _COL_TYPE(_r->T), BATcount(_r), \
 			__func__, __FILE__, __LINE__);			\
@@ -3460,7 +3460,7 @@
 	({								\
 		BAT *_l = (l), *_rl = (rl), *_rh = (rh);		\
 		HEADLESSDEBUG fprintf(stderr,				\
-			"#BATrangejoin([%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT",[%s,%s]#"BUNFMT") %s[%s:%d]\n", \
+			"#BATrangejoin([%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ",[%s,%s]#" BUNFMT ") %s[%s:%d]\n", \
 			_COL_TYPE(_l->H), _COL_TYPE(_l->T), BATcount(_l), \
 			_COL_TYPE(_rl->H), _COL_TYPE(_rl->T), BATcount(_rl), \
 			_COL_TYPE(_rh->H), _COL_TYPE(_rh->T), BATcount(_rh), \
diff -r 17fed0f3e977 -r 15b3616d8645 monetdb5/mal/mal_exception.h
--- a/monetdb5/mal/mal_exception.h	Wed Apr 08 10:39:07 2015 +0200
+++ b/monetdb5/mal/mal_exception.h	Mon Apr 27 11:35:03 2015 +0200
@@ -33,8 +33,11 @@
 
 #define MAL_SUCCEED ((str) 0) /* no error */
 
+#ifndef __cplusplus
 #define throw \
 	return createException
+#endif
+
 #define rethrow(FCN, TMP, PRV) \
 	{if ((TMP = PRV) != MAL_SUCCEED) return(TMP);}
 
