Changeset: 85d8dad1a95c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=85d8dad1a95c
Modified Files:
        common/utils/mutils.h
        gdk/gdk_interprocess.c
        monetdb5/extras/rapi/rapi.c
        monetdb5/modules/mal/mal_mapi.c
        sql/backends/monet5/UDF/capi/capi.c
Branch: default
Log Message:

And now it also compiles on Linux...


diffs (118 lines):

diff --git a/common/utils/mutils.h b/common/utils/mutils.h
--- a/common/utils/mutils.h
+++ b/common/utils/mutils.h
@@ -19,6 +19,27 @@
 #define mutils_export extern
 #endif
 
+#ifndef S_IWGRP
+/* if one doesn't exist, presumably they all don't exist - Not so on MinGW */
+#define S_IRUSR 0000400                /* read permission, owner */
+#define S_IWUSR 0000200                /* write permission, owner */
+#define S_IXUSR 0000100                /* execute permission, owner */
+#define S_IRGRP 0000040                /* read permission, group */
+#define S_IWGRP 0000020                /* write permission, group */
+#define S_IXGRP 0000010                /* execute permission, group */
+#define S_IROTH 0000004                /* read permission, other */
+#define S_IWOTH 0000002                /* write permission, other */
+#define S_IXOTH 0000001                /* execute permission, other */
+#endif
+
+#define MONETDB_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | 
S_IWOTH)
+#define MONETDB_DIRMODE                (MONETDB_MODE | S_IXUSR | S_IXGRP | 
S_IXOTH)
+
+#define F_TEST 3               /* test a region for other processes locks.  */
+#define F_TLOCK        2               /* test and lock a region for exclusive 
use */
+#define F_ULOCK        0               /* unlock a previously locked region */
+#define F_LOCK 1               /* lock a region for exclusive use */
+
 #ifdef NATIVE_WIN32
 
 #include <stdio.h>
@@ -59,6 +80,14 @@ mutils_export int MT_access(const char *
 
 #else
 
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#define MONETDB_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | 
S_IWOTH)
+#define MONETDB_DIRMODE                (MONETDB_MODE | S_IXUSR | S_IXGRP | 
S_IXOTH)
+
 static inline FILE *
 MT_fopen(const char *filename, const char *mode)
 {
@@ -115,27 +144,6 @@ MT_access(const char *pathname, int mode
 
 #endif
 
-#ifndef S_IWGRP
-/* if one doesn't exist, presumably they all don't exist - Not so on MinGW */
-#define S_IRUSR 0000400                /* read permission, owner */
-#define S_IWUSR 0000200                /* write permission, owner */
-#define S_IXUSR 0000100                /* execute permission, owner */
-#define S_IRGRP 0000040                /* read permission, group */
-#define S_IWGRP 0000020                /* write permission, group */
-#define S_IXGRP 0000010                /* execute permission, group */
-#define S_IROTH 0000004                /* read permission, other */
-#define S_IWOTH 0000002                /* write permission, other */
-#define S_IXOTH 0000001                /* execute permission, other */
-#endif
-
-#define MONETDB_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | 
S_IWOTH)
-#define MONETDB_DIRMODE                (MONETDB_MODE | S_IXUSR | S_IXGRP | 
S_IXOTH)
-
-#define F_TEST 3               /* test a region for other processes locks.  */
-#define F_TLOCK        2               /* test and lock a region for exclusive 
use */
-#define F_ULOCK        0               /* unlock a previously locked region */
-#define F_LOCK 1               /* lock a region for exclusive use */
-
 mutils_export int MT_lockf(const char *filename, int mode);
 
 mutils_export void print_trace(void);
diff --git a/gdk/gdk_interprocess.c b/gdk/gdk_interprocess.c
--- a/gdk/gdk_interprocess.c
+++ b/gdk/gdk_interprocess.c
@@ -13,6 +13,7 @@
 #include "gdk_interprocess.h"
 #include "gdk.h"
 #include "gdk_private.h"
+#include "mutils.h"
 
 #include <string.h>
 
diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c
--- a/monetdb5/extras/rapi/rapi.c
+++ b/monetdb5/extras/rapi/rapi.c
@@ -18,6 +18,7 @@
 #include "gdk.h"
 #include "sql_catalog.h"
 #include "sql_execute.h"
+#include "mutils.h"
 
 #define RAPI_MAX_TUPLES 2147483647L
 
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -34,6 +34,7 @@
 #include <sys/types.h>
 #include "stream_socket.h"
 #include "mapi.h"
+#include "mutils.h"
 
 #ifdef HAVE_OPENSSL
 # include <openssl/rand.h>             /* RAND_bytes() */
diff --git a/sql/backends/monet5/UDF/capi/capi.c 
b/sql/backends/monet5/UDF/capi/capi.c
--- a/sql/backends/monet5/UDF/capi/capi.c
+++ b/sql/backends/monet5/UDF/capi/capi.c
@@ -12,6 +12,7 @@
 
 #include "gdk_time.h"
 #include "blob.h"
+#include "mutils.h"
 
 #include <setjmp.h>
 #include <signal.h>
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to