Browse Source

* Makefile.am: Revert addition of L_SET et al; this breaks the Win32 build.
* map.c: Revert addition of L_SET et al; this breaks the Win32 build.
* mph.h: Add macros for L_SET, L_INCR, and L_XTND for non-Win32 platforms.

svn path=/trunk/mono/; revision=67536

Jonathan Pryor 19 năm trước cách đây
mục cha
commit
8061464a50
4 tập tin đã thay đổi với 28 bổ sung15 xóa
  1. 6 0
      support/ChangeLog
  2. 0 3
      support/Makefile.am
  3. 0 12
      support/map.c
  4. 22 0
      support/mph.h

+ 6 - 0
support/ChangeLog

@@ -1,3 +1,9 @@
+2006-11-08  Jonathan Pryor  <[email protected]>
+
+	* Makefile.am: Revert addition of L_SET et al; this breaks the Win32 build.
+	* map.c: Revert addition of L_SET et al; this breaks the Win32 build.
+	* mph.h: Add macros for L_SET, L_INCR, and L_XTND for non-Win32 platforms.
+
 2006-11-07  Jonathan Pryor  <[email protected]>
 
 	* Makefile.am: Add implementation macros for L_SET, L_INCR, and L_XTND.

+ 0 - 3
support/Makefile.am

@@ -114,9 +114,6 @@ refresh:
 	--impl-header="<dirent.h>"                            \
 	--impl-header="<utime.h>"                             \
 	--impl-header="\"mph.h\""                             \
-	--impl-macro="L_SET=SEEK_SET"                         \
-	--impl-macro="L_INCR=SEEK_CUR"                        \
-	--impl-macro="L_XTND=SEEK_END"                        \
 	--rename-member=st_atime=st_atime_                    \
 	--rename-member=st_ctime=st_ctime_                    \
 	--rename-member=st_mtime=st_mtime_                    \

+ 0 - 12
support/map.c

@@ -21,18 +21,6 @@
 #define _XOPEN_SOURCE
 #endif /* ndef _XOPEN_SOURCE */
 
-#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 */
-
 
 /*
  * Implementation Includes

+ 22 - 0
support/mph.h

@@ -49,6 +49,28 @@
 #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 */
+
+#endif /* ndef PLATFORM_WIN32 */
+
 typedef    gint64 mph_blkcnt_t;
 typedef    gint64 mph_blksize_t;
 typedef   guint64 mph_dev_t;