+2006-01-02 Jonathan Pryor <jonpryor@vt.edu>
+
+ * FileAccessPermissions.cs: Remove UserMask, GroupMask, OtherMask values.
+ * FileSpecialAttributes.cs: Remove AllAttributes member; it shouldn't be
+ public. Use UnixFileSystemInfo.AllSpecialAttributes instead.
+ * StdioFileStream.cs: Open files in binary mode, not text;
+ Fix exception message for StdioFileStream(path, mode) mode param check.
+ * UnixDirectoryInfo.cs: Add Create(FileAccessPermissions) overload; change
+ GetFileSystemEntries() to include the directory name that the files came
+ from (otherwise they're in the current working direcetory, which they
+ probably aren't).
+ * UnixFileInfo.cs: Add Create(FileAccessPermissions) overload; Add better
+ argument checking to several Open() overloads.
+ * UnixFileSystemInfo.cs: Add AllSpecialAttributes, AllFileTypes members;
+ FullPath member should invalidate instance if path changes; Change return
+ type of GetFileStatus for maintenance/better documentation; ToStat()
+ should ensure that the instance is valid first.
+ * UnixMarshal.cs: Add additional Errno values to CreateExceptionForError();
+ reformat CreateExceptionForError for maintenance.
+ * UnixPath.cs: Obsolete InvalidPathChars -- FxCop never liked it, and now I
+ know why it didn't like it (thank you Framework Design Guidelines!).
+ * UnixStream.cs: Use UnixFileSystemInfo.AllSpecialAttributes, not
+ FileSpecialAttributes.AllAttributes (which was removed).
+ * UnixSymbolicLinkInfo.cs: Change return type of GetFileStatus().
+
+2005-12-28 Jonathan Pryor <jonpryor@vt.edu>
+
+ * FileHandleOperations.cs: Check for null references.
+
+2005-12-28 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixMarshal.cs: Errno.EBADF should also trigger a ArgumentException.
+
+2005-12-27 Jonathan Pryor <jonpryor@vt.edu>
+
+ * FileHandleOperations.cs, FileTypes.cs, Stdlib.cs, Syscall.cs,
+ UnixConvert.cs, UnixDirectory.cs, UnixDirectoryInfo.cs, UnixDriveInfo.cs,
+ UnixEnvironment.cs, UnixFile.cs, UnixFileInfo.cs, UnixFileSystemInfo.cs,
+ UnixGroup.cs, UnixGroupInfo.cs, UnixIOException.cs, UnixMarshal.cs,
+ UnixPath.cs, UnixPipes.cs, UnixProcess.cs, UnixStream.cs,
+ UnixSymbolicLinkInfo.cs, UnixUser.cs, UnixUserInfo.cs: Mark to-be-removed
+ API with [Obsolete(IsError=true)] (permits compiler assistance for finding
+ obsolete code); Migrate to the Mono.Unix.Native API.
+ * StdioFileStream.cs: Add non-Obsolete overloads for SaveFilePosition &
+ RestoreFilePosition (oops). Migrate to Mono.Unix.Native API.
+
+2005-12-07 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixMarshal.cs: Add PtrToStringUnix() -- specialized PtrToString method
+ which is significantly faster than PtrToString(p, UnixEncoding.Instance).
+ Use System.String..ctor(sbyte*, int, int, Encoding) to avoid the byte[]
+ intermediate copy -- much faster. Fix PtrToString() so that it will
+ accept an IntPtr containing 0 characters, and don't duplicate strings
+ unless necessary.
+
+2005-11-18 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Catalog.cs, UnixDirectory.cs, UnixDirectoryInfo.cs, UnixDriveInfo.cs,
+ UnixEnvironment.cs, UnixFile.cs, UnixFileInfo.cs, UnixFileSystemInfo.cs,
+ UnixGroup.cs, UnixGroupInfo.cs, UnixProcess.cs, UnixSymbolicLinkInfo.cs,
+ UnixUser.cs, UnixUserInfo.cs: Change types of [Obsolete] members for
+ consistency and CLS compliance; Mono.Unix.Native type migration.
+ * FileTypes.cs: s/Special/Device/g (CharacterSpecial ==> CharacterDevice).
+ The *Special was a BSD convention, while UnixFileSystemInfo uses *Device
+ in property names, and these should be consistent. Changing the enum is
+ simpler than changing the UnixFileSystemInfo properties.
+ * UnixIOException.cs: s/error/errno/g (FxCop suggestion); change type of
+ ErrorCode property.
+ * UnixMarshal.cs: s/error/errno/g (FxCop suggestion); Mono.Unix.Native
+ type migration.
+
+2005-11-08 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Catalog.cs: Exception safety improvements (don't let memory leak!); check
+ for errors with bindtextdomain(3) et. al.
+
+2005-11-08 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixPipes.cs: Provide Equals, GetHashCode, and operator==/operator!= to
+ conform with FxCop guidelines for structures.
+
+2005-11-03 Jonathan Pryor <jonpryor@vt.edu>
+
+ * FileTypes.cs, UnixFileSystemInfo.cs: s/FIFO/Fifo/ to follow .NET
+ naming conventions (as reported by FxCop).
+
+2005-11-01 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixDirectoryInfo.cs, UnixDriveInfo.cs, UnixEnvironment.cs,
+ UnixFileSystemInfo.cs, UnixGroupInfo.cs, UnixProcess.cs, UnixUserInfoc.cs:
+ Obsolete statements now specify in what way the return type will change.
+ * IncludeAttribute.cs: Obsoleted. It's an error to use it now.
+
+2005-11-01 Jonathan Pryor <jonpryor@vt.edu>
+
+ * FileAccessPattern.cs: Change enumeration names to match Robert Love's more
+ sensible names from his FileAdvise class used in Beagle
+ (UseSoon --> PreLoad, WillNotUse --> FlushCache).
+ * FileHandleOperations.cs: Added; contains AdviseFileAccessPattern()
+ (moved from UnixFile.cs).
+ * UnixDirectory.cs: Obsolete the class; use UnixDirectoryInfo instead.
+ * UnixDirectoryInfo.cs: Add GetCurrentDirectory(), SetCurrentDirectory().
+ * UnixFile.cs: Obsolete the class; use UnixFileInfo, FileHandleOperations,
+ or UnixPipes instead.
+ * UnixFileSystemInfo.cs: Add ToStat() method.
+ * UnixGroup.cs: Obsolete the class; use UnixGroupInfo instead.
+ * UnixGroupInfo.cs: Obsolete & Replace constructor, add GetMemberNames(),
+ GetLocalGroups().
+ * UnixPipes.cs: Added (type moved from UnixFile.cs).
+ * UnixStream.cs: AdviseFileAccessPattern() uses FileHandleOperations now.
+ * UnixSymbolicLinkInfo.cs: Implement TryReadLink() to avoid constant buffer
+ re-sizing. Stevens states that the file size of the symlink is the number
+ of bytes needed to hold the symlink, so this should be faster.
+ * UnixUser.cs: Obsolete the class; use UnixUserInfo instead.
+ * UnixUserInfo.cs: Obsolete & Replace constructor; add useful static members
+ from UnixUser such as GetLoginName(), GetLocalUsers(), etc.
+
+2005-10-27 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixEnvironment.cs: Add RealUser, RealGroup, EffectiveUser, EffectiveGroup
+ properties; [Obsolete] necessary methods and provide replacements.
+ * UnixStream.cs: Add OwnerUser(Id), OwnerGroup(Id) properties;
+ improve Stat handling.
+
+2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixEncoding.cs: Change EscapeByte to 0x0000, as suggested by Michal
+ Moskal.
+ * UnixPath.cs: Remove '\0' from InvalidPathChars, since U+0000 is now used
+ as the path escape character for marshaling purposes.
+
+2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixMarshal.cs: Obsolete heap-related methods to have a Heap suffix
+ (AllocHeap, FreeHeap, etc.), and change StringToAlloc() to be
+ StringToHeap(). This creates a stronger name association between related
+ methods.
+
+2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixIOException.cs: Add (string) and (string, Exception) constructors to
+ silence FxCop; re-work logic so we lookup the error string at construction
+ time and use this as the message for the base class.
+
+2005-10-25 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs, Syscall.cs: Filenames need to be marshaled through the
+ FileNameMarshaler, which will encode/decode filenames with UnixEncoding.
+ * UnixEncoding.cs: Added (copied from
+ ../../corlib/System.Text/UTF8Encoding.cs); a hack to permit handling of
+ arbitrarily encoded filenames. It attempts to decode a byte[] array as
+ UTF-8, and if the decode fails it prefixes each byte with
+ UnixEncoding.EscapeByte (\uFFFF).
+ * UnixMarshal.cs: Use UnixEncoding as the default encoding, and special-case
+ UnixEncoding to use Stdlib.strlen() for native string lengths.
+
+2005-10-21 Jonathan Pryor <jonpryor@vt.edu>
+
+ * FileAccessPattern.cs: Added
+ * UnixFile.cs, UnixStream.cs: Deprecate all the Advise* methods (lots!)
+ and replace with 6 methods which take a FileAccessPattern enum.
+
+2005-10-19 Jonathan Pryor <jonpryor@vt.edu>
+
+ * FileAccessPermissions.cs, FileSpecialAttributes.cs, FileTypes.cs: Added.
+ * UnixFileSystemInfo.cs, UnixStream.cs: Replace the old Permission property
+ with 4 new properties: Protection (for the Native.FilePermissions value),
+ FileAccessPermissions (for rwxrwxrwx info), FileSpecialAttributes (for
+ set-user-id, set-group-id, sticky), and FileTypes (directory, socket...).
+ The new enumeration types have nicer CLS-compliant names.
+
+2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixMarshal.cs: Fix GetIntXxBufferLength to require fewer
+ Marshal.ReadIntXx() calls; Fix PtrToString so that
+ ``"foo" == PtrToString (StringToAlloc("foo",enc),enc)'' is true for
+ "random" encodings.
+
+2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixFileSystemInfo.cs: Add OwnerUserId and OwnerGroupId properties.
+
+2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixDriveInfo.cs, UnixEnvironment.cs, UnixFile.cs, UnixFileSystemInfo.cs,
+ UnixGroup.cs, UnixStream.cs, UnixUser.cs: Don't use SetLastError(), since
+ it's use is (1) incorrect, and (2) will be going away with the move to
+ Mono.Unix.Native.Syscall. Instead use the Native.Syscall.* APIs which
+ set errno sanely.
+
+2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixGroup.cs, UnixGroupInfo.cs, UnixFile.cs, UnixFileSystemInfo.cs,
+ UnixStream.cs, UnixSymbolicLinkInfo.cs, UnixUser.cs, UnixUserInfo.cs:
+ Start migrating uid/gid to long (from uint) for CLS compliance.
+ (Full migration must wait 'til after the next release as this would
+ require changes to existing members.)
+ * UnixEnvironment.cs: Above, and add RealUserId/RealGroupId and
+ EffectiveUserId/EffectiveGroupId.
+
+2005-10-14 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Catalog.cs: Create a constructor and mark it [Obsolete]. It will be made
+ private after the next release.
+ * UnixFile.cs, UnixStream.cs: Deal with Mono.Unix.Native type name changes.
+ * UnixFileSystemInfo.cs: [Obsolete] more members; Deal with Mono.Unix.Native
+ type name changes.
+ * Syscall.cs: Create maps for PathConf, SysConf, ConfStr again; fpathconf(),
+ pathconf(), and sysconf() should call Native.Syscall since the
+ MonoPosixHelper.so helpers have changed.
+
+2005-10-13 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixMarshal.cs: More/better StringToAlloc/PtrToString which take a
+ System.Text.Encoding instance for proper string marshaling.
+ - PtrToString(string,Encoding) is particularly tricky due to variable
+ length encodings.
+ - Fix StringToAlloc so that it works properly with UTF-16 encodings
+ (we need a terminating null 16-bit word, not a null byte).
+ - StringToAlloc overload for doing substrings.
+
+2005-10-12 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixStream.cs: Check for EROFS and EINVAL in Flush(). Snorp was getting
+ an exception when he created a UnixStream around a socket, because
+ sockets can't be flushed. It should be acceptable to create a UnixStream
+ around a socket, so don't throw an exception in this scenario.
+
+2005-10-06 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixDirectory.cs, UnixDirectoryInfo.cs UnixFile.cs, UnixFileSystemInfo.cs,
+ UnixGroupInfo.cs, UnixIOException.cs, UnixStream.cs, UnixUserInfo.cs:
+ API Review: Obsolete appropriate members and add appropriate overloads for
+ pending move to Mono.Unix.Native types.
+ * UnixMarshal.cs: API Review; add StringToAlloc().
+
+2005-09-26 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixFileSystemInfo.cs: Exists shouldn't use access(2), as (1) Exists isn't
+ virtual, and (2) access(2) errors if you try to access(2) a symlink which
+ points nowhere. Use (l)stat(2) instead, via GetFileStatus(), as this lets
+ UnixSymbolicLinkInfo behave properly.
+ * UnixSymbolicLinkInfo.cs: The Contents property should return null if the
+ symlink target doesn't exist.
+
+2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Add [Map] to AccessMode and MmapProt, as the Mono.Unix.Native
+ replacements go by different names (AccessModes, MmapProts), but we need
+ to continue generating the mapping code for these types (backward compat).
+
+2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
+
+ * CdeclFunction.cs: [Obsolete]d by Mono.Unix.Native.CdeclFunction.
+ * make-map.cs: Remove.
+ * Stdlib.cs: [Obsolete] the types; use the Mono.Unix.Native.* types instead.
+ * StdioFileStream.cs: Add GC.KeepAlive statements to prevent premature GC's
+ (FxCop suggestion).
+ * Syscall.cs: Remove [Map] attribute from all types; [CLSCompliant(false)]
+ work; [Obsolete] all types and suggest using the Mono.Unix.Native.*
+ replacements; remove [IncludeAttribute] -- superseded by
+ Mono.Unix.Native/Syscall.cs's [HeaderAttribte] for CLS compliance.
+ * UnixConvert.cs: [Obsolete]d by Mono.Unix.Native.NativeConvert.
+ * UnixDirectory.cs, UnixDriveInfo.cs, UnixEnvironment.cs,
+ UnixGroup.cs, UnixGroupInfo.cs,
+ UnixSymbolicLinkInfo.cs, UnixUser.cs, UnixUserInfo.cs:
+ Add [CLSCompliant(false)] as necessary.
+ * UnixFile.cs, UnixDirectory.cs, UnixFileInfo.cs, UnixFileSystemInfo.cs:
+ [CLSCompliant(false)], addition of method overloads for [Obsolete]d types,
+ warn about changing return types.
+ * UnixProcess.cs, UnixStream.cs: Add [CLSCompliant(false)] as necessary,
+ and warn about changing property types.
+
+2005-09-02 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Cache delegates passed to Stdlib.signal() so that they survive
+ garbage collections. Delegates can be removed by calling Stdlib.signal()
+ again with one of the Stdlib.SIG_* values (or the original return value of
+ Stdlib.signal()).
+ * UnixUser.cs, UnixGroup.cs, UnixEnvironment.cs: Clarify "Id" (int) vs.
+ "Name" (string) differences by always using a Id or Name suffix.
+
+2005-07-01 Daniel Drake <dsd@gentoo.org>
+
+ * Syscall.cs: The entire extended attribute API now goes through MPH, to
+ be shared between both Linux's and FreeBSD's similar EA implementations.
+
+2005-06-29 Miguel de Icaza <miguel@ximian.com>
+
+ * StdioFileStream.cs: Only flush if we do not own the handle, as
+ fclose does a flush internally.
+
+2005-06-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixEnvironment: Add User, Login properties.
+ * Syscall.cs: Add locking around cuserid, crypt, encrypt, getlogin.
+
+2005-06-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: SyslogFacility shouldn't be [Flags] either. Sigh.
+ Thanks to Vorobiev Maksim for pointing this out.
+ * make-map.cs: Don't generate conversion code for [Obsolete] enum members.
+ This assumes that (1) the enum member's value is invalid, or (2) a
+ corrected member with the same value exists. This fix allows us to
+ obsolete invalid members (instead of removing them) without screwing up
+ the generated code -- consider LOG_USRE, the mis-spelling of LOG_USER.
+ Since SyslogFacility was (incorrectly) a [Flags] enum, since both LOG_USER
+ and LOG_USRE had the same value, we'd get a EINVAL error trying to convert
+ a valid value, since LOG_USRE would exist, would be checked for, and the
+ check would succeed (since it had the same value as LOG_USER).
+ This change allows us to be slightly more permissive with versioning.
+
+2005-06-28 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: correct value of LOG_CRON (it shouldn't be identical to
+ LOG_UUCP). SyslogLevel shouldn't have [Flags]. Move LOG_USER to be
+ before LOG_USRE so that the generated map code doesn't return EINVAL when
+ LOG_USER is specified.
+
+2005-06-15 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: s/LOG_USRE/LOG_USER/. Fixes #75274.
+ Thanks to Martin Honermeyer.
+
+2005-06-09 Jonathan Pryor <jonpryor@vt.edu>
+
+ * make-map.cs: Look for [Obsolete] members, and mark the UnixConvert
+ conversion functions with the same [Obsolete] message. This should permit
+ more graceful deprecation of enumerations in the future (rather than just
+ API breaks).
+
+2005-06-08 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Add execvp(2). (This should have been added with the other
+ exec(2) additions...).
+
+2005-06-08 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Update comment with correct exception type.
+ * UnixConvert.cs: Rename ToFilePermissions(string) to
+ FromOctalPermissionString; Add ToOctalPermissionString,
+ FromUnixPermissionString, ToUnixPermissionString.
+ * UnixMarshal.cs: Remove ErrorMarshal.HaveStrerror_r and
+ UnixMarshal.IsErrorDescriptionThreadSafe. strerror(3) is now thread-safe
+ (from managed code, at least). Update comment.
+
+2005-06-07 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixFileSystemInfo.cs: Don't use lstat(2), use stat(2). This fits with
+ expectations better -- if you create a UnixFileInfo() on a symlink, you
+ want to get the target's information, not the symlink's info. Add
+ GetFileStatus so UnixSymbolicLinkInfo can override this behavior.
+ * UnixSymbolicLinkInfo.cs: Implement GetFileStatus() (which calls lstat(2)).
+
+2005-06-07 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Document naming conventions.
+
+2005-06-05 Jonathan Pryor <jonpryor@vt.edu>
+
+ * make-map.cs: Change automatic "ifdef HAVE_<header>" support prefix to
+ "ah:" from ">". I hadn't known about ">", and "ah:" is (somewhat) more
+ obvious.
+ * Syscall.cs: Change IncludeAttribute to put all headers/defines one/line.
+ It's easier to read this way. Add "ah:sys/xattr.h" to the headers.
+
+2005-06-03 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Add sanity checking to snprintf(3) to avoid buffer overflows.
+
+2005-06-02 Jonathan Pryor <jonpryor@vt.edu>
+
+ * StdioFileStream.cs: Remove FilePosition property & replace with
+ SaveFilePosition/RestoreFilePosition methods. Since FilePosition has a
+ finalizer, it's not right to have implicitly created instances.
+ * Stdlib.cs:
+ - FilePosition: GC.SuppressFinalize() should be last in Dispose()
+ (following .NET guidelines).
+ - Syscall: Add locking around functions most likely to be thread unsafe.
+ This should provide some level of thread-safety to managed code.
+ * Syscall.cs: Add locking around functions most likely to be thread unsafe;
+ add mkstemp(3) export.
+ * UnixEnvironment.cs: GetUserShells should be atomic (from managed code).
+ * UnixGroup.cs: GetLocalGroups should be atomic (from managed code).
+ * UnixGroupInfo.cs: Add ToGroup() method to retrieve underlying Group info.
+ * UnixUser.cs: GetLocalUsers should be atomic (from managed code).
+ * UnixUserInfo.cs: Add ToPasswd () method to retrieve underlying Passwd info.
+ * UnixDriveInfo.cs: GetDrives should be atomic (from managed code).
+
+2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Add comment for atexit(3) so I don't try to add it.
+ * Syscall.cs: Add fcntl(2) overload which takes DirectoryNotifyFlags (so
+ that *something* accepts a DirectoryNotifyFlags); Fix IncludeAttribute
+ header files (">sys/poll.h" doesn't exist);
+ Add additional <sys/mman.h> functions mmap, munmap, msync, mlock, munlock,
+ mlockall, munlockall, mremap, mincore, remap_file_pages.
+ * UnixConvert.cs: Add conversion functions for MmapFlags, MmapProt, MsyncFlags,
+ MlockallFlags, MremapFlags.
+
+2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs, UnixConvert.cs: Rename LockFlags to LockfCommand. This is a more
+ consistent naming, and it's more correct (they weren't flags in the first place).
+
+2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Correct Mono_Posix_Stdlib_InvokeSignalHandler export.
+
+2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
+
+ * make-map.cs: Process the Mono.Posix namespace as well as Mono.Unix; add
+ mapping for Boolean => int for native type conversion.
+
+2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
+
+ * make-map.cs: Add a MphPrototypeFileGenerator, which looks for DllImport
+ methods across all types and generates a C header file declaration for
+ those methods. This allows us to ensure consistency between
+ Mono.Posix.dll and MonoPosixHelper.so. Rename WrapperFileGenerator to
+ ConvertFileGenerator (it generates UnixConvert).
+ * MapAttribute.cs, IncludeAttribute.cs: Make these internal -- there's no
+ reason for external users to even know these exist.
+ * StdioFileStream.cs: Move GC.SuppressFinalize call to be last Dispose()
+ call. This follows current design guidelines, and allows an exception to
+ be thrown from Dispose() without un-registering the finalizer.
+ * Syscall.cs: Change method declarations to match MonoPosixHelper, etc.
+ - posix_fallocate(P) takes a size_t
+ - mis-spelled settimeofday(2), sethostname(2)
+ - exec(2) can be public; it's safe to call
+ - change lseek(2) so int's are passed to MonoPosixHelper.so, not shorts
+ - We can't allow two incompatible prototypes to exist (since C allows
+ only one prototype, and we're cross-checking prototypes now). Change
+ utime(2) so only one prototype is needed.
+ * UnixMarshal.cs: ErrorMarshal.ErrorTranslator and ErrorMarshal.Translate
+ shouldn't be public; make them internal.
+ * UnixStream.cs: Remove `unsafe` code block when a "safe" alternative works;
+ Close() should also call GC.SuppressFinalize.
+
+2005-05-12 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: The Statvfs structure should contain a MountFlags enumeration,
+ not a ulong (we can "safely" do this since POSIX defines some values for
+ f_flag, so we should be kind and expose them).
+ * UnixConvert.cs: Add MountFlags conversion functions.
+
+2005-05-02 Joe Shaw <joeshaw@novell.com>
+
+ * UnixListener.cs (Init): Remove the call to Cleanup() and the
+ method itself, which was not supposed to be here. We try to
+ connect to the socket if it exists instead of deleting it
+ undconditionally.
+
+2005-04-30 Ben Maurer <bmaurer@ximian.com>
+
+ * Stdlib.cs: Comment out usage of `UnmanagedFunctionPointer'. It
+ isn't supported in the runtime -- it throws an assert -- so better
+ not to use it at all for now.
+
+2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixConvert.cs: Fix time_t -> DateTime conversions. time_t should be
+ assumed to be in the local time zone, so don't mess with UTC shifts.
+ This allows Mono.Unix to produce sane output (e.g. identical to ls(1) or
+ stat(1), instead of several hours different).
+
+2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Make FilePosition slightly more useful by providing a
+ ToString() override which dumps the fpos_t structure contents into a
+ hex string. Add Equals(), GetHashCode(), operator==, and operator!=
+ so FilePosition behaves like a value type.
+
+2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * UnixClient.cs:
+ * UnixListener.cs: TcpListener/TcpClient clones from Jow Shaw.
+
+2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Mono.Posix.dll.sources: added UnixListener and UnixClient from Joe
+ Shaw.
+
+2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * UnixEndPoint.cs: fix from Mono.Posix.
+
+2005-04-20 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Make all fork(2) and exec(2) functions `private`. It
+ currently isn't safe to call these under *any* circumstances. See also
+ 68141, and this pertinent quote from Butenhof's
+ "Programming with POSIX Threads", p197, s6.1:
+
+ "When a threaded process calls fork to create a child process,
+ Pthreads specifies that only the thread calling fork exists in the
+ child. ... Pthreads does not 'terminate' the other threads in a forked
+ process...They simply cease to exist. ... This is not a problem if
+ the child process is about to call exec to run a new program, but if
+ you use fork to clone a threaded program, beware that you may lose
+ access to memory, especially heap memory stored only as
+ thread-specific data values."
+
+ Since P/Invoke currently requires using thread local storage, once you
+ fork(2) you won't be able to invoke exec(2) from managed code (since that
+ would require a P/Invoke transition to call exec(2), which would require
+ TLS, which doesn't exist in the new process).
+
+ This can only be fixed by removing the TLS dependency on P/Invoke, which
+ isn't a priority (and may not be possible).
+
+ The workaround is to create a C function which does your fork(2)/exec(2)
+ (and any other functions such as daemon(3)) on your behalf, and P/Invoke
+ to call this C function.
+
+2005-04-18 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Update comment specifying which functions belong in Syscall.
+ * UnixConvert.cs: Add XattrFlags conversion functions.
+ * UnixMarshal.cs: Remove warning about self-assignment.
+
+2005-04-16 Daniel Drake <dsd@gentoo.org>
+
+ * Syscall.cs: Add bindings for extended attribute manipulation
+
+2005-04-05 Miguel de Icaza <miguel@novell.com>
+
+ * Syscall.cs: Set entry point for sys_syslog to be syslog.
+ Include the syslog.h header in the generated map so that we
+ actually do the mapping.
+
+2005-03-28 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixConvert.cs: Add ToFopenMode() methods, which convert FileMode/FileAccess
+ into an fopen(3) mode string. ToOpenFlags() should throw
+ ArgumentOutOfRangeException for argument violations.
+ * StdioFileStream.cs: Add constructor overloads accepting filename and
+ FileMode/FileAccess overloads; Compatibility fixes with regression tests;
+ remove IDisposable implementation since System.IO.Stream already
+ implements it (which calls Close() for us).
+
+2005-03-17 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Move Errno-related functionality into Stdlib from Syscall,
+ since (1) errno is part of C89, and (2) StdioFileStream will need it, and
+ StdioFileStream shouldn't use Syscall. Add [UnmanagedFunctionPointer]
+ attribute to SignalHandler for .NET 2.0 (since signal handlers use C
+ calling convention, not Stdcall).
+ * Syscall.cs: Move Errno-related functionality into Stdlib.
+ * UnixMarshal.cs: Use ERANGE not EPERM when figuring out appropriate
+ translator, since ERANGE is part of C99 and EPERM isn't. Use Stdlib
+ instead of Syscall for Errno-related functionality.
+
+2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixFile.cs: Cope with changes in UnixStream.
+ * UnixStream.cs: Change FileDescriptor property to Handle for consistency.
+ * StdioFileStream.cs: Change FileStream property to Handle for consistency.
+
+2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Remove public sys_ methods. Some were public by mistake, and
+ others so that users could manually marshal strings if desired. Manually
+ marshaling strings shouldn't be necessary, though, so remove them too.
+
+2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
+
+ * StdioFileStream.cs: Fix Length property to actually return the size of the
+ file, not the # of bytes from the current position to EOF. Oops.
+
+2005-01-31 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Import "msvcrt", not "libc". These members are part of the
+ ANSI C standard, and thus should be present on Windows via msvcrt.dll
+ (except snprintf, until they catch up to C99). Change the calling
+ convention of all functions to Cdecl, as the .NET default is Stdcall.
+ Changing the calling convention isn't needed in Syscall, as it can only be
+ run on Unix platforms anyway, where the default is Cdecl.
+ * Syscall.cs: Add LIBC member that points to the real "libc"; we can't use
+ the imported definition from Stdlib as "msvcrt" doesn't exist on Unix.
+
+2005-01-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: sys_* functions shouldn't be public.
+
+2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
+
+ * make-map.cs: libMonoPosixHelper exports Mono_Posix prefixes, not Mono_Unix
+ prefixes, so change the type and namespace to generate compatible code.
+ * Syscall.cs: Change OpenFlags values so they match the Linux values.
+
+2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Use Stdlib.LIBC instead of "libc".
+ * StdioFileStream.cs: Add FilePosition property (not that I expect anyone to
+ use it) and Rewind() method.
+
+2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
+
+ * StdioFileStream.cs: Added; System.IO.Stream wrapper for C FILE struct.
+ * Stdlib.cs: Correct visibility of ftell().
+
+2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Re-order declarations to match the order used in the
+ C99 Standard Annex B; Complete <stdio.h> exports (except for those not
+ worth supporting); Add non-"unsafe" versions of fread(3), fwrite(3) and
+ add some rudimentary buffer-overflow checking; Add <stdlib.h> exports such
+ as getenv(3), exit(3), rand(3), EXIT_SUCCESS, RAND_MAX, etc.
+
+2005-01-03 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Update endfsent() and setfsent() declarations, as these must
+ now be implemented in MonoPosixHelper.
+
+2005-01-01 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs, Syscall.cs: Minimize duplicate declarations of
+ "MonoPosixHelper" for use in DllImport statements.
+
+2005-01-01 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Don't use C# v2 features; fixes build under CSC.EXE.
+
+2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: On miguel's suggestion, rename Sighandler_t to SignalHandler.
+
+2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Stdlib.cs: Implement all C89 <stdio.h> functions except for the scanf(3)
+ family. These are too dangerous to expose.
+
+2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
+
+ * CdeclFunctions.cs: Remove warning about unused variable.
+ * Stdlib.cs: Make signal(2) sane and (hopefully) complete.
+ * Syscall.cs: Fix cuserid Obsolete message to reference correct class name.
+ * UnixProcess.cs: Remove warning about unused variable.
+ * UnixMarshal.cs: Remove warnings about unused variables.
+
+2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixPath.cs: Add ReadSymbolicLink(), which takes an intelligent approach
+ to reading symlinks (since their contents may be any size, we grow the
+ buffer dynamically to fit them all, instead of assuming a maximum size).
+ * UnixSymbolicLinkInfo.cs: Remove MaxContentsSize.
+
+2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixPath.cs: Add check for when symlink points to a full path name.
+
+2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Syscall.cs: Fix Object.Equals implementations.
+ * UnixPath.cs: New & improved, with Testing! GetRealPath() is changed so
+ that it doesn't walk the entire path looking for symlinks, it just reads
+ the leaf. GetCompletRealPath() walks the entire path resolving symlinks.
+ GetCanonicalPath() added, which "cleans up" a path (removing extraneous
+ "." and ".." entries).
+ * UnixSymbolicLinkInfo.cs: Rename ContentsLength -> MaxContentsSize.
+
+2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
+
+ * UnixFileSystemInfo.cs: Add a link(2) wrapper, CreateLink(). Strictly
+ speaking it's only "safe" to do this on files, but an exception will be
+ returned if the user tries to hard link directories (because of EPERM),
+ unless the user is root, in which case it should be allowed anyway...
+
2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
* CdeclFunctions.cs: Correct the comments for AMD64