Compare commits

...
8 Commits
Author SHA1 Message Date
Jonathan Pryor 0f9718c237 * map.c: _cnm_return_val_if_overflow() should be a no-op unless DEBUG is
defined.  "Fixes" false positives pending further investigation.

svn path=/branches/mono-1-2/mono/; revision=68773
2006-11-30 20:08:48 +00:00
Jonathan Pryor d1e7a30f0e * map.c: Flush (fix FromFilePermissions for SuppressFlags-marked values).
svn path=/branches/mono-1-2/mono/; revision=68104
2006-11-17 21:34:24 +00:00
Jonathan Pryor f2bb5f2236 * 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
2006-11-15 16:39:43 +00:00
Jonathan Pryor 4c96bfc885 * 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
2006-11-15 16:36:38 +00:00
Jonathan Pryor 4be7a90877 * 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
2006-11-13 17:07:15 +00:00
Jonathan Pryor d685b17d8a * 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
2006-11-08 15:15:42 +00:00
Jonathan Pryor 3197ffb430 * 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
2006-11-08 01:02:15 +00:00
Wade Berrier d0f800d5aa configure.in: version bump to 1.2
svn path=/branches/mono-1-2/mono/; revision=67284
2006-11-02 17:41:22 +00:00
8 changed files with 131 additions and 46 deletions

No files matched your search

+4
View File
@@ -1,3 +1,7 @@
2006-11-02 Wade Berrier <[email protected]>
* configure.in: version bump to 1.2
2006-11-02 Michael Hutchinson <[email protected]>
* data/net_2_0/machine.config: defaultProxy section is no longer
+1 -1
View File
@@ -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
@@ -1,3 +1,9 @@
2006-11-14 Jonathan Pryor <[email protected]>
* 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 <[email protected]>
* MapAttribute.cs: Update (adds SuppressFlags property).
@@ -37,7 +37,7 @@ using System;
AttributeTargets.Struct)]
internal class MapAttribute : Attribute {
private string nativeType;
private bool suppressFlags;
private string suppressFlags;
public MapAttribute ()
{
@@ -52,7 +52,7 @@ internal class MapAttribute : Attribute {
get {return nativeType;}
}
public bool SuppressFlags {
public string SuppressFlags {
get {return suppressFlags;}
set {suppressFlags = value;}
}
@@ -177,21 +177,20 @@ namespace Mono.Unix.Native {
// 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
}
+36
View File
@@ -1,3 +1,39 @@
2006-11-30 Jonathan Pryor <[email protected]>
* 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 <[email protected]>
* map.c: Flush (fix FromFilePermissions for SuppressFlags-marked values).
2006-11-15 Jonathan Pryor <[email protected]>
* map.c: Flush (removes warnings due to _cnm_return_val_if_overflow()).
2006-11-14 Jonathan Pryor <[email protected]>
* map.c: Flush (fixes FilePermissions conversion, allowing Syscall.stat() to
work as expected).
2006-11-13 Jonathan Pryor <[email protected]>
* 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 <[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.
* 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 <[email protected]>
* stdio.c: Some BSDs define clearerr(3) as a macro, so we need to cast
+43 -35
View File
@@ -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)
+32
View File
@@ -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;