Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@@ -1,9 +0,0 @@
2005-09-20 Sebastien Pouliot <sebastien@ximian.com>
* AssemblyInfo.cs: Mark [CLSCompliant(true)], [ComVisible(false)].
2004-04-30 Sebastien Pouliot <sebastien@ximian.com>
* AssemblyInfo.cs: Added
* ChangeLog: Added
* Locale.cs: Added

View File

@@ -1,163 +0,0 @@
2009-02-09 Jonathan Pryor <jpryor@novell.com>
* Documentation/en/Mono.Unix/UnixGroupInfo.xml: Document semantic
changes to UnixGroupInfo.GetMembers().
2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
* Documentation/en/*: Updated the documentation for RT signals.
2008-12-19 Jonathan Pryor <jpryor@novell.com>
* Mono.Posix.dll.sources: Add Mono.Unix.Native/RealTimeSignum.cs.
* Mono.Posix_test.dll.sources: Add
Mono.Unix.Native/RealTimeSignumTest.cs.
2008-02-09 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix_test.dll.sources: Add Mono.Unix/UnixSignalTest.cs.
2008-01-28 Jonathan Pryor <jpryor@novell.com>
* Mono.Posix.dll.sources: Add Mono.Unix/UnixSignal.cs.
2006-10-24 Jonathan Pryor <jonpryor@vt.edu>
* Makefile: Don't build make-map.exe.
* Mono.Posix.dll.sources: Move MapAttribute into Mono.Unix.Native; remove
HeaderAttribute.cs; Add TypeAttributes.cs.
2006-07-02 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix_test.dll.sources: Add Mono.Unix/UnixPathTest.cs.
2006-01-02 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Remove Mono.Unix obsolete files.
2005-11-28 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix_test.dll.sources: Move StdlibTest into the Mono.Unix.Native
directory.
2005-11-01 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add new files: Mono.Unix/FileHandleOperations.cs,
Mono.Unix/UnixPipes.cs.
2005-10-25 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add Mono.Unix.Native/FileNameMarshaler.cs.
* Mono.Posix_test.dll.sources: Add Mono.Unix/UnixEncodingTest.cs
2005-10-21 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add new file: Mono.Unix/FileAccessPattern.cs
2005-10-19 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add new files: Mono.Unix/FileAccessPermissions.cs,
Mono.Unix/FileSpecialAttributes.cs, Mono.Unix/FileTypes.cs.
2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix_test.dll.sources: Add Mono.Unix/UnixMarshalTest.cs.
2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
* Makefile: Build the make-map.exe in Mono.Unix.Native; add /nowarn:0618 to
the build, so that we don't see dozens of warnings about using [Obsolete]
code.
* Mono.Unix.Native: directory added
* Mono.Posix.dll.sources: Add Mono.Unix.Native/*.cs sources.
2005-08-24 Lluis Sanchez Gual <lluis@novell.com>
* Makefile: Removed System.Runtime.Remoting dependency.
* Mono.Posix.dll.sources: Added new files:
Mono.Remoting.Channels.Unix/UnixBinaryClientFormatterSink.cs
Mono.Remoting.Channels.Unix/UnixBinaryClientFormatterSinkProvider.cs
Mono.Remoting.Channels.Unix/UnixBinaryCore.cs
Mono.Remoting.Channels.Unix/UnixBinaryServerFormatterSink.cs
Mono.Remoting.Channels.Unix/UnixBinaryServerFormatterSinkProvider.
2005-07-30 Atsushi Enomoto <atsushi@ximian.com>
* Makefile : csc build fix.
2005-07-28 Lluis Sanchez Gual <lluis@novell.com>
* Mono.Posix.dll.sources: Add the Unix remoting channel to the build.
* Makefile: Add System.Runtime.Remoting dependency.
2005-02-28 Jonathan Pryor <jonpryor@vt.edu>
* Makefile (TEST_MCS_FLAGS): Ignore warnings 0219 (variable declared and
never used) and 0618 (member is obsolete): this is test code, which
produces lots of unused variables and tests [Obsolete] members.
2005-02-28 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix_test.dll.sources: Added Test/Mono.Unix/StdioFileStreamTest.cs.
2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix_test.dll.sources: Added Test/Mono.Unix/StdlibTest.cs.
2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add Mono.Unix/StdioFileStream.cs.
2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
* Makfile: Add testsuite.
* Mono.Posix_test.dll.sources: Added; Files for testsuite.
* Test: Directory added.
2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add UnixDriveInfo and UnixPath.
2004-11-22 Raja R Harinath <rharinath@novell.com>
* Makefile (CLEAN_FILES): Clean up make-map.exe and the duplicated
Mono.Posix.dll.
2004-11-18 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add Mono.Unix/CdeclFunction.cs to the build.
2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
+ Rename the Mono.Posix namespace to Mono.Unix.
+ Copy the Mono.Posix files from the mono-1-0 branch to Mono.Posix (to
preserve backward compatibility).
* Mono.Posix.dll.sources: Rename Mono.Posix to Mono.Unix, remove
IncludeAttribute and MapAttribute from Mono.Posix namespace (use the
ones in Mono.Unix instead).
* Makefile: Update file paths to build from Mono.Unix.
2004-11-05 Jonathan Pryor <jonpryor@vt.edu>
* Mono.Posix.dll.sources: Add lots of new files to the binding.
2004-06-03 Raja R Harinath <rharinath@novell.com>
* Makefile (Mono.Posix/make-map.exe): Depend on $(the_lib) to pick
the name of the library from library.make. This should make it
parallel-make-safe.
2004-04-26 Jackson Harper <jackson@ximian.com>
* Makefile: Dont use explicit lib references so the proper lib
directory is used. Output to profile directory.
2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Makefile: handle win32 paths and copy Mono.Posix.dll to Mono.Posix
directory so that MS runtime finds it.
2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Check in.

View File

@@ -6,8 +6,9 @@ LIBRARY = Mono.Posix.dll
# Don't warn about [Obsolete] members, as there are now *lots* of [Obsolete]
# members, generating volumes of output.
LIB_REFS = System
LIB_MCS_FLAGS = /unsafe /r:$(corlib) /nowarn:0618,612
TEST_MCS_FLAGS = /r:Mono.Posix.dll /r:System.dll /nowarn:0219,0618
LIB_MCS_FLAGS = /unsafe /nowarn:0618,612
TEST_MCS_FLAGS = /unsafe /nowarn:0219,0618
TEST_LIB_REFS = Mono.Posix System
LIBRARY_COMPILE = $(BOOT_COMPILE)

View File

@@ -1,121 +0,0 @@
2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* UnixEndPoint.cs: synch'ed with the one in Mono.Unix.
2006-01-12 Miguel de Icaza <miguel@novell.com>
* PeerCred.cs: Turn PeerCredData into a toplevel class and make it
internal, so it can be used from Mono.Unix.PeerCred.
2006-01-06 Jonathan Pryor <jonpryor@vt.edu>
* Catalog.cs: s/libintl/intl/g, since intl.dll is used by GTK+ on Windows,
not libintl.dll (according to
http://www.gimp.org/~tml/gimp/win32/downloads.html).
2005-09-23 Jonathan Pryor <jonpryor@vt.edu>
* Catalog.cs, PeerCred.cs, Syscall.cs, UnixEndPoint.cs: [Obsolete] public
types and list appropriate replacement members for Syscall.cs
enumerations/structs.
2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: Mark types as [CLSCompliant(false)].
2005-05-30 Ben Maurer <bmaurer@ximian.com>
* Syscall.cs (UnixEpoch): The DateTime for the start of the epoch
may not have the same offset from GMT as does the result of
addition. Therefore, do not convert the static reference point,
rather convert the date we generate. Fixes bug 74266. Patch from
fabrice@bellet.info (Fabrice Bellet).
2005-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* UnixEndPoint.cs: get the correct bytes when building the filename from
a SocketAddress. Fixes bug #72850.
2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: Add [Obsolete] to Syscall, letting users know they should
use Mono.Unix.Syscall (and related types) instead. Mono.Posix.Syscall
is effectively unmaintained, and should not be used.
2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: All syscall_ functions should explicitly specify EntryPoint
so that an EntryPointNotFoundException is avoided. Fixes 70706.
2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
* IncludeAttribute.cs: Removed.
* MapAttribute.cs: Removed.
* Syscall.cs: Remove [Map] and [Include] attributes.
2004-07-09 Dick Porter <dick@ximian.com>
* PeerCred.cs: Get the unix socket peer credentials.
2004-05-26 Miguel de Icaza <miguel@ximian.com>
* Syscall.cs: Do not let the runtime handle strings, as we do not
own those strings, we must transform the char * into a string
ourselves.
2004-05-03 Miguel de Icaza <miguel@ximian.com>
* Syscall.cs: Add symlink
2004-04-19 Miguel de Icaza <miguel@ximian.com>
* Syscall.cs: Use hex values for FileMode, since C# does not have
an octal integer mode.
2004-03-30 Joshua Tauberer <tauberer@for.net>
* Added readlink, strerror, opendir, readdir, closedir
* Added Mono.Posix.Stat.UnixToDateTime(long unixtime) --> DateTime
2004-03-11 Joshua Tauberer <tauberer@for.net>
* Syscall.cs: Removed argument to getgid that shouldn't be there.
Added getusername, getgroupname which wrap getpwuid, getgrgid
without dealing with pointers to structures.
Removed duplicate FileMode enum nested in Syscall class.
Added stat and lstat, which use StatMode enumeration
(like FileMode but nicer and complete) and Stat struct.
* macros.c: Helper functions for getpwuid, getgrgid, stat, lstat.
2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Syscall.cs: moved the assembly attribute to a proper place
and added 'signal.h'
* make-map.cs: use reflection to invoke the properties, as it
fails under MS runtime.
2004-01-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Syscall.cs: moved assembly attribute and added unsafe block to fix
the build on windows.
2003-11-11 Wojciech Polak <polak@gnu.org
* Syscall.cs: Applied patch from Wojciech Polak <polak@gnu.org> to
support IsAtty.
2003-05-16 Dick Porter <dick@ximian.com>
* UnixEndPoint.cs: New property to get and set the filename, like
the IPEndPoint has for the IP address. Also implement ToString().
Tue Apr 29 16:53:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
* Syscall.cs: remove the unsafe mess.
2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Check in.
* UnixEndPoint.cs: first file.

View File

@@ -1,7 +1,9 @@
Mono.Unix/ReadlinkTest.cs
Mono.Unix/StdioFileStreamTest.cs
Mono.Unix/UnixEncodingTest.cs
Mono.Unix/UnixEndPointTest.cs
Mono.Unix/UnixGroupTest.cs
Mono.Unix/UnixListenerTest.cs
Mono.Unix/UnixMarshalTest.cs
Mono.Unix/UnixPathTest.cs
Mono.Unix/UnixSignalTest.cs

View File

@@ -1,50 +0,0 @@
2006-12-18 Lluis Sanchez Gual <lluis@novell.com>
* UnixBinaryCore.cs: Added some null checks.
* UnixServerChannel.cs: Remoting does not call StartListening anymore
(for MS.NET compatibility), so it has to be explicitely called here.
2006-09-15 Lluis Sanchez Gual <lluis@novell.com>
* UnixServerTransportSink.cs, UnixServerChannel.cs:
When sending an async call response, don't use the original request
stream because it may have been used by another call.
2005-11-02 Jonathan Pryor <jonpryor@vt.edu>
* UnixServerChannel.cs: Use Mono.Unix.Native.Syscall. Mono.Unix.Syscall is
obsolete, and will eventually disappear.
2005-10-18 Robert Jordan <robertj@gmx.net>
* UnixChannel.cs: fixed ParseUnixURL to support channel URLs (those
w/out an objectUri).
2005-09-11 Robert Jordan <robertj@gmx.net>
* UnixChannel.cs: fixed default ctor.
* UnixServerChannel.cs: fixed GetUrlsForUri to return properly
formatted unix URIs (the "?" was missing).
2005-08-24 Lluis Sanchez Gual <lluis@novell.com>
* UnixServerChannel.cs:
* UnixClientChannel.cs: Use the internal binary formatter sink.
* UnixBinaryServerFormatterSink.cs:
* UnixBinaryClientFormatterSinkProvider.cs:
* UnixBinaryClientFormatterSink.cs:
* UnixBinaryCore.cs:
* UnixBinaryServerFormatterSinkProvider.cs: New internal formatter sink,
to avoid dependency with System.Runtime.Remoting.dll.
* UnixClientTransportSink.cs:
* UnixMessageIO.cs: Don't use CommonTransportKeys.
2005-07-28 Lluis Sanchez Gual <lluis@novell.com>
* UnixChannel.cs, UnixClientChannel.cs, UnixClientTransportSink.cs,
UnixClientTransportSinkProvider.cs, UnixMessageIO.cs,
UnixServerChannel.cs, UnixServerTransportSink.cs,
UnixConnectionPool.cs: The new Unix socket remoting channel.

View File

@@ -1,272 +0,0 @@
2010-07-21 Jackson Harper <jackson@ximian.com>
* Syscall.cs: Add bindings to the various epoll
functions. (epoll_create, epoll_ctl, epoll_wait).
2008-12-19 Jonathan Pryor <jpryor@novell.com>
* NativeConvert.cs: Add FromRealTimeSignum(), ToRealTimeSignum().
Patch thanks to tim.jenks@realtimeworlds.com.
* RealTimeSignum.cs: Added; structure which represents a real-time
signal, a value V such that V >= SIGRTMIN and V <= SIGRTMAX.
Patch thanks to tim.jenks@realtimeworlds.com.
* Stdlib.cs: Add SetSignalAction() and raise() overloads which accept
a RealTimeSignum instance.
Patch thanks to tim.jenks@realtimeworlds.com.
2008-10-15 Jonathan Pryor <jpryor@novell.com>
* Syscall.cs: [Map] Flock, add Timespec, bind nanosleep(2).
* NativeConvert.generated.cs: Flush (Add TryCopy methods for Flock,
Timespec).
2008-01-28 Jonathan Pryor <jpryor@novell.com>
* Stdlib.cs: Obsolete Stdlib.signal(), as it's not safe; see also:
http://lists.ximian.com/pipermail/mono-devel-list/2008-January/026501.html
http://lists.ximian.com/pipermail/mono-devel-list/2008-January/026503.html
Add SetSignalAction() as a replacement.
2008-01-22 Sebastien Pouliot <sebastien@ximian.com>
* Syscall.cs: Fix Flock.Equals to avoid NRE (and return false if object
is null). Found using Gendarme.
2008-01-05 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: Add ST_NOEXEC, ST_REMOUNT, ST_BIND to MountFlags. Patch from
Joe Dluzen <jdluzen@gmail.com>.
2007-12-17 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: Bind uname(2).
2007-10-25 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs: Fix perror(3) so that it works as expected. (Since errno is
cleared during P/Invoke, previously Stdlib.perror("") would always print
"Success", which isn't very helpful.)
2007-06-28 Jonathan Pryor <jonpryor@vt.edu>
* NativeConvert.generated.cs: Flush (add TryCopy() methods for Utimbuf).
* Syscall.cs: Map Utimbuf to `struct utimbuf'; needed so that Mono.Fuse can
rely on Mono.Posix.dll for copying all native types.
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).
* Syscall.cs: Mark non-flags FilePermissions enumeration members so that
they aren't treated as bitfields. Impacts e.g. S_IFDIR, S_IFCHR, etc..
2006-10-24 Jonathan Pryor <jonpryor@vt.edu>
* HeaderAttribute.cs: Removed. Use create-native-map command-line arguments
instead of HeaderAttribute.Includes & HeaderAttribute.Defines.
* make-map.cs: Moved to mono-tools/create-native-map/src/create-native-map.cs.
* MapAttribute.cs: Moved from ../Mono.Unix. Can now be
specified on Class, Delegeate, Enum, Field, & Struct (instead of just
Enum). Add NativeType property.
* NativeConvert.generated.cs: Flush (adds new .TryCopy methods to copy [Map]'d
structures).
* NativeConvert.cs: Add .TryCopy methods for Statvfs.
* Syscall.cs: Remove HeaderAttribute declaration; Markup [Map]'d structure
members with [Map] attributes (or MapAttribute subclasses) to specify the
native types they correspond to (used by create-native-map).
* TypeAttributes.cs: Added; internal subclasses of MapAttribute to help
markup structures (e.g. so I can use [blkcnt_t] instead of
[Map ("blkcnt_t")], thus minimizing the liklihood of a spelling error).
2006-09-15 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: "Remove" crypt(3), encrypt(3), setkey(3). These use an
encryption algorithm which was broken years ago and could be cracked in
minutes on a modern machine. This also removes a libcrypt.so dependency,
which means you don't need to have development packages installed to use
these either (since "crypt" wasn't <dllmap>'d). These are still present,
but marked [Obsolete] and throw a SecurityException when invoked.
2006-09-07 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: readdir(P) is not thread-safe, so it needs to be locked so
that the `struct dirent' it returns is stable.
2006-04-06 Jonathan Pryor <jonpryor@vt.edu>
* NativeConvert.cs: Fix ToDateTime()/FromDateTime()/ToTimeT()/FromTimeT() so
that they take timezones into account. Previously, results would be off
by an hour if Daylight Savings Time was in effect. Fixes #78033.
2006-03-23 Raja R Harinath <rharinath@novell.com>
* NativeConvert.generated.cs: Update after merge.
2006-02-25 Marek Safar <marek.safar@seznam.cz>
* NativeConvert.generated.cs: Guarded CLSCompliant attribute by NET_2_0
until mcs is merged with gmcs.
2006-02-21 Marek Safar <marek.safar@seznam.cz>
* NativeConvert.generated.cs: Removed duplicated CLSCompliant attribute.
2006-01-10 Raja R Harinath <rharinath@novell.com>
* Syscall.cs (sys_futimes): Remove buggy custom marshaller on 'fd' parameter.
2005-01-09 Jonathan Pryor <jonpryor@vt.edu>
* NativeConvert.cs: s/IsType/IsSet/g: deal with UnixFileSystemInfo method
name change.
2005-01-02 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs: s/ACCESS/ACCES/g. I didn't create a badly named errno value, I
mis-read EACCES in man pages. I can't read. :-(
2005-01-02 Jonathan Pryor <jonpryor@vt.edu>
* NativeConvert.generated.cs: Flush (remove Obsolete members).
* Syscall.cs: Remove invalid utimes(2) wrapper.
2005-01-02 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs: s/ACCES/ACCESS/g. How'd I create a badly named errno value?
2005-12-29 Jonathan Pryor <jonpryor@vt.edu>
* make-map.cs: Properly handle managed arrays in argument lists.
* Syscall.cs: Properly bind utimes(2) (the Linux man pages are vague on what
it does; the BSD ones are much better). Bind lutimes(2) and futimes(2).
2005-12-27 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: Include <sys/mman.h> for map.c generation. Fixes #77091.
2005-12-27 Jonathan Pryor <jonpryor@vt.edu>
* make-map.cs: Always include 2nd parameter of [Obsolete] attributes; mark
the [DllImport]ed method with [Obsolete] if the underlying type is
[Obsolete].
* NativeConvert.generated.cs: Flush.
2005-12-27 Jonathan Pryor <jonpryor@vt.edu>
* FileNameMarshaler.cs: Use UnixMarshal.PtrToStringUnix -- it's faster.
2005-11-28 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs: Prelink all SignalHandlers passed to Stdlib.signal(). This is
so that mono doesn't have to JIT the handler within signal context.
2005-11-08 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs: Implement IEquatable<FilePosition> for FilePosition.
* Syscall.cs: Provide GetHashCode(), Equals(), operator==, operator!= for
all structure types. Implement IEquatable<T> for all "value type"
structs and classes.
2005-11-07 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: *xattr functions should use the FileNameMarshaler for filenames.
2005-11-07 Jonathan Pryor <jonpryor@vt.edu>
* make-map.cs: Always use ordinal string sorting behavior. The string
collation sorting has changed, so to keep the mono/support diff sizes down
we have to explicitly specify the previous implicit ordering.
2005-11-02 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: Remove [CLSCompliant(false)] when it isn't needed.
2005-11-02 Jonathan Pryor <jonpryor@vt.edu>
* FileNameMarshaler.cs: Use UnixMarshal.FreeHeap(). .Free() is obsolete.
2005-10-27 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs: Correct return type of setbuf(IntPtr, byte*).
* Syscall.cs: Remove [Obsolete] SyslogFacility.LOG_USRE member
(Mono.Unix.Native hasn't shipped yet, so nobody is using it); correct
[Obsolete] comment for getpagesize().
2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
* FileNameMarshaler.cs: Deal with UnixMarshal method name changes.
2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs: FilePosition should derive from MarshalByRefObject, for two
reasons: (1) it's a recommendation from FxCop that classes implementing
IDisposable also derive from MarshalByRefObject; (2) FilePosition is
exposed from Mono.Unix.StdioFileStream, which (indirectly) inherits from
MarshalByRefObject. Fix Equals() so it doesn't rely on Reflection.
2005-10-25 Jonathan Pryor <jonpryor@vt.edu>
* FileNameMarshaler.cs: Custom marshaler to marshal filenames using
Mono.Unix.UnixEncoding. A custom marshaler is used to remove the need to
have ~6 lines of boilerplate on every method that takes filenames.
* Stdlib.cs, Syscall.cs: Filenames need to be marshaled through the
FileNameMarshaler, which will encode/decode filenames with UnixEncoder.
2005-10-14 Jonathan Pryor <jonpryor@vt.edu>
* Stdlib.cs, Syscall.cs: Flush naming convention documentation.
2005-10-14 Jonathan Pryor <jonpryor@vt.edu>
* NativeConvert.generated.cs: Flush currently generated version.
2005-10-14 Jonathan Pryor <jonpryor@vt.edu>
* make-map.cs: Fix documentation comment.
* Stdlib.cs: Fix export of XprintfFunctions.syslog(); make SetLastError()
protected (normal user code shouldn't call it, as it isn't safe);
replace functions which return `void' with functions which return `int'
(adding them to MonoPosixHelper.so as well) -- since users can't reliably
use SetLastError(), they need the "normal" error detection mechanism;
correct the strlen(3) export.
* Syscall.cs:
- s/PathConf/PathconfName/, s/SysConf/SysconfName/, s/ConfStr/ConfstrName/
to follow documented enumeration naming conventions.
- replace functions which return `void' with functions which return `int'
(adding them to MonoPosixHelper.so as well) -- since users can't reliably
use SetLastError(), they need the "normal" error detection mechanism;
2005-10-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Stdlib.cs: add strlen() to fix the build.
2005-09-23 Jonathan Pryor <jonpryor@vt.edu>
* make-map.cs: Generate NativeConvert documentation XML fragments for use in
monodoc.
2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
* ChangeLog: Started.
* CdeclFunction.cs: Copied from ../Mono.Unix; change namespace.
* HeaderAttribute.cs: Added
* make-map.cs: Copied from ../Mono.Unix; sort type and member names in
output (makes for a more stable svn history, as types/members won't change
position anymore within generated code); look for HeaderAttribute not
IncludeAttribute for getting headers & #defines; generate NativeConvert
partial class.
* NativeConvert.cs: Copied from ../Mono.Unix; change namespace; turn into a
partial class; Remove generated code (generated code is in
NativeConvert.generated.cs).
* NativeConvert.generated.cs: Added
* Stdlib.cs: Copied from ../Mono.Unix; change namespace; rename Error to
Errno (as Error is a "reserved word" in FxCop); [CLSCompliant(false)]
support.
* Syscall.cs: Use HeaderAttribute, not IncludeAttribute, for CLS compliance;
add [CLSCompliant(false)] as needed; use NativeConvert, not UnixConvert.

View File

@@ -359,7 +359,117 @@ namespace Mono.Unix.Native {
{
return ToStatvfs (source, out destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromInAddr")]
private static extern int FromInAddr (ref InAddr source, IntPtr destination);
public static bool TryCopy (ref InAddr source, IntPtr destination)
{
return FromInAddr (ref source, destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToInAddr")]
private static extern int ToInAddr (IntPtr source, out InAddr destination);
public static bool TryCopy (IntPtr source, out InAddr destination)
{
return ToInAddr (source, out destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromIn6Addr")]
private static extern int FromIn6Addr (ref In6Addr source, IntPtr destination);
public static bool TryCopy (ref In6Addr source, IntPtr destination)
{
return FromIn6Addr (ref source, destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToIn6Addr")]
private static extern int ToIn6Addr (IntPtr source, out In6Addr destination);
public static bool TryCopy (IntPtr source, out In6Addr destination)
{
return ToIn6Addr (source, out destination) == 0;
}
public static InAddr ToInAddr (System.Net.IPAddress address)
{
if (address == null)
throw new ArgumentNullException ("address");
if (address.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
throw new ArgumentException ("address", "address.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork");
return new InAddr (address.GetAddressBytes ());
}
public static System.Net.IPAddress ToIPAddress (InAddr address)
{
var bytes = new byte[4];
address.CopyTo (bytes, 0);
return new System.Net.IPAddress (bytes);
}
public static In6Addr ToIn6Addr (System.Net.IPAddress address)
{
if (address == null)
throw new ArgumentNullException ("address");
if (address.AddressFamily != System.Net.Sockets.AddressFamily.InterNetworkV6)
throw new ArgumentException ("address", "address.AddressFamily != System.Net.Sockets.AddressFamily.InterNetworkV6");
return new In6Addr (address.GetAddressBytes ());
}
public static System.Net.IPAddress ToIPAddress (In6Addr address)
{
var bytes = new byte[16];
address.CopyTo (bytes, 0);
return new System.Net.IPAddress (bytes);
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromSockaddr")]
private static extern unsafe int FromSockaddr (_SockaddrHeader* source, IntPtr destination);
public static unsafe bool TryCopy (Sockaddr source, IntPtr destination)
{
if (source == null)
throw new ArgumentNullException ("source");
byte[] array = Sockaddr.GetDynamicData (source);
// SockaddrStorage has to be handled extra because the native code assumes that SockaddrStorage input is used in-place
if (source.type == (SockaddrType.SockaddrStorage | SockaddrType.MustBeWrapped)) {
Marshal.Copy (array, 0, destination, (int) source.GetDynamicLength ());
return true;
}
fixed (SockaddrType* addr = &Sockaddr.GetAddress (source).type)
fixed (byte* data = array) {
var dyn = new _SockaddrDynamic (source, data, useMaxLength: false);
return FromSockaddr (Sockaddr.GetNative (&dyn, addr), destination) == 0;
}
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToSockaddr")]
private static extern unsafe int ToSockaddr (IntPtr source, long size, _SockaddrHeader* destination);
public static unsafe bool TryCopy (IntPtr source, long size, Sockaddr destination)
{
if (destination == null)
throw new ArgumentNullException ("destination");
byte[] array = Sockaddr.GetDynamicData (destination);
fixed (SockaddrType* addr = &Sockaddr.GetAddress (destination).type)
fixed (byte* data = Sockaddr.GetDynamicData (destination)) {
var dyn = new _SockaddrDynamic (destination, data, useMaxLength: true);
var r = ToSockaddr (source, size, Sockaddr.GetNative (&dyn, addr));
dyn.Update (destination);
// SockaddrStorage has to be handled extra because the native code assumes that SockaddrStorage input is used in-place
if (r == 0 && destination.type == (SockaddrType.SockaddrStorage | SockaddrType.MustBeWrapped)) {
Marshal.Copy (source, array, 0, (int) destination.GetDynamicLength ());
}
return r == 0;
}
}
}
}
// vim: noexpandtab
// Local Variables:
// tab-width: 4
// c-basic-offset: 4
// indent-tabs-mode: t
// End:

View File

@@ -86,6 +86,22 @@ namespace Mono.Unix.Native {
return rval;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromCmsghdr")]
private static extern int FromCmsghdr (ref Cmsghdr source, IntPtr destination);
public static bool TryCopy (ref Cmsghdr source, IntPtr destination)
{
return FromCmsghdr (ref source, destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToCmsghdr")]
private static extern int ToCmsghdr (IntPtr source, out Cmsghdr destination);
public static bool TryCopy (IntPtr source, out Cmsghdr destination)
{
return ToCmsghdr (source, out destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromConfstrName")]
private static extern int FromConfstrName (ConfstrName value, out Int32 rval);
@@ -918,6 +934,70 @@ namespace Mono.Unix.Native {
return rval;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromSockaddrIn")]
private static extern int FromSockaddrIn (SockaddrIn source, IntPtr destination);
public static bool TryCopy (SockaddrIn source, IntPtr destination)
{
return FromSockaddrIn (source, destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToSockaddrIn")]
private static extern int ToSockaddrIn (IntPtr source, SockaddrIn destination);
public static bool TryCopy (IntPtr source, SockaddrIn destination)
{
return ToSockaddrIn (source, destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromSockaddrIn6")]
private static extern int FromSockaddrIn6 (SockaddrIn6 source, IntPtr destination);
public static bool TryCopy (SockaddrIn6 source, IntPtr destination)
{
return FromSockaddrIn6 (source, destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToSockaddrIn6")]
private static extern int ToSockaddrIn6 (IntPtr source, SockaddrIn6 destination);
public static bool TryCopy (IntPtr source, SockaddrIn6 destination)
{
return ToSockaddrIn6 (source, destination) == 0;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromSockaddrType")]
private static extern int FromSockaddrType (SockaddrType value, out Int32 rval);
internal static bool TryFromSockaddrType (SockaddrType value, out Int32 rval)
{
return FromSockaddrType (value, out rval) == 0;
}
internal static Int32 FromSockaddrType (SockaddrType value)
{
Int32 rval;
if (FromSockaddrType (value, out rval) == -1)
ThrowArgumentException (value);
return rval;
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToSockaddrType")]
private static extern int ToSockaddrType (Int32 value, out SockaddrType rval);
internal static bool TryToSockaddrType (Int32 value, out SockaddrType rval)
{
return ToSockaddrType (value, out rval) == 0;
}
internal static SockaddrType ToSockaddrType (Int32 value)
{
SockaddrType rval;
if (ToSockaddrType (value, out rval) == -1)
ThrowArgumentException (value);
return rval;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromSysconfName")]
private static extern int FromSysconfName (SysconfName value, out Int32 rval);
@@ -1126,6 +1206,38 @@ namespace Mono.Unix.Native {
return rval;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromUnixSocketControlMessage")]
private static extern int FromUnixSocketControlMessage (UnixSocketControlMessage value, out Int32 rval);
public static bool TryFromUnixSocketControlMessage (UnixSocketControlMessage value, out Int32 rval)
{
return FromUnixSocketControlMessage (value, out rval) == 0;
}
public static Int32 FromUnixSocketControlMessage (UnixSocketControlMessage value)
{
Int32 rval;
if (FromUnixSocketControlMessage (value, out rval) == -1)
ThrowArgumentException (value);
return rval;
}
[DllImport (LIB, EntryPoint="Mono_Posix_ToUnixSocketControlMessage")]
private static extern int ToUnixSocketControlMessage (Int32 value, out UnixSocketControlMessage rval);
public static bool TryToUnixSocketControlMessage (Int32 value, out UnixSocketControlMessage rval)
{
return ToUnixSocketControlMessage (value, out rval) == 0;
}
public static UnixSocketControlMessage ToUnixSocketControlMessage (Int32 value)
{
UnixSocketControlMessage rval;
if (ToUnixSocketControlMessage (value, out rval) == -1)
ThrowArgumentException (value);
return rval;
}
[DllImport (LIB, EntryPoint="Mono_Posix_FromUnixSocketFlags")]
private static extern int FromUnixSocketFlags (UnixSocketFlags value, out Int32 rval);

View File

@@ -1 +1 @@
4125978df0c8371b3c21d2a86e7e00364e2f7e54
cbeb54b0ec2778f87a457f5494c2f349d5ddb223

File diff suppressed because it is too large Load Diff

View File

@@ -82,12 +82,18 @@ namespace Mono.Unix
uep.filename = "";
return uep;
}
byte [] bytes = new byte [socketAddress.Size - 2 - 1];
int size = socketAddress.Size - 2;
byte [] bytes = new byte [size];
for (int i = 0; i < bytes.Length; i++) {
bytes [i] = socketAddress [i + 2];
// There may be junk after the null terminator, so ignore it all.
if (bytes [i] == 0) {
size = i;
break;
}
}
string name = Encoding.Default.GetString (bytes);
string name = Encoding.Default.GetString (bytes, 0, size);
return new UnixEndPoint (name);
}

View File

@@ -1,15 +0,0 @@
2009-02-19 Jonathan Pryor <jonpryor@vt.edu>
* RealTimeSignumTest.cs: Disable the tests on Mac OS X, as OS X
doesn't support real-time signals.
2008-12-19 Jonathan Pryor <jonpryor@vt.edu>
* RealTimeSignumTest.cs: Added; unit tests for RealTimeSignum.
Patch thanks to tim.jenks@realtimeworlds.com.
2005-11-28 Jonathan Pryor <jonpryor@vt.edu>
* ChangeLog: Started.
* StdlibTest.cs: Moved from ../Mono.Unix. Test Mono.Unix.Native namespace.

File diff suppressed because it is too large Load Diff

View File

@@ -1,144 +0,0 @@
2009-08-28 Atsushi Enomoto <atsushi@ximian.com>
* UnixEncodingTest.cs : upgrade to modern nunit style.
2009-02-20 Jonathan Pryor <jpryor@novell.com>
* UnixSignalTest.cs: Add tests to check for concurrent
UnixSignal.WaitOne() invocations. Tests thanks to
tim.jenks@realtimeworlds.com.
2009-02-19 Jonathan Pryor <jpryor@novell.com>
* UnixSignalTest.cs: Disable the tests that use RealTimeSignum on OS X,
as OS X doesn't support real-time signals (and thus these will
always error, often for the "wrong" reason).
2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
* UnixSignalTest.cs: Fix the RealTimeSignum constructor
tests to take into account the fact that some signals might be
in used by the runtime. Added a test for multiple registration
of a rt signal.
2009-01-07 Geoff Norton <gnorton@novell.com>
* UnixSignalTest.cs: Disable the tests that storm signals on OSX.
(They wont work)
2008-11-19 Jonathan Pryor <jpryor@novell.com>
* UnixSignalTest.cs: Add tests for RealTimeSignum constructors,
.RealTimeSignum and .IsRealTimeSignal properties.
Patch thanks to tim.jenks@realtimeworlds.com.
2008-11-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
* UnixSignalTest.cs: use WaitAny + 30s timeout.
2008-02-12 Zoltan Varga <vargaz@gmail.com>
* UnixSignalTest.cs: Fix the build.
2008-02-09 Jonathan Pryor <jonpryor@vt.edu>
* UnixSignalTest.cs: Added; tests Mono.Unix.UnixSignal.
2006-07-02 Jonathan Pryor <jonpryor@vt.edu>
* UnixPathTest.cs: Added; test UnixPath.Combine().
2005-12-07 Jonathan Pryor <jonpryor@vt.edu>
* UnixMarshalTest.cs: Make test public so that it's actually executed by
NUnit; NUnit doesn't like private Test* methods -- rename; test
UnixMarshal.PtrToString for a string containing 0 characters (this used to
cause an ArgumentOutOfRangeException due to a bug).
2005-12-05 Jonathan Pryor <jonpryor@vt.edu>
* UnixUserTest.cs: s/UnixUser/UnixUserInfo/g (UnixUser is obsolete).
2005-12-05 Jonathan Pryor <jonpryor@vt.edu>
* UnixMarshalTest.cs: s/Free/FreeHeap/g (UnixMarshal.Free will be removed).
2005-11-28 Jonathan Pryor <jonpryor@vt.edu>
* UnixGroupTest.cs: The type of UnixGroupInfo.GroupId changed. UnixGroup is
deprecated; use UnixGroupInfo instead.
* UnixUserTest.cs: The type of UnixUserInfo.UserId changed. UnixUser if
deprecated; use UnixUserInfo instead.
2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
* UnixMarshalTest.cs: s/StringToAlloc/StringToHeap/g (UnixMarshal change).
* UnixEncodingTest.cs: Deal with UnixEncoding.EscapeByte value change.
2005-10-25 Jonathan Pryor <jonpryor@vt.edu>
* UnixEncodingTest.cs: Added string/byte[] encoding tests for
Mono.Unix.UnixEncoding.
2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
* UnixMarshalTest.cs: Added string marshaling tests for Mono.Unix.UnixMarshal.
2005-06-29 Miguel de Icaza <miguel@ximian.com>
* StdioFileStreamTest.cs: comment out tests that depend on the
underlying Stdio implementation.
2005-05-21 Ben Maurer <bmaurer@ximian.com>
* UnixUserTest.cs, UnixGroupTest.cs: Disable tests that might not
work on a Solaris box with NIS. Bug #72293.
2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
* StdioFileStreamTest.cs: Add FilePosition tests; remove `var = var`
lines (added to remove warnings, but now produces other warnings).
2005-04-28 Jonathan Pryor <jonpryor@vt.edu>
* StdlibTest.cs: Calling a P/Invoke function from signal-handler context is
*bad*, which is why I've had so much trouble getting consistent results
getting this test to work -- it was broken by design. Instead, just save
the signum passed to the handler (which is reentrant safe), and compare
the saved value with the expected value after the signal handler returns.
This should always work. Use SIGURG instead of SIGUSR1 because SIGURG is
ignored by default (allowing us to call it without adding your own
handler), unlike SIGUSR1 which terminates the program.
2005-03-28 Jonathan Pryor <jonpryor@vt.edu>
* StdioFileStreamTest.cs: Added; based on MonoTests.System.IO.FileStreamTest.
2005-02-09 Jonathan Pryor <jonpryor@vt.edu>
* StdlibTest.cs: Signal is currently ignored, but add Category(NotDotNet) so
it isn't run even when we fix it. .NET 1.1 doesn't marshal delegates
properly for signal (different calling conventions).
Add Category(NotDotNet) for Snprintf(), as MSVCRT.dll doesn't export it.
* UnixGroupTest.cs, UnixUserTest.cs: Don't run these under .NET, as Windows
doesn't support the Syscall and related classes.
2005-02-01 Raja R Harinath <rharinath@novell.com>
* UnixUserTest.cs (UnixUserTest.ReentrantConstructors): Don't
assume userid<->username mapping is a bijection.
(UnixUserTest.NonReentrantSyscalls): Likewise.
2005-01-20 Jonathan Pryor <jonpryor@vt.edu>
* StdlibTest.cs: Ignore the signal(3) test, as it's currently hanging Mono.
2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
* StdlibTest.cs: Added tests for signal(3) and snprintf(3).
2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
* ChangeLog: Started.
* UnixGroupTest.cs, UnixUserTest.cs: Added.

View File

@@ -1001,7 +1001,7 @@ namespace MonoTests.Mono.Unix {
Assert.AreEqual (end.Length, bytes.Length, prefix + ": byte length");
for (int i = 0; i < Math.Min (bytes.Length, end.Length); ++i)
for (int i = 0; i < global::System.Math.Min (bytes.Length, end.Length); ++i)
Assert.AreEqual (end [i], bytes [i], prefix + ": byte " + i);
int cc = unix.GetCharCount (end, 0, end.Length);
@@ -1012,7 +1012,7 @@ namespace MonoTests.Mono.Unix {
Assert.AreEqual (start.Length, r, prefix + ": chars length");
for (int i = 0; i < Math.Min (r, start.Length); ++i) {
for (int i = 0; i < global::System.Math.Min (r, start.Length); ++i) {
Assert.AreEqual (start [i], chars [i], prefix + ": char " + i);
}
}

View File

@@ -0,0 +1,45 @@
// UnixEndPointTest.cs: Unit tests for Mono.Unix.UnixListener
//
// Authors:
// David Lechner (david@lechnology.com)
//
// (c) 2015 David Lechner
//
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using NUnit.Framework;
using Mono.Unix;
namespace MonoTests.Mono.Unix {
[TestFixture]
public class UnixEndPointTest {
// Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=35004
[Test]
public void TestCreate ()
{
const string socketFile = "test";
// mangledSocketFile simulates the socket file name with a null
// terminator and junk after the null terminator. This can be present
// in a SocketAddress when marshaled from native code.
const string mangledSocketFile = socketFile + "\0junk";
var bytes = Encoding.Default.GetBytes (mangledSocketFile);
var socketAddress = new SocketAddress (AddressFamily.Unix, bytes.Length + 2);
for (int i = 0; i < bytes.Length; i++) {
socketAddress [i + 2] = bytes [i];
}
var dummyEndPoint = new UnixEndPoint (socketFile);
// testing that the Create() method strips off the null terminator and the junk
var endPoint = (UnixEndPoint)dummyEndPoint.Create (socketAddress);
Assert.AreEqual (socketFile, endPoint.Filename, "#A01");
}
}
}

View File

@@ -0,0 +1,36 @@
// UnixListenerTest.cs: Unit tests for Mono.Unix.UnixListener
//
// Authors:
// David Lechner (david@lechnology.com)
//
// (c) 2015 David Lechner
//
using System;
using System.IO;
using NUnit.Framework;
using Mono.Unix;
namespace MonoTests.Mono.Unix {
[TestFixture]
public class UnixListenerTest {
// test that a socket file is created and deleted by the UnixListener
[Test]
public void TestSocketFileCreateDelete ()
{
var socketFile = Path.GetTempFileName ();
// we just want the file name, not the file
File.Delete (socketFile);
using (var listener = new UnixListener (socketFile)) {
// creating an instance of UnixListener should create the file
Assert.IsTrue (File.Exists (socketFile), "#A01");
}
// and disposing the UnixListener should delete the file
Assert.IsFalse (File.Exists (socketFile), "#A02");
}
}
}