Revert 67496 as it makes running Paint.NET impossible
[mono.git] / support / mph.h
index 14458a034793f98157a2f9e58eb31fc255f06ae3..56f83e52b16e6c832bab0b8ec843fd640c2b3abb 100644 (file)
 #define EOVERFLOW 75
 #endif /* def PLATFORM_WIN32 && ndef EOVERFLOW */
 
+#if !defined (PLATFORM_WIN32)
+
+/* 
+ * Solaris doesn't define these BSD values, and if they're not present then
+ * map.c:Mono_Posix_FromSeekFlags() breaks badly; see:
+ * http://bugzilla.gnome.org/show_bug.cgi?id=370081
+ */
+
+#ifndef L_SET
+#define L_SET SEEK_SET
+#endif /* ndef L_SET */
+
+#ifndef L_INCR
+#define L_INCR SEEK_CUR
+#endif /* ndef L_INCR */
+
+#ifndef L_XTND
+#define L_XTND SEEK_END
+#endif /* ndef L_XTND */
+
+/*
+ * XATTR_AUTO is a synonym for 0 within XattrFlags, but most systems don't
+ * define it.  map.c doesn't know that, though, so we ensure that it's defined
+ * so that the value 0 round-trips through MonoPosixHelper.
+ */
+
+#ifndef XATTR_AUTO
+#define XATTR_AUTO 0
+#endif /* ndef XATTR_AUTO */
+
+#endif /* ndef PLATFORM_WIN32 */
+
 typedef    gint64 mph_blkcnt_t;
 typedef    gint64 mph_blksize_t;
 typedef   guint64 mph_dev_t;