Changeset: 099dbc6798b0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=099dbc6798b0
Modified Files:
ctest/tools/embedded/backup.c
ctest/tools/embedded/example2.c
ctest/tools/embedded/example_decimals.c
monetdb5/modules/mal/mal_io.c
tools/embedded/monetdb_embedded.c
tools/embedded/monetdb_embedded.h
Branch: default
Log Message:
Compilation issues.
diffs (108 lines):
diff --git a/ctest/tools/embedded/backup.c b/ctest/tools/embedded/backup.c
--- a/ctest/tools/embedded/backup.c
+++ b/ctest/tools/embedded/backup.c
@@ -24,7 +24,7 @@ main(void)
error(mid->msg);
if ((err = monetdb_query(mid->conn, "CREATE TABLE test (b bool, t
tinyint, s smallint, x integer, l bigint, "
-#if HAVE_HGE
+#ifdef HAVE_HGE
"h hugeint, "
#else
"h bigint, "
diff --git a/ctest/tools/embedded/example2.c b/ctest/tools/embedded/example2.c
--- a/ctest/tools/embedded/example2.c
+++ b/ctest/tools/embedded/example2.c
@@ -26,7 +26,7 @@ main(void)
if ((err = monetdb_connect(&conn)) != NULL)
error(err)
if ((err = monetdb_query(conn, "CREATE TABLE test (b bool, t tinyint, s
smallint, x integer, l bigint, "
-#if HAVE_HGE
+#ifdef HAVE_HGE
"h hugeint, "
#else
"h bigint, "
@@ -90,7 +90,7 @@ main(void)
}
break;
}
-#if HAVE_HGE
+#ifdef HAVE_HGE
case monetdb_int128_t: {
monetdb_column_int128_t * col =
(monetdb_column_int128_t *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/embedded/example_decimals.c
b/ctest/tools/embedded/example_decimals.c
--- a/ctest/tools/embedded/example_decimals.c
+++ b/ctest/tools/embedded/example_decimals.c
@@ -84,7 +84,7 @@ main(void)
}
break;
}
-#if HAVE_HGE
+#ifdef HAVE_HGE
case monetdb_int128_t: {
monetdb_column_int128_t * col =
(monetdb_column_int128_t *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/monetdb5/modules/mal/mal_io.c b/monetdb5/modules/mal/mal_io.c
--- a/monetdb5/modules/mal/mal_io.c
+++ b/monetdb5/modules/mal/mal_io.c
@@ -686,7 +686,7 @@ IOimport(void *ret, bat *bid, str *fnme)
throw(MAL, "io.imports", OPERATION_FAILED "Empty file");
}
#if SIZEOF_SIZE_T == SIZEOF_INT
- if (st.st_size > ~ (size_t) 0) {
+ if (st.st_size > (off_t) ~ (size_t) 0) {
BBPunfix(b->batCacheid);
GDKfree(buf);
throw(MAL, "io.imports", OPERATION_FAILED "File too
large");
diff --git a/tools/embedded/monetdb_embedded.c
b/tools/embedded/monetdb_embedded.c
--- a/tools/embedded/monetdb_embedded.c
+++ b/tools/embedded/monetdb_embedded.c
@@ -42,7 +42,7 @@ monetdb_type(monetdb_types t) {
case monetdb_int16_t: return TYPE_sht;
case monetdb_int32_t: return TYPE_int;
case monetdb_int64_t: return TYPE_lng;
-#if HAVE_HGE
+#ifdef HAVE_HGE
case monetdb_int128_t: return TYPE_hge;
#endif
case monetdb_size_t: return TYPE_oid;
@@ -846,7 +846,7 @@ GENERATE_BASE_FUNCTIONS(int8_t, int8_t,
GENERATE_BASE_FUNCTIONS(int16_t, int16_t, sht)
GENERATE_BASE_FUNCTIONS(int32_t, int32_t, int)
GENERATE_BASE_FUNCTIONS(int64_t, int64_t, lng)
-#if HAVE_HGE
+#ifdef HAVE_HGE
GENERATE_BASE_FUNCTIONS(__int128, int128_t, hge)
#endif
GENERATE_BASE_FUNCTIONS(size_t, size_t, oid)
@@ -954,7 +954,7 @@ monetdb_result_fetch(monetdb_connection
GENERATE_BAT_INPUT(b, size_t, size_t, oid);
} else if (bat_type == TYPE_lng) {
GENERATE_BAT_INPUT(b, int64_t, int64_t, lng);
-#if HAVE_HGE
+#ifdef HAVE_HGE
} else if (bat_type == TYPE_hge) {
GENERATE_BAT_INPUT(b, __int128, int128_t, hge);
#endif
diff --git a/tools/embedded/monetdb_embedded.h
b/tools/embedded/monetdb_embedded.h
--- a/tools/embedded/monetdb_embedded.h
+++ b/tools/embedded/monetdb_embedded.h
@@ -54,7 +54,7 @@ typedef struct {
typedef enum {
monetdb_bool, monetdb_int8_t, monetdb_int16_t, monetdb_int32_t,
monetdb_int64_t,
-#if HAVE_HGE
+#ifdef HAVE_HGE
monetdb_int128_t,
#endif
monetdb_size_t, monetdb_float, monetdb_double,
@@ -98,7 +98,7 @@ DEFAULT_STRUCT_DEFINITION(int8_t, int8_t
DEFAULT_STRUCT_DEFINITION(int16_t, int16_t);
DEFAULT_STRUCT_DEFINITION(int32_t, int32_t);
DEFAULT_STRUCT_DEFINITION(int64_t, int64_t);
-#if HAVE_HGE
+#ifdef HAVE_HGE
DEFAULT_STRUCT_DEFINITION(__int128, int128_t);
#endif
DEFAULT_STRUCT_DEFINITION(size_t, size_t);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list