Changeset: adf28d2c7299 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=adf28d2c7299
Modified Files:
gdk/shared_memory.c
monetdb5/extras/pyapi/benchmark.c
monetdb5/extras/pyapi/benchmark.h
monetdb5/extras/pyapi/pyapi.c
Branch: pyapi
Log Message:
Fixes for other compilers.
diffs (99 lines):
diff --git a/gdk/shared_memory.c b/gdk/shared_memory.c
--- a/gdk/shared_memory.c
+++ b/gdk/shared_memory.c
@@ -138,7 +138,7 @@ str init_shared_memory(int id, size_t si
{
char *err = strerror(errno);
errno = 0;
- return createException(MAL, "shared_memory.get", "Error calling
shmget(key:%d,size:%zu,flags:%d): %s", key, size, flags, err);
+ return createException(MAL, "shared_memory.get", "Error calling
shmget(key:%zu,size:%zu,flags:%d): %s", (size_t)key, size, flags, err);
}
//check if the shared memory segment is already created, if it is we do
not need to add it to the table and can simply return the pointer
@@ -291,18 +291,18 @@ void initialize_shared_memory(void)
NOTIMPLEMENTED();
}
-void* create_shared_memory(int id, size_t size)
+str create_shared_memory(int id, size_t size, void **return_ptr);
{
- (void) id; (void) size;
+ (void) id; (void) size; (void) return_ptr;
NOTIMPLEMENTED();
return NULL;
}
-int release_shared_memory(void *ptr)
+str release_shared_memory(void *ptr);
{
(void) ptr;
NOTIMPLEMENTED();
- return false;
+ return NULL;
}
int get_unique_shared_memory_id(int offset)
@@ -312,9 +312,9 @@ int get_unique_shared_memory_id(int offs
return -1;
}
-void *get_shared_memory(int id, size_t size)
+str get_shared_memory(int id, size_t size, void **return_ptr);
{
- (void) id; (void) size;
+ (void) id; (void) size; (void) return_ptr;
NOTIMPLEMENTED();
return NULL;
}
diff --git a/monetdb5/extras/pyapi/benchmark.c
b/monetdb5/extras/pyapi/benchmark.c
--- a/monetdb5/extras/pyapi/benchmark.c
+++ b/monetdb5/extras/pyapi/benchmark.c
@@ -9,6 +9,8 @@
#include "benchmark.h"
+#ifdef _PYAPI_TESTING_
+
static unsigned long long memtrace_current_memory_bytes = 0;
static unsigned long long memtrace_memory_peak = 0;
@@ -170,3 +172,5 @@ void reset_hook(void)
memtrace_current_memory_bytes = 0;
memtrace_memory_peak = 0;
}
+
+#endif
diff --git a/monetdb5/extras/pyapi/benchmark.h
b/monetdb5/extras/pyapi/benchmark.h
--- a/monetdb5/extras/pyapi/benchmark.h
+++ b/monetdb5/extras/pyapi/benchmark.h
@@ -15,7 +15,10 @@
#define _PYAPI_BENCHMARK_LIB_
#include "monetdb_config.h"
-
+#include "pyapi.h"
+
+#ifdef _PYAPI_TESTING_
+
#ifdef HAVE_TIME_H
#include <time.h>
typedef struct timespec time_storage;
@@ -36,4 +39,7 @@ unsigned long long GET_MEMORY_PEAK(void)
//get current memory usage (note that this only measures the malloc calls
between init_hook() and revert_hook() calls)
unsigned long long GET_MEMORY_USAGE(void);
+
#endif
+
+#endif
diff --git a/monetdb5/extras/pyapi/pyapi.c b/monetdb5/extras/pyapi/pyapi.c
--- a/monetdb5/extras/pyapi/pyapi.c
+++ b/monetdb5/extras/pyapi/pyapi.c
@@ -844,7 +844,6 @@ str PyAPIeval(MalBlkPtr mb, MalStkPtr st
goto wrapup;
}
}
-
VERBOSE_MESSAGE("Collecting return values.\n");
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list