Changeset: f2d7422ecbfe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f2d7422ecbfe
Modified Files:
common/utils/mtwist.h
gdk/gdk_sample.c
Branch: stratified_sampling
Log Message:
Fix compilation issues.
diffs (65 lines):
diff --git a/common/utils/mtwist.h b/common/utils/mtwist.h
--- a/common/utils/mtwist.h
+++ b/common/utils/mtwist.h
@@ -31,6 +31,17 @@
#ifndef _SEEN_MTWIST_H
#define _SEEN_MTWIST_H 1
+#ifdef NATIVE_WIN32
+#if !defined(LIBMUTILS) && !defined(LIBGDK) && !defined(LIBMEROUTIL)
+#define mtwist_export extern __declspec(dllimport)
+#else
+#define mtwist_export extern __declspec(dllexport)
+#endif
+#else
+#define mtwist_export extern
+#endif
+
+
#define MTWIST_N 624
#define MTWIST_M 397
@@ -53,15 +64,15 @@ struct mtwist_s {
typedef struct mtwist_s mtwist;
/* constructor */
-mtwist* mtwist_new(void);
+mtwist_export mtwist* mtwist_new(void);
/* destructor */
-void mtwist_free(mtwist* mt);
+mtwist_export void mtwist_free(mtwist* mt);
/* methods */
-void mtwist_seed(mtwist* mt, unsigned int seed);
-unsigned int mtwist_u32rand(mtwist* mt);
-double mtwist_drand(mtwist* mt);
-int mtwist_uniform_int(mtwist* mt, int a, int b);
+mtwist_export void mtwist_seed(mtwist* mt, unsigned int seed);
+mtwist_export unsigned int mtwist_u32rand(mtwist* mt);
+mtwist_export double mtwist_drand(mtwist* mt);
+mtwist_export int mtwist_uniform_int(mtwist* mt, int a, int b);
#endif
diff --git a/gdk/gdk_sample.c b/gdk/gdk_sample.c
--- a/gdk/gdk_sample.c
+++ b/gdk/gdk_sample.c
@@ -23,16 +23,13 @@
* values that should be omitted from the sample.
*/
-#include <math.h>
-
#include "monetdb_config.h"
#include "gdk.h"
#include "gdk_private.h"
-#include "mtwist.h"
+#include <math.h>
-#undef BATsample
-
+#include "mtwist.h"
//TODO share these with gkd_firstn.c
#define siftup(OPER, START, SWAP) \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list