Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mono/mono
base: master
...
head fork: mono/mono
compare: mono-1-2
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 8 files changed
  • 0 commit comments
  • 2 contributors
Commits on Nov 02, 2006
Wade Berrier configure.in: version bump to 1.2
svn path=/branches/mono-1-2/mono/; revision=67284
d0f800d
Commits on Nov 08, 2006
Jonathan Pryor * Makefile.am: Add implementation macros for L_SET, L_INCR, and L_XTND.
	* map.c: Make sure that L_SET, L_INCR, and L_XTND are defined.  Lets
	  Mono_Posix_FromSeekFlags() work on Solaris, fixing Gnome Bugzilla 370081.

svn path=/branches/mono-1-2/mono/; revision=67505
3197ffb
Jonathan Pryor * 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=/branches/mono-1-2/mono/; revision=67537
d685b17
Commits on Nov 13, 2006
Jonathan Pryor * mph.h: Add macro for XATTR_AUTO, so that XattrFlags mapping works (as
	  XATTR_AUTO is a value which frequently isn't definedy by any OS, yet it
	  has the value 0, a default value which is supported by most OS's).

svn path=/branches/mono-1-2/mono/; revision=67769
4be7a90
Commits on Nov 15, 2006
Jonathan Pryor * MapAttribute.cs: Update (changes SuppressFlags to a string holding…
… mask).

	* Syscall.cs: Specify the mask value for non-bitmask values in
	  FilePermissions.

svn path=/branches/mono-1-2/mcs/; revision=67940
4c96bfc
Jonathan Pryor * map.c: Flush; removes warnings due to _cnm_return_val_if_overflow(…
…), and

	  fixes FilePermissions conversion, allowing Syscall.stat() to work as 
	  expected.

svn path=/branches/mono-1-2/mono/; revision=67941
f2bb5f2
Commits on Nov 17, 2006
Jonathan Pryor * map.c: Flush (fix FromFilePermissions for SuppressFlags-marked val…
…ues).

svn path=/branches/mono-1-2/mono/; revision=68104
d1e7a30
Commits on Nov 30, 2006
Jonathan Pryor * map.c: _cnm_return_val_if_overflow() should be a no-op unless DEBU…
…G is

    defined.  "Fixes" false positives pending further investigation.

svn path=/branches/mono-1-2/mono/; revision=68773
0f9718c
View
4 ChangeLog
@@ -1,3 +1,7 @@
+2006-11-02 Wade Berrier <wberrier@novell.com>
+
+ * configure.in: version bump to 1.2
+
2006-11-02 Michael Hutchinson <m.j.hutchinson@gmail.com>
* data/net_2_0/machine.config: defaultProxy section is no longer
View
2  configure.in
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,1.1.18)
+AM_INIT_AUTOMAKE(mono,1.2)
AM_MAINTAINER_MODE
AC_PROG_LN_S
View
6 mcs/class/Mono.Posix/Mono.Unix.Native/ChangeLog
@@ -1,3 +1,9 @@
+2006-11-14 Jonathan Pryor <jonpryor@vt.edu>
+
+ * MapAttribute.cs: Update (changes SuppressFlags to a string holding mask).
+ * Syscall.cs: Specify the mask value for non-bitmask values in
+ FilePermissions.
+
2006-10-27 Jonathan Pryor <jonpryor@vt.edu>
* MapAttribute.cs: Update (adds SuppressFlags property).
View
4 mcs/class/Mono.Posix/Mono.Unix.Native/MapAttribute.cs
@@ -37,7 +37,7 @@
AttributeTargets.Struct)]
internal class MapAttribute : Attribute {
private string nativeType;
- private bool suppressFlags;
+ private string suppressFlags;
public MapAttribute ()
{
@@ -52,7 +52,7 @@ public MapAttribute (string nativeType)
get {return nativeType;}
}
- public bool SuppressFlags {
+ public string SuppressFlags {
get {return suppressFlags;}
set {suppressFlags = value;}
}
View
15 mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs
@@ -177,21 +177,20 @@ public enum FilePermissions : uint {
// Device types
// Why these are held in "mode_t" is beyond me...
- [Map(SuppressFlags=true)]
S_IFMT = 0xF000, // Bits which determine file type
- [Map(SuppressFlags=true)]
+ [Map(SuppressFlags="S_IFMT")]
S_IFDIR = 0x4000, // Directory
- [Map(SuppressFlags=true)]
+ [Map(SuppressFlags="S_IFMT")]
S_IFCHR = 0x2000, // Character device
- [Map(SuppressFlags=true)]
+ [Map(SuppressFlags="S_IFMT")]
S_IFBLK = 0x6000, // Block device
- [Map(SuppressFlags=true)]
+ [Map(SuppressFlags="S_IFMT")]
S_IFREG = 0x8000, // Regular file
- [Map(SuppressFlags=true)]
+ [Map(SuppressFlags="S_IFMT")]
S_IFIFO = 0x1000, // FIFO
- [Map(SuppressFlags=true)]
+ [Map(SuppressFlags="S_IFMT")]
S_IFLNK = 0xA000, // Symbolic link
- [Map(SuppressFlags=true)]
+ [Map(SuppressFlags="S_IFMT")]
S_IFSOCK = 0xC000, // Socket
}
View
36 support/ChangeLog
@@ -1,3 +1,39 @@
+2006-11-30 Jonathan Pryor <jonpryor@vt.edu>
+
+ * map.c: _cnm_return_val_if_overflow() should be a no-op unless DEBUG is
+ defined. "Fixes" false positives pending further investigation.
+
+2006-11-17 Jonathan Pryor <jonpryor@vt.edu>
+
+ * map.c: Flush (fix FromFilePermissions for SuppressFlags-marked values).
+
+2006-11-15 Jonathan Pryor <jonpryor@vt.edu>
+
+ * map.c: Flush (removes warnings due to _cnm_return_val_if_overflow()).
+
+2006-11-14 Jonathan Pryor <jonpryor@vt.edu>
+
+ * map.c: Flush (fixes FilePermissions conversion, allowing Syscall.stat() to
+ work as expected).
+
+2006-11-13 Jonathan Pryor <jonpryor@vt.edu>
+
+ * mph.h: Add macro for XATTR_AUTO, so that XattrFlags mapping works (as
+ XATTR_AUTO is a value which frequently isn't definedy by any OS, yet it
+ has the value 0, a default value which is supported by most OS's).
+
+2006-11-08 Jonathan Pryor <jonpryor@vt.edu>
+
+ * 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 <jonpryor@vt.edu>
+
+ * Makefile.am: Add implementation macros for L_SET, L_INCR, and L_XTND.
+ * map.c: Make sure that L_SET, L_INCR, and L_XTND are defined. Lets
+ Mono_Posix_FromSeekFlags() work on Solaris, fixing Gnome Bugzilla 370081.
+
2006-11-01 Jonathan Pryor <jonpryor@vt.edu>
* stdio.c: Some BSDs define clearerr(3) as a macro, so we need to cast
View
78 support/map.c
@@ -204,14 +204,22 @@
#define _cnm_dump_(to_t, from) do {} while (0)
#endif
+#ifdef DEBUG
#define _cnm_return_val_if_overflow(to_t,from,val) G_STMT_START { \
- if (!(_cnm_integral_type_min(to_t) <= from && \
- ((from < 0) || (from <= _cnm_integral_type_max(to_t))))) { \
+ gint64 sf = (gint64) from; \
+ guint64 uf = (guint64) from; \
+ if (!(_cnm_integral_type_min(to_t) <= sf && \
+ ((from < 0) || (uf <= _cnm_integral_type_max(to_t))))) { \
_cnm_dump_(to_t, from); \
errno = EOVERFLOW; \
return (val); \
} \
} G_STMT_END
+#else /* !def DEBUG */
+/* don't do an overflow checking */
+#define _cnm_return_val_if_overflow(to_t,from,val) G_STMT_START { \
+ } G_STMT_END
+#endif /* def DEBUG */
int Mono_Posix_FromAccessModes (int x, int *r)
{
@@ -2254,51 +2262,51 @@ int Mono_Posix_FromFilePermissions (unsigned int x, unsigned int *r)
#else /* def DEFFILEMODE */
{/* Ignoring Mono_Posix_FilePermissions_DEFFILEMODE, as it is constructed from other values */}
#endif /* ndef DEFFILEMODE */
- if (x == Mono_Posix_FilePermissions_S_IFBLK)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFBLK)
#ifdef S_IFBLK
- {*r = S_IFBLK; return 0;}
+ *r |= S_IFBLK;
#else /* def S_IFBLK */
{errno = EINVAL; return -1;}
#endif /* ndef S_IFBLK */
- if (x == Mono_Posix_FilePermissions_S_IFCHR)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFCHR)
#ifdef S_IFCHR
- {*r = S_IFCHR; return 0;}
+ *r |= S_IFCHR;
#else /* def S_IFCHR */
{errno = EINVAL; return -1;}
#endif /* ndef S_IFCHR */
- if (x == Mono_Posix_FilePermissions_S_IFDIR)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFDIR)
#ifdef S_IFDIR
- {*r = S_IFDIR; return 0;}
+ *r |= S_IFDIR;
#else /* def S_IFDIR */
{errno = EINVAL; return -1;}
#endif /* ndef S_IFDIR */
- if (x == Mono_Posix_FilePermissions_S_IFIFO)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFIFO)
#ifdef S_IFIFO
- {*r = S_IFIFO; return 0;}
+ *r |= S_IFIFO;
#else /* def S_IFIFO */
{errno = EINVAL; return -1;}
#endif /* ndef S_IFIFO */
- if (x == Mono_Posix_FilePermissions_S_IFLNK)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFLNK)
#ifdef S_IFLNK
- {*r = S_IFLNK; return 0;}
+ *r |= S_IFLNK;
#else /* def S_IFLNK */
{errno = EINVAL; return -1;}
#endif /* ndef S_IFLNK */
- if (x == Mono_Posix_FilePermissions_S_IFMT)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFMT)
#ifdef S_IFMT
- {*r = S_IFMT; return 0;}
+ *r |= S_IFMT;
#else /* def S_IFMT */
- {errno = EINVAL; return -1;}
+ {/* Ignoring Mono_Posix_FilePermissions_S_IFMT, as it is constructed from other values */}
#endif /* ndef S_IFMT */
- if (x == Mono_Posix_FilePermissions_S_IFREG)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFREG)
#ifdef S_IFREG
- {*r = S_IFREG; return 0;}
+ *r |= S_IFREG;
#else /* def S_IFREG */
{errno = EINVAL; return -1;}
#endif /* ndef S_IFREG */
- if (x == Mono_Posix_FilePermissions_S_IFSOCK)
+ if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFSOCK)
#ifdef S_IFSOCK
- {*r = S_IFSOCK; return 0;}
+ *r |= S_IFSOCK;
#else /* def S_IFSOCK */
{errno = EINVAL; return -1;}
#endif /* ndef S_IFSOCK */
@@ -2415,36 +2423,36 @@ int Mono_Posix_ToFilePermissions (unsigned int x, unsigned int *r)
*r |= Mono_Posix_FilePermissions_DEFFILEMODE;
#endif /* ndef DEFFILEMODE */
#ifdef S_IFBLK
- if (x == S_IFBLK)
- {*r = Mono_Posix_FilePermissions_S_IFBLK; return 0;}
+ if ((x & S_IFMT) == S_IFBLK)
+ *r |= Mono_Posix_FilePermissions_S_IFBLK;
#endif /* ndef S_IFBLK */
#ifdef S_IFCHR
- if (x == S_IFCHR)
- {*r = Mono_Posix_FilePermissions_S_IFCHR; return 0;}
+ if ((x & S_IFMT) == S_IFCHR)
+ *r |= Mono_Posix_FilePermissions_S_IFCHR;
#endif /* ndef S_IFCHR */
#ifdef S_IFDIR
- if (x == S_IFDIR)
- {*r = Mono_Posix_FilePermissions_S_IFDIR; return 0;}
+ if ((x & S_IFMT) == S_IFDIR)
+ *r |= Mono_Posix_FilePermissions_S_IFDIR;
#endif /* ndef S_IFDIR */
#ifdef S_IFIFO
- if (x == S_IFIFO)
- {*r = Mono_Posix_FilePermissions_S_IFIFO; return 0;}
+ if ((x & S_IFMT) == S_IFIFO)
+ *r |= Mono_Posix_FilePermissions_S_IFIFO;
#endif /* ndef S_IFIFO */
#ifdef S_IFLNK
- if (x == S_IFLNK)
- {*r = Mono_Posix_FilePermissions_S_IFLNK; return 0;}
+ if ((x & S_IFMT) == S_IFLNK)
+ *r |= Mono_Posix_FilePermissions_S_IFLNK;
#endif /* ndef S_IFLNK */
#ifdef S_IFMT
- if (x == S_IFMT)
- {*r = Mono_Posix_FilePermissions_S_IFMT; return 0;}
+ if ((x & S_IFMT) == S_IFMT)
+ *r |= Mono_Posix_FilePermissions_S_IFMT;
#endif /* ndef S_IFMT */
#ifdef S_IFREG
- if (x == S_IFREG)
- {*r = Mono_Posix_FilePermissions_S_IFREG; return 0;}
+ if ((x & S_IFMT) == S_IFREG)
+ *r |= Mono_Posix_FilePermissions_S_IFREG;
#endif /* ndef S_IFREG */
#ifdef S_IFSOCK
- if (x == S_IFSOCK)
- {*r = Mono_Posix_FilePermissions_S_IFSOCK; return 0;}
+ if ((x & S_IFMT) == S_IFSOCK)
+ *r |= Mono_Posix_FilePermissions_S_IFSOCK;
#endif /* ndef S_IFSOCK */
#ifdef S_IRGRP
if ((x & S_IRGRP) == S_IRGRP)
View
32 support/mph.h
@@ -49,6 +49,38 @@
#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;

No commit comments for this range

Something went wrong with that request. Please try again.