1 2006-03-06 Jonathan Pryor <jonpryor@vt.edu>
3 * UnixDriveInfo.cs: Remove requirement that mountPoints be avaible via
4 getfsfile(3). This isn't always the case -- in particular drives mounted
5 via HAL and other mechanisms won't be listed in /etc/fstab, and thus won't
6 be returned via getfsfile(3). If getfsfile(3) fails, then we "guess" on
7 the drive format and volume label.
8 * UnixStream.cs: RefreshStat() should assert that the instance hasn't been
10 * UnixEnvironment.cs (GetConfigurationValue, GetConfigurationString): Fix
13 2006-02-23 Jonathan Pryor <jonpryor@vt.edu>
15 * UnixFileSystemInfo.cs: Create() should return a UnixFileInfo if the file
16 doesn't exist. This allows callers to use UnixFileInfo.Exists to see if
17 the file exists, and behaves more rationally e.g. if the directory
18 contents changes while calling UnixDirectoryInfo.GetFileSystemEntries(),
19 we'll get a UnixFileInfo entry that doesn't exist instead of an exception
20 terminating the entire array creation.
21 * UnixSymbolicLinkInfo.cs: [Obsolete] the Contents property -- this property
22 *always* creates a new object if HasContents=true, and since a
23 UnixFileSystemInfo instance is (104+2*(sizeof(void*))+1) bytes (~113 bytes
24 on 32-bit platforms), we don't want to create these frequently. Add a
25 GetContents() method as the replacement, to make it (slightly) more
26 explicit that information won't be cached (and thus should be cached by
27 the caller, if appropriate). GetContents() throws an exception if
28 HasContents=false instead of returning null; this change brings the
29 implementation in line with the documentation.
31 2006-02-18 Alp Toker <alp@atoker.com>
33 * UnixEndPoint.cs: Avoid truncation of last two bytes of SocketAddress
36 2006-01-26 Jonathan Pryor <jonpryor@vt.edu>
38 * UnixMarshal.cs: Check for null arguments in PtrToString() and
41 2006-01-24 Jonathan Pryor <jonpryor@vt.edu>
43 * UnixMarshal.cs (StringToHeap): Return IntPtr.Zero if `s' is null.
45 2006-01-24 Jonathan Pryor <jonpryor@vt.edu>
47 * UnixMarshal.cs (StringToHeap): Check for null arguments.
49 2006-01-20 Jonathan Pryor <jonpryor@vt.edu>
51 * UnixDriveInfo.cs: Properties should generate an InvalidOperationException,
52 not an IOException. Users can use IsReady to avoid exception generation.
53 * UnixIOException.cs: Create a custom message that embeds the error name
54 within the text, e.g. "Permission denied [EACCES]."
55 * UnixSymbolicLinkInfo.cs: This really should create the file FullPath, not
56 OriginalPath. Created files shouldn't ever be relative to the current
57 working directory, as this can change at any time.
59 2006-01-15 Jonathan Pryor <jonpryor@vt.edu>
61 * UnixUserInfo.cs: The UnixUserInfo(Native.Passwd) constructor and
62 ToPasswd() should clone the underlying Native.Passwd, so
63 that it doesn't get changed from underneath it.
64 * UnixGroupInfo.cs: The UnixGroupInfo(Native.Group) constructor should also
65 clone the provided Native.Group instance.
67 2006-01-14 Jonathan Pryor <jonpryor@vt.edu>
69 * UnixGroupInfo.cs: ToGroup() should clone the underlying Native.Group, so
70 that it doesn't get changed from underneath it.
72 2006-01-13 Jonathan Pryor <jonpryor@vt.edu>
74 * Catalog.cs, UnixMarshal.cs: Throw `UnixIOException(Native.Errno.ENOMEM)`
75 instead of System.OutOfMemoryException. OOME should be reserved for use
76 by the CLR (according to FxDG).
78 2006-01-12 Jonathan Pryor <jonpryor@vt.edu>
80 * UnixPath.cs: Add ReadLink() and TryReadLink() methods.
82 2006-01-12 Miguel de Icaza <miguel@novell.com>
84 * PeerCred.cs: Do not define PeerCredData as this is a structure
85 known to the runtime. Instead use the Mono.Posix.PeerCredData
88 2006-01-10 Jonathan Pryor <jonpryor@vt.edu>
90 * Catalog.cs: Don't use
91 System.Runtime.InteropServices.Marshal.StringToHGlobalAuto(), use
92 UnixMarshal.StringToHeap(). We require that the converted string be in
93 UTF-8 format, but .NET's Marshal.StringToHGlobalAuto converts to the local
94 code page, *not* UTF-8 (Mono's does UTF-8). UnixMarshal.StringToHeap
95 *always* does UTF-8, so use that instead.
97 2006-01-09 Jonathan Pryor <jonpryor@vt.edu>
99 * FileTypes.cs: Remove [Flags] attribute -- these aren't bitfield values.
100 * UnixFileSystemInfo.cs: Fix Is<<Type>> properties -- before it would
101 erroneously say that a symlink was a character device. (This is because
102 device values are *not* [Flags] values, but code was assuming they were.)
103 * UnixGroupInfo.cs: Clone the string[] returned from GetMemberNames(). We
104 don't want callers to change the underlying list.
106 2006-01-07 Jonathan Pryor <jonpryor@vt.edu>
108 * UnixMarshal.cs: *Actually* put things in alphabetical order (like the
109 comment says). I can speak english, really I can.
111 2006-01-06 Jonathan Pryor <jonpryor@vt.edu>
113 * Catalog.cs: s/libintl/intl/g, since intl.dll is used by GTK+ on Windows,
114 not libintl.dll (according to
115 http://www.gimp.org/~tml/gimp/win32/downloads.html).
117 2006-01-03 Jonathan Pryor <jonpryor@vt.edu>
119 * UnixMarshal.cs (CreateExceptionForError): Don't map ENOMEM to
120 System.OutOfMemoryException. OOME should be reserved for use by the CLR.
121 Return a UnixIOException instead (default behavior).
123 2006-01-02 Jonathan Pryor <jonpryor@vt.edu>
125 * StdioFileStream.cs: Shut up FxCop - add a GC.KeepAlive to
127 * UnixClient.cs, UnixListener.cs: Use System.MarshalByRefObject as the base
128 class. These types implement IDisposable and have a finalizer, so if an
129 instance of these types were sent to another AppDomain they'd previously
130 marshal by copy, which could lead to a double release of an unmanaged
131 resource -- potential badness. Using MarshalByRefObject fixes this.
133 2006-01-02 Jonathan Pryor <jonpryor@vt.edu>
135 * UnixMarshal.cs: s/EACCESS/EACCES/g. I can't read.
137 2006-01-02 Jonathan Pryor <jonpryor@vt.edu>
139 * StdioFileStream.cs, UnixDirectoryInfo.cs, UnixEnvironment.cs,
140 UnixFileInfo.cs, UnixFileSystemInfo.cs, UnixGroupInfo.cs,
141 UnixIOException.cs, UnixMarshal.cs, UnixProcess.cs, UnixStream.cs,
142 UnixSymbolicLinkInfo.cs, UnixUserInfo.cs: Remove Obsolete API.
143 * CdeclFunction.cs, IncludeAttribute.cs, Stdlib.cs, Syscall.cs,
144 UnixConvert.cs, UnixDirectory.cs, UnixFile.cs, UnixGroup.cs,
146 * UnixPath.cs: Remove InvalidPathChars; use GetInvalidPathChars() instead.
147 * FileTypes.cs: Remove Obsolete API
149 2006-01-02 Jonathan Pryor <jonpryor@vt.edu>
151 * FileAccessPermissions.cs: Remove UserMask, GroupMask, OtherMask values.
152 * FileSpecialAttributes.cs: Remove AllAttributes member; it shouldn't be
153 public. Use UnixFileSystemInfo.AllSpecialAttributes instead.
154 * StdioFileStream.cs: Open files in binary mode, not text;
155 Fix exception message for StdioFileStream(path, mode) mode param check.
156 * UnixDirectoryInfo.cs: Add Create(FileAccessPermissions) overload; change
157 GetFileSystemEntries() to include the directory name that the files came
158 from (otherwise they're in the current working direcetory, which they
160 * UnixFileInfo.cs: Add Create(FileAccessPermissions) overload; Add better
161 argument checking to several Open() overloads.
162 * UnixFileSystemInfo.cs: Add AllSpecialAttributes, AllFileTypes members;
163 FullPath member should invalidate instance if path changes; Change return
164 type of GetFileStatus for maintenance/better documentation; ToStat()
165 should ensure that the instance is valid first.
166 * UnixMarshal.cs: Add additional Errno values to CreateExceptionForError();
167 reformat CreateExceptionForError for maintenance.
168 * UnixPath.cs: Obsolete InvalidPathChars -- FxCop never liked it, and now I
169 know why it didn't like it (thank you Framework Design Guidelines!).
170 * UnixStream.cs: Use UnixFileSystemInfo.AllSpecialAttributes, not
171 FileSpecialAttributes.AllAttributes (which was removed).
172 * UnixSymbolicLinkInfo.cs: Change return type of GetFileStatus().
174 2005-12-28 Jonathan Pryor <jonpryor@vt.edu>
176 * FileHandleOperations.cs: Check for null references.
178 2005-12-28 Jonathan Pryor <jonpryor@vt.edu>
180 * UnixMarshal.cs: Errno.EBADF should also trigger a ArgumentException.
182 2005-12-27 Jonathan Pryor <jonpryor@vt.edu>
184 * FileHandleOperations.cs, FileTypes.cs, Stdlib.cs, Syscall.cs,
185 UnixConvert.cs, UnixDirectory.cs, UnixDirectoryInfo.cs, UnixDriveInfo.cs,
186 UnixEnvironment.cs, UnixFile.cs, UnixFileInfo.cs, UnixFileSystemInfo.cs,
187 UnixGroup.cs, UnixGroupInfo.cs, UnixIOException.cs, UnixMarshal.cs,
188 UnixPath.cs, UnixPipes.cs, UnixProcess.cs, UnixStream.cs,
189 UnixSymbolicLinkInfo.cs, UnixUser.cs, UnixUserInfo.cs: Mark to-be-removed
190 API with [Obsolete(IsError=true)] (permits compiler assistance for finding
191 obsolete code); Migrate to the Mono.Unix.Native API.
192 * StdioFileStream.cs: Add non-Obsolete overloads for SaveFilePosition &
193 RestoreFilePosition (oops). Migrate to Mono.Unix.Native API.
195 2005-12-07 Jonathan Pryor <jonpryor@vt.edu>
197 * UnixMarshal.cs: Add PtrToStringUnix() -- specialized PtrToString method
198 which is significantly faster than PtrToString(p, UnixEncoding.Instance).
199 Use System.String..ctor(sbyte*, int, int, Encoding) to avoid the byte[]
200 intermediate copy -- much faster. Fix PtrToString() so that it will
201 accept an IntPtr containing 0 characters, and don't duplicate strings
204 2005-11-18 Jonathan Pryor <jonpryor@vt.edu>
206 * Catalog.cs, UnixDirectory.cs, UnixDirectoryInfo.cs, UnixDriveInfo.cs,
207 UnixEnvironment.cs, UnixFile.cs, UnixFileInfo.cs, UnixFileSystemInfo.cs,
208 UnixGroup.cs, UnixGroupInfo.cs, UnixProcess.cs, UnixSymbolicLinkInfo.cs,
209 UnixUser.cs, UnixUserInfo.cs: Change types of [Obsolete] members for
210 consistency and CLS compliance; Mono.Unix.Native type migration.
211 * FileTypes.cs: s/Special/Device/g (CharacterSpecial ==> CharacterDevice).
212 The *Special was a BSD convention, while UnixFileSystemInfo uses *Device
213 in property names, and these should be consistent. Changing the enum is
214 simpler than changing the UnixFileSystemInfo properties.
215 * UnixIOException.cs: s/error/errno/g (FxCop suggestion); change type of
217 * UnixMarshal.cs: s/error/errno/g (FxCop suggestion); Mono.Unix.Native
220 2005-11-08 Jonathan Pryor <jonpryor@vt.edu>
222 * Catalog.cs: Exception safety improvements (don't let memory leak!); check
223 for errors with bindtextdomain(3) et. al.
225 2005-11-08 Jonathan Pryor <jonpryor@vt.edu>
227 * UnixPipes.cs: Provide Equals, GetHashCode, and operator==/operator!= to
228 conform with FxCop guidelines for structures.
230 2005-11-03 Jonathan Pryor <jonpryor@vt.edu>
232 * FileTypes.cs, UnixFileSystemInfo.cs: s/FIFO/Fifo/ to follow .NET
233 naming conventions (as reported by FxCop).
235 2005-11-01 Jonathan Pryor <jonpryor@vt.edu>
237 * UnixDirectoryInfo.cs, UnixDriveInfo.cs, UnixEnvironment.cs,
238 UnixFileSystemInfo.cs, UnixGroupInfo.cs, UnixProcess.cs, UnixUserInfoc.cs:
239 Obsolete statements now specify in what way the return type will change.
240 * IncludeAttribute.cs: Obsoleted. It's an error to use it now.
242 2005-11-01 Jonathan Pryor <jonpryor@vt.edu>
244 * FileAccessPattern.cs: Change enumeration names to match Robert Love's more
245 sensible names from his FileAdvise class used in Beagle
246 (UseSoon --> PreLoad, WillNotUse --> FlushCache).
247 * FileHandleOperations.cs: Added; contains AdviseFileAccessPattern()
248 (moved from UnixFile.cs).
249 * UnixDirectory.cs: Obsolete the class; use UnixDirectoryInfo instead.
250 * UnixDirectoryInfo.cs: Add GetCurrentDirectory(), SetCurrentDirectory().
251 * UnixFile.cs: Obsolete the class; use UnixFileInfo, FileHandleOperations,
252 or UnixPipes instead.
253 * UnixFileSystemInfo.cs: Add ToStat() method.
254 * UnixGroup.cs: Obsolete the class; use UnixGroupInfo instead.
255 * UnixGroupInfo.cs: Obsolete & Replace constructor, add GetMemberNames(),
257 * UnixPipes.cs: Added (type moved from UnixFile.cs).
258 * UnixStream.cs: AdviseFileAccessPattern() uses FileHandleOperations now.
259 * UnixSymbolicLinkInfo.cs: Implement TryReadLink() to avoid constant buffer
260 re-sizing. Stevens states that the file size of the symlink is the number
261 of bytes needed to hold the symlink, so this should be faster.
262 * UnixUser.cs: Obsolete the class; use UnixUserInfo instead.
263 * UnixUserInfo.cs: Obsolete & Replace constructor; add useful static members
264 from UnixUser such as GetLoginName(), GetLocalUsers(), etc.
266 2005-10-27 Jonathan Pryor <jonpryor@vt.edu>
268 * UnixEnvironment.cs: Add RealUser, RealGroup, EffectiveUser, EffectiveGroup
269 properties; [Obsolete] necessary methods and provide replacements.
270 * UnixStream.cs: Add OwnerUser(Id), OwnerGroup(Id) properties;
271 improve Stat handling.
273 2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
275 * UnixEncoding.cs: Change EscapeByte to 0x0000, as suggested by Michal
277 * UnixPath.cs: Remove '\0' from InvalidPathChars, since U+0000 is now used
278 as the path escape character for marshaling purposes.
280 2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
282 * UnixMarshal.cs: Obsolete heap-related methods to have a Heap suffix
283 (AllocHeap, FreeHeap, etc.), and change StringToAlloc() to be
284 StringToHeap(). This creates a stronger name association between related
287 2005-10-26 Jonathan Pryor <jonpryor@vt.edu>
289 * UnixIOException.cs: Add (string) and (string, Exception) constructors to
290 silence FxCop; re-work logic so we lookup the error string at construction
291 time and use this as the message for the base class.
293 2005-10-25 Jonathan Pryor <jonpryor@vt.edu>
295 * Stdlib.cs, Syscall.cs: Filenames need to be marshaled through the
296 FileNameMarshaler, which will encode/decode filenames with UnixEncoding.
297 * UnixEncoding.cs: Added (copied from
298 ../../corlib/System.Text/UTF8Encoding.cs); a hack to permit handling of
299 arbitrarily encoded filenames. It attempts to decode a byte[] array as
300 UTF-8, and if the decode fails it prefixes each byte with
301 UnixEncoding.EscapeByte (\uFFFF).
302 * UnixMarshal.cs: Use UnixEncoding as the default encoding, and special-case
303 UnixEncoding to use Stdlib.strlen() for native string lengths.
305 2005-10-21 Jonathan Pryor <jonpryor@vt.edu>
307 * FileAccessPattern.cs: Added
308 * UnixFile.cs, UnixStream.cs: Deprecate all the Advise* methods (lots!)
309 and replace with 6 methods which take a FileAccessPattern enum.
311 2005-10-19 Jonathan Pryor <jonpryor@vt.edu>
313 * FileAccessPermissions.cs, FileSpecialAttributes.cs, FileTypes.cs: Added.
314 * UnixFileSystemInfo.cs, UnixStream.cs: Replace the old Permission property
315 with 4 new properties: Protection (for the Native.FilePermissions value),
316 FileAccessPermissions (for rwxrwxrwx info), FileSpecialAttributes (for
317 set-user-id, set-group-id, sticky), and FileTypes (directory, socket...).
318 The new enumeration types have nicer CLS-compliant names.
320 2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
322 * UnixMarshal.cs: Fix GetIntXxBufferLength to require fewer
323 Marshal.ReadIntXx() calls; Fix PtrToString so that
324 ``"foo" == PtrToString (StringToAlloc("foo",enc),enc)'' is true for
327 2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
329 * UnixFileSystemInfo.cs: Add OwnerUserId and OwnerGroupId properties.
331 2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
333 * UnixDriveInfo.cs, UnixEnvironment.cs, UnixFile.cs, UnixFileSystemInfo.cs,
334 UnixGroup.cs, UnixStream.cs, UnixUser.cs: Don't use SetLastError(), since
335 it's use is (1) incorrect, and (2) will be going away with the move to
336 Mono.Unix.Native.Syscall. Instead use the Native.Syscall.* APIs which
339 2005-10-17 Jonathan Pryor <jonpryor@vt.edu>
341 * UnixGroup.cs, UnixGroupInfo.cs, UnixFile.cs, UnixFileSystemInfo.cs,
342 UnixStream.cs, UnixSymbolicLinkInfo.cs, UnixUser.cs, UnixUserInfo.cs:
343 Start migrating uid/gid to long (from uint) for CLS compliance.
344 (Full migration must wait 'til after the next release as this would
345 require changes to existing members.)
346 * UnixEnvironment.cs: Above, and add RealUserId/RealGroupId and
347 EffectiveUserId/EffectiveGroupId.
349 2005-10-14 Jonathan Pryor <jonpryor@vt.edu>
351 * Catalog.cs: Create a constructor and mark it [Obsolete]. It will be made
352 private after the next release.
353 * UnixFile.cs, UnixStream.cs: Deal with Mono.Unix.Native type name changes.
354 * UnixFileSystemInfo.cs: [Obsolete] more members; Deal with Mono.Unix.Native
356 * Syscall.cs: Create maps for PathConf, SysConf, ConfStr again; fpathconf(),
357 pathconf(), and sysconf() should call Native.Syscall since the
358 MonoPosixHelper.so helpers have changed.
360 2005-10-13 Jonathan Pryor <jonpryor@vt.edu>
362 * UnixMarshal.cs: More/better StringToAlloc/PtrToString which take a
363 System.Text.Encoding instance for proper string marshaling.
364 - PtrToString(string,Encoding) is particularly tricky due to variable
366 - Fix StringToAlloc so that it works properly with UTF-16 encodings
367 (we need a terminating null 16-bit word, not a null byte).
368 - StringToAlloc overload for doing substrings.
370 2005-10-12 Jonathan Pryor <jonpryor@vt.edu>
372 * UnixStream.cs: Check for EROFS and EINVAL in Flush(). Snorp was getting
373 an exception when he created a UnixStream around a socket, because
374 sockets can't be flushed. It should be acceptable to create a UnixStream
375 around a socket, so don't throw an exception in this scenario.
377 2005-10-06 Jonathan Pryor <jonpryor@vt.edu>
379 * UnixDirectory.cs, UnixDirectoryInfo.cs UnixFile.cs, UnixFileSystemInfo.cs,
380 UnixGroupInfo.cs, UnixIOException.cs, UnixStream.cs, UnixUserInfo.cs:
381 API Review: Obsolete appropriate members and add appropriate overloads for
382 pending move to Mono.Unix.Native types.
383 * UnixMarshal.cs: API Review; add StringToAlloc().
385 2005-09-26 Jonathan Pryor <jonpryor@vt.edu>
387 * UnixFileSystemInfo.cs: Exists shouldn't use access(2), as (1) Exists isn't
388 virtual, and (2) access(2) errors if you try to access(2) a symlink which
389 points nowhere. Use (l)stat(2) instead, via GetFileStatus(), as this lets
390 UnixSymbolicLinkInfo behave properly.
391 * UnixSymbolicLinkInfo.cs: The Contents property should return null if the
392 symlink target doesn't exist.
394 2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
396 * Syscall.cs: Add [Map] to AccessMode and MmapProt, as the Mono.Unix.Native
397 replacements go by different names (AccessModes, MmapProts), but we need
398 to continue generating the mapping code for these types (backward compat).
400 2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
402 * CdeclFunction.cs: [Obsolete]d by Mono.Unix.Native.CdeclFunction.
403 * make-map.cs: Remove.
404 * Stdlib.cs: [Obsolete] the types; use the Mono.Unix.Native.* types instead.
405 * StdioFileStream.cs: Add GC.KeepAlive statements to prevent premature GC's
407 * Syscall.cs: Remove [Map] attribute from all types; [CLSCompliant(false)]
408 work; [Obsolete] all types and suggest using the Mono.Unix.Native.*
409 replacements; remove [IncludeAttribute] -- superseded by
410 Mono.Unix.Native/Syscall.cs's [HeaderAttribte] for CLS compliance.
411 * UnixConvert.cs: [Obsolete]d by Mono.Unix.Native.NativeConvert.
412 * UnixDirectory.cs, UnixDriveInfo.cs, UnixEnvironment.cs,
413 UnixGroup.cs, UnixGroupInfo.cs,
414 UnixSymbolicLinkInfo.cs, UnixUser.cs, UnixUserInfo.cs:
415 Add [CLSCompliant(false)] as necessary.
416 * UnixFile.cs, UnixDirectory.cs, UnixFileInfo.cs, UnixFileSystemInfo.cs:
417 [CLSCompliant(false)], addition of method overloads for [Obsolete]d types,
418 warn about changing return types.
419 * UnixProcess.cs, UnixStream.cs: Add [CLSCompliant(false)] as necessary,
420 and warn about changing property types.
422 2005-09-02 Jonathan Pryor <jonpryor@vt.edu>
424 * Stdlib.cs: Cache delegates passed to Stdlib.signal() so that they survive
425 garbage collections. Delegates can be removed by calling Stdlib.signal()
426 again with one of the Stdlib.SIG_* values (or the original return value of
428 * UnixUser.cs, UnixGroup.cs, UnixEnvironment.cs: Clarify "Id" (int) vs.
429 "Name" (string) differences by always using a Id or Name suffix.
431 2005-07-01 Daniel Drake <dsd@gentoo.org>
433 * Syscall.cs: The entire extended attribute API now goes through MPH, to
434 be shared between both Linux's and FreeBSD's similar EA implementations.
436 2005-06-29 Miguel de Icaza <miguel@ximian.com>
438 * StdioFileStream.cs: Only flush if we do not own the handle, as
439 fclose does a flush internally.
441 2005-06-29 Jonathan Pryor <jonpryor@vt.edu>
443 * UnixEnvironment: Add User, Login properties.
444 * Syscall.cs: Add locking around cuserid, crypt, encrypt, getlogin.
446 2005-06-29 Jonathan Pryor <jonpryor@vt.edu>
448 * Syscall.cs: SyslogFacility shouldn't be [Flags] either. Sigh.
449 Thanks to Vorobiev Maksim for pointing this out.
450 * make-map.cs: Don't generate conversion code for [Obsolete] enum members.
451 This assumes that (1) the enum member's value is invalid, or (2) a
452 corrected member with the same value exists. This fix allows us to
453 obsolete invalid members (instead of removing them) without screwing up
454 the generated code -- consider LOG_USRE, the mis-spelling of LOG_USER.
455 Since SyslogFacility was (incorrectly) a [Flags] enum, since both LOG_USER
456 and LOG_USRE had the same value, we'd get a EINVAL error trying to convert
457 a valid value, since LOG_USRE would exist, would be checked for, and the
458 check would succeed (since it had the same value as LOG_USER).
459 This change allows us to be slightly more permissive with versioning.
461 2005-06-28 Jonathan Pryor <jonpryor@vt.edu>
463 * Syscall.cs: correct value of LOG_CRON (it shouldn't be identical to
464 LOG_UUCP). SyslogLevel shouldn't have [Flags]. Move LOG_USER to be
465 before LOG_USRE so that the generated map code doesn't return EINVAL when
466 LOG_USER is specified.
468 2005-06-15 Jonathan Pryor <jonpryor@vt.edu>
470 * Syscall.cs: s/LOG_USRE/LOG_USER/. Fixes #75274.
471 Thanks to Martin Honermeyer.
473 2005-06-09 Jonathan Pryor <jonpryor@vt.edu>
475 * make-map.cs: Look for [Obsolete] members, and mark the UnixConvert
476 conversion functions with the same [Obsolete] message. This should permit
477 more graceful deprecation of enumerations in the future (rather than just
480 2005-06-08 Jonathan Pryor <jonpryor@vt.edu>
482 * Syscall.cs: Add execvp(2). (This should have been added with the other
483 exec(2) additions...).
485 2005-06-08 Jonathan Pryor <jonpryor@vt.edu>
487 * Syscall.cs: Update comment with correct exception type.
488 * UnixConvert.cs: Rename ToFilePermissions(string) to
489 FromOctalPermissionString; Add ToOctalPermissionString,
490 FromUnixPermissionString, ToUnixPermissionString.
491 * UnixMarshal.cs: Remove ErrorMarshal.HaveStrerror_r and
492 UnixMarshal.IsErrorDescriptionThreadSafe. strerror(3) is now thread-safe
493 (from managed code, at least). Update comment.
495 2005-06-07 Jonathan Pryor <jonpryor@vt.edu>
497 * UnixFileSystemInfo.cs: Don't use lstat(2), use stat(2). This fits with
498 expectations better -- if you create a UnixFileInfo() on a symlink, you
499 want to get the target's information, not the symlink's info. Add
500 GetFileStatus so UnixSymbolicLinkInfo can override this behavior.
501 * UnixSymbolicLinkInfo.cs: Implement GetFileStatus() (which calls lstat(2)).
503 2005-06-07 Jonathan Pryor <jonpryor@vt.edu>
505 * Syscall.cs: Document naming conventions.
507 2005-06-05 Jonathan Pryor <jonpryor@vt.edu>
509 * make-map.cs: Change automatic "ifdef HAVE_<header>" support prefix to
510 "ah:" from ">". I hadn't known about ">", and "ah:" is (somewhat) more
512 * Syscall.cs: Change IncludeAttribute to put all headers/defines one/line.
513 It's easier to read this way. Add "ah:sys/xattr.h" to the headers.
515 2005-06-03 Jonathan Pryor <jonpryor@vt.edu>
517 * Stdlib.cs: Add sanity checking to snprintf(3) to avoid buffer overflows.
519 2005-06-02 Jonathan Pryor <jonpryor@vt.edu>
521 * StdioFileStream.cs: Remove FilePosition property & replace with
522 SaveFilePosition/RestoreFilePosition methods. Since FilePosition has a
523 finalizer, it's not right to have implicitly created instances.
525 - FilePosition: GC.SuppressFinalize() should be last in Dispose()
526 (following .NET guidelines).
527 - Syscall: Add locking around functions most likely to be thread unsafe.
528 This should provide some level of thread-safety to managed code.
529 * Syscall.cs: Add locking around functions most likely to be thread unsafe;
530 add mkstemp(3) export.
531 * UnixEnvironment.cs: GetUserShells should be atomic (from managed code).
532 * UnixGroup.cs: GetLocalGroups should be atomic (from managed code).
533 * UnixGroupInfo.cs: Add ToGroup() method to retrieve underlying Group info.
534 * UnixUser.cs: GetLocalUsers should be atomic (from managed code).
535 * UnixUserInfo.cs: Add ToPasswd () method to retrieve underlying Passwd info.
536 * UnixDriveInfo.cs: GetDrives should be atomic (from managed code).
538 2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
540 * Stdlib.cs: Add comment for atexit(3) so I don't try to add it.
541 * Syscall.cs: Add fcntl(2) overload which takes DirectoryNotifyFlags (so
542 that *something* accepts a DirectoryNotifyFlags); Fix IncludeAttribute
543 header files (">sys/poll.h" doesn't exist);
544 Add additional <sys/mman.h> functions mmap, munmap, msync, mlock, munlock,
545 mlockall, munlockall, mremap, mincore, remap_file_pages.
546 * UnixConvert.cs: Add conversion functions for MmapFlags, MmapProt, MsyncFlags,
547 MlockallFlags, MremapFlags.
549 2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
551 * Syscall.cs, UnixConvert.cs: Rename LockFlags to LockfCommand. This is a more
552 consistent naming, and it's more correct (they weren't flags in the first place).
554 2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
556 * Stdlib.cs: Correct Mono_Posix_Stdlib_InvokeSignalHandler export.
558 2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
560 * make-map.cs: Process the Mono.Posix namespace as well as Mono.Unix; add
561 mapping for Boolean => int for native type conversion.
563 2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
565 * make-map.cs: Add a MphPrototypeFileGenerator, which looks for DllImport
566 methods across all types and generates a C header file declaration for
567 those methods. This allows us to ensure consistency between
568 Mono.Posix.dll and MonoPosixHelper.so. Rename WrapperFileGenerator to
569 ConvertFileGenerator (it generates UnixConvert).
570 * MapAttribute.cs, IncludeAttribute.cs: Make these internal -- there's no
571 reason for external users to even know these exist.
572 * StdioFileStream.cs: Move GC.SuppressFinalize call to be last Dispose()
573 call. This follows current design guidelines, and allows an exception to
574 be thrown from Dispose() without un-registering the finalizer.
575 * Syscall.cs: Change method declarations to match MonoPosixHelper, etc.
576 - posix_fallocate(P) takes a size_t
577 - mis-spelled settimeofday(2), sethostname(2)
578 - exec(2) can be public; it's safe to call
579 - change lseek(2) so int's are passed to MonoPosixHelper.so, not shorts
580 - We can't allow two incompatible prototypes to exist (since C allows
581 only one prototype, and we're cross-checking prototypes now). Change
582 utime(2) so only one prototype is needed.
583 * UnixMarshal.cs: ErrorMarshal.ErrorTranslator and ErrorMarshal.Translate
584 shouldn't be public; make them internal.
585 * UnixStream.cs: Remove `unsafe` code block when a "safe" alternative works;
586 Close() should also call GC.SuppressFinalize.
588 2005-05-12 Jonathan Pryor <jonpryor@vt.edu>
590 * Syscall.cs: The Statvfs structure should contain a MountFlags enumeration,
591 not a ulong (we can "safely" do this since POSIX defines some values for
592 f_flag, so we should be kind and expose them).
593 * UnixConvert.cs: Add MountFlags conversion functions.
595 2005-05-02 Joe Shaw <joeshaw@novell.com>
597 * UnixListener.cs (Init): Remove the call to Cleanup() and the
598 method itself, which was not supposed to be here. We try to
599 connect to the socket if it exists instead of deleting it
602 2005-04-30 Ben Maurer <bmaurer@ximian.com>
604 * Stdlib.cs: Comment out usage of `UnmanagedFunctionPointer'. It
605 isn't supported in the runtime -- it throws an assert -- so better
606 not to use it at all for now.
608 2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
610 * UnixConvert.cs: Fix time_t -> DateTime conversions. time_t should be
611 assumed to be in the local time zone, so don't mess with UTC shifts.
612 This allows Mono.Unix to produce sane output (e.g. identical to ls(1) or
613 stat(1), instead of several hours different).
615 2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
617 * Stdlib.cs: Make FilePosition slightly more useful by providing a
618 ToString() override which dumps the fpos_t structure contents into a
619 hex string. Add Equals(), GetHashCode(), operator==, and operator!=
620 so FilePosition behaves like a value type.
622 2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
625 * UnixListener.cs: TcpListener/TcpClient clones from Jow Shaw.
627 2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
629 * Mono.Posix.dll.sources: added UnixListener and UnixClient from Joe
632 2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
634 * UnixEndPoint.cs: fix from Mono.Posix.
636 2005-04-20 Jonathan Pryor <jonpryor@vt.edu>
638 * Syscall.cs: Make all fork(2) and exec(2) functions `private`. It
639 currently isn't safe to call these under *any* circumstances. See also
640 68141, and this pertinent quote from Butenhof's
641 "Programming with POSIX Threads", p197, s6.1:
643 "When a threaded process calls fork to create a child process,
644 Pthreads specifies that only the thread calling fork exists in the
645 child. ... Pthreads does not 'terminate' the other threads in a forked
646 process...They simply cease to exist. ... This is not a problem if
647 the child process is about to call exec to run a new program, but if
648 you use fork to clone a threaded program, beware that you may lose
649 access to memory, especially heap memory stored only as
650 thread-specific data values."
652 Since P/Invoke currently requires using thread local storage, once you
653 fork(2) you won't be able to invoke exec(2) from managed code (since that
654 would require a P/Invoke transition to call exec(2), which would require
655 TLS, which doesn't exist in the new process).
657 This can only be fixed by removing the TLS dependency on P/Invoke, which
658 isn't a priority (and may not be possible).
660 The workaround is to create a C function which does your fork(2)/exec(2)
661 (and any other functions such as daemon(3)) on your behalf, and P/Invoke
662 to call this C function.
664 2005-04-18 Jonathan Pryor <jonpryor@vt.edu>
666 * Syscall.cs: Update comment specifying which functions belong in Syscall.
667 * UnixConvert.cs: Add XattrFlags conversion functions.
668 * UnixMarshal.cs: Remove warning about self-assignment.
670 2005-04-16 Daniel Drake <dsd@gentoo.org>
672 * Syscall.cs: Add bindings for extended attribute manipulation
674 2005-04-05 Miguel de Icaza <miguel@novell.com>
676 * Syscall.cs: Set entry point for sys_syslog to be syslog.
677 Include the syslog.h header in the generated map so that we
678 actually do the mapping.
680 2005-03-28 Jonathan Pryor <jonpryor@vt.edu>
682 * UnixConvert.cs: Add ToFopenMode() methods, which convert FileMode/FileAccess
683 into an fopen(3) mode string. ToOpenFlags() should throw
684 ArgumentOutOfRangeException for argument violations.
685 * StdioFileStream.cs: Add constructor overloads accepting filename and
686 FileMode/FileAccess overloads; Compatibility fixes with regression tests;
687 remove IDisposable implementation since System.IO.Stream already
688 implements it (which calls Close() for us).
690 2005-03-17 Jonathan Pryor <jonpryor@vt.edu>
692 * Stdlib.cs: Move Errno-related functionality into Stdlib from Syscall,
693 since (1) errno is part of C89, and (2) StdioFileStream will need it, and
694 StdioFileStream shouldn't use Syscall. Add [UnmanagedFunctionPointer]
695 attribute to SignalHandler for .NET 2.0 (since signal handlers use C
696 calling convention, not Stdcall).
697 * Syscall.cs: Move Errno-related functionality into Stdlib.
698 * UnixMarshal.cs: Use ERANGE not EPERM when figuring out appropriate
699 translator, since ERANGE is part of C99 and EPERM isn't. Use Stdlib
700 instead of Syscall for Errno-related functionality.
702 2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
704 * UnixFile.cs: Cope with changes in UnixStream.
705 * UnixStream.cs: Change FileDescriptor property to Handle for consistency.
706 * StdioFileStream.cs: Change FileStream property to Handle for consistency.
708 2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
710 * Syscall.cs: Remove public sys_ methods. Some were public by mistake, and
711 others so that users could manually marshal strings if desired. Manually
712 marshaling strings shouldn't be necessary, though, so remove them too.
714 2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
716 * StdioFileStream.cs: Fix Length property to actually return the size of the
717 file, not the # of bytes from the current position to EOF. Oops.
719 2005-01-31 Jonathan Pryor <jonpryor@vt.edu>
721 * Stdlib.cs: Import "msvcrt", not "libc". These members are part of the
722 ANSI C standard, and thus should be present on Windows via msvcrt.dll
723 (except snprintf, until they catch up to C99). Change the calling
724 convention of all functions to Cdecl, as the .NET default is Stdcall.
725 Changing the calling convention isn't needed in Syscall, as it can only be
726 run on Unix platforms anyway, where the default is Cdecl.
727 * Syscall.cs: Add LIBC member that points to the real "libc"; we can't use
728 the imported definition from Stdlib as "msvcrt" doesn't exist on Unix.
730 2005-01-29 Jonathan Pryor <jonpryor@vt.edu>
732 * Stdlib.cs: sys_* functions shouldn't be public.
734 2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
736 * make-map.cs: libMonoPosixHelper exports Mono_Posix prefixes, not Mono_Unix
737 prefixes, so change the type and namespace to generate compatible code.
738 * Syscall.cs: Change OpenFlags values so they match the Linux values.
740 2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
742 * Stdlib.cs: Use Stdlib.LIBC instead of "libc".
743 * StdioFileStream.cs: Add FilePosition property (not that I expect anyone to
744 use it) and Rewind() method.
746 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
748 * StdioFileStream.cs: Added; System.IO.Stream wrapper for C FILE struct.
749 * Stdlib.cs: Correct visibility of ftell().
751 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
753 * Stdlib.cs: Re-order declarations to match the order used in the
754 C99 Standard Annex B; Complete <stdio.h> exports (except for those not
755 worth supporting); Add non-"unsafe" versions of fread(3), fwrite(3) and
756 add some rudimentary buffer-overflow checking; Add <stdlib.h> exports such
757 as getenv(3), exit(3), rand(3), EXIT_SUCCESS, RAND_MAX, etc.
759 2005-01-03 Jonathan Pryor <jonpryor@vt.edu>
761 * Syscall.cs: Update endfsent() and setfsent() declarations, as these must
762 now be implemented in MonoPosixHelper.
764 2005-01-01 Jonathan Pryor <jonpryor@vt.edu>
766 * Stdlib.cs, Syscall.cs: Minimize duplicate declarations of
767 "MonoPosixHelper" for use in DllImport statements.
769 2005-01-01 Jonathan Pryor <jonpryor@vt.edu>
771 * Stdlib.cs: Don't use C# v2 features; fixes build under CSC.EXE.
773 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
775 * Stdlib.cs: On miguel's suggestion, rename Sighandler_t to SignalHandler.
777 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
779 * Stdlib.cs: Implement all C89 <stdio.h> functions except for the scanf(3)
780 family. These are too dangerous to expose.
782 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
784 * CdeclFunctions.cs: Remove warning about unused variable.
785 * Stdlib.cs: Make signal(2) sane and (hopefully) complete.
786 * Syscall.cs: Fix cuserid Obsolete message to reference correct class name.
787 * UnixProcess.cs: Remove warning about unused variable.
788 * UnixMarshal.cs: Remove warnings about unused variables.
790 2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
792 * UnixPath.cs: Add ReadSymbolicLink(), which takes an intelligent approach
793 to reading symlinks (since their contents may be any size, we grow the
794 buffer dynamically to fit them all, instead of assuming a maximum size).
795 * UnixSymbolicLinkInfo.cs: Remove MaxContentsSize.
797 2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
799 * UnixPath.cs: Add check for when symlink points to a full path name.
801 2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
803 * Syscall.cs: Fix Object.Equals implementations.
804 * UnixPath.cs: New & improved, with Testing! GetRealPath() is changed so
805 that it doesn't walk the entire path looking for symlinks, it just reads
806 the leaf. GetCompletRealPath() walks the entire path resolving symlinks.
807 GetCanonicalPath() added, which "cleans up" a path (removing extraneous
808 "." and ".." entries).
809 * UnixSymbolicLinkInfo.cs: Rename ContentsLength -> MaxContentsSize.
811 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
813 * UnixFileSystemInfo.cs: Add a link(2) wrapper, CreateLink(). Strictly
814 speaking it's only "safe" to do this on files, but an exception will be
815 returned if the user tries to hard link directories (because of EPERM),
816 unless the user is root, in which case it should be allowed anyway...
818 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
820 * CdeclFunctions.cs: Correct the comments for AMD64
821 * UnixDirectoryInfo.cs: override Name; add Parent & Root properties;
822 Correct Path usage (s/Path/FullPath/g).
823 * UnixDriveInfo.cs: Added. Based on .NET 2.0 System.IO.DriveInfo docs,
824 provides statvfs(2) and getfsfile(3) information about a mounted volume.
825 GetDrives() wraps getfsent(3), thus parsing /etc/fstab.
826 * UnixFile.cs: Use UnixConver.ToOpenFlags, deleting the local version.
827 * UnixFileInfo.cs: Use UnixConver.ToOpenFlags, deleting the local version;
828 override Name; add DirectoryName and Directory properties;
829 * UnixFileSystemInfo.cs: Make more .NET-like, using FullPath and
830 OriginalPath protected members, abstract Name property; Add
831 CreateSymbolicLink; Remove ReadLink (it's now
832 UnixSymbolicLinkInfo.Contents); Use lstat(2) for Create(string), so we
833 properly detect Symbolic Links.
834 * UnixPath.cs: Added; Path manipulation utility functions.
835 * UnixSymbolicLinkInfo.cs:
837 - override new abstract member Name;
838 - rename ReadLink to ContentsPath (and Contents) properties
839 (why "Contents"? Because readlink(2) says "readlink places the
840 contents of the symbolic link in the buffer...")
841 - Add CreateSymbolicLinkTo(), which creates a symlink to the specified
844 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
846 * Stdlib.cs: Add syslog(3) to XPrintfFunctions; Add additional printf(3)
847 and fprintf(3) overload which properly escape the format string
848 (by using "%s" as the format for the user-supplied message).
849 * Syscall.cs: Add #regions for enummerations, structures, classes; Wrap
850 syslog(3) and related enumerations; fix operator!= on Dirent, Group;
851 wrap {f}statvfs(2); wrap <fstab.h> entries (getfsent(3), etc.).
852 * UnixConvert.cs: Add Syslog-releated enumeration translation functions;
853 Move ToOpenFlags here from UnixFile and UnixFileInfo.
854 * UnixMarshal.cs: Missing P/Invoke methods throw
855 EntryPointNotFoundException, not MissingMethodException; add
856 EscapeFormatString, which escapes printf-style format strings so that they
857 can be safely handed off to native code (avoiding stack overflow, etc);
858 make CreateExceptionForError internal.
860 2004-12-15 Jonathan Pryor <jonpryor@vt.edu>
862 * Stdlib.cs: Add more <stdio.h> wrappers, such as fread(3) and fwrite(3).
863 These will be useful in implementing System.IO.Stream subclass for
864 reading/writing to a FILE*. Fix a typo in the realloc(3) DllImport.
865 * Syscall.cs: Fix the sys_kill and sys_crypt declarations.
866 * CdeclFunction.cs: Document calling convention problems on AMD64.
868 2004-11-18 Jonathan Pryor <jonpryor@vt.edu>
870 * CdeclFunction.cs: Added.
871 * Stdlib.cs: Re-add printf(3) and fprintf(3). They may not be portable (the
872 jury is still out on that; the AMD64 SysV ABI looks like it should be
873 portable to AMD64 to my eyes), but they will work on *some* platforms, so
874 we should permit it. The new implementation takes a page out of
875 cocoa-sharp: use System.Reflection.Emit to generate a P/Invoke method at
876 runtime to invoke printf(3) or fprintf(3). This way, we can export a
877 params signature to C# code, permitting natural usage such as:
878 Stdlib.printf ("Hello, %s world! (%i)\n", "silly", 42);
879 * Syscall.cs: Mark which headers are complete, which functions still need
880 wrapping (for headers which have anything done to them), add #region
881 blocks for each header;
882 export mkfifo(3), fexecve(), getppid(2), setlogin(); fix sleep(3) export.
883 * UnixEnvironment.cs: Export a friendly getppid(2) wrapper.
884 GetParentProcessId isn't in UnixProcess as there's no way (that I know of)
885 to get the Parent's Parent, so it can't be a class member, and exposing it
886 as a static member of UnixProcess doesn't make sense to me, as it isn't
887 general. Added GetUserShells().
888 * UnixProcess.cs: Change constructor to internal, so it can be used from
891 2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
893 * Stdlib.cs: Remove printf(3) and fprintf(3). These are vararg/CDECL
894 functions, and it's not portable to call them in this manner.
895 (It's not portable because some architectures, such as AMD64, use a
896 "cookie" as part of the vararg calling sequence to help reduce buffer
897 overflow exploits. Trying to call vararg functions as if they were an
898 overloaded function will not properly set this hardware cookie, resulting
899 in a hardware exception. Talk to lupus for more information.)
901 2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
903 * Syscall.cs, UnixConvert.cs: Remove mount- and umount-related
904 functionality. Mount/umount is inherently non-portable (see the C code
905 for mount/umount), and trying to provide a consistent interface is
906 impossible. If you need mount/umount support, use the command-line
907 programs mount(1) and umount(1).
909 2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
911 + Lots o' Renames, as the namespace changed.
912 * PosixConvert.cs: Moved to UnixConvert.cs:
913 * PosixDirectory.cs: Moved to UnixDirectory.cs:
914 * PosixEnvironment.cs: Moved to UnixEnvironment.cs:
915 * PosixDirectoryInfo.cs: Moved to UnixDirectoryInfo.cs:
916 * PosixFile.cs: Moved to UnixFile.cs:
917 * PosixFileInfo.cs: Moved to UnixFileInfo.cs:
918 * PosixFileSystemInfo.cs: Moved to UnixFileSystemInfo.cs:
919 * PosixGroup.cs: Moved to UnixGroup.cs:
920 * PosixGroupInfo.cs: Moved to UnixGroupInfo.cs:
921 * PosixIOException.cs: Moved to UnixIOException.cs:
922 * PosixMarshal.cs: Moved to UnixMarshal.cs:
923 * PosixProcess.cs: Moved to UnixProcess.cs:
924 * PosixStream.cs: Moved to UnixStream.cs:
925 * PosixSymbolicLinkInfo.cs: Moved to UnixSymbolicLinkInfo.cs:
926 * PosixUser.cs: Moved to UnixUser.cs:
927 * PosixUserInfo.cs: Moved to UnixUserInfo.cs:
928 * Catalog.cs, IncludeAttribute.cs, MapAttribute.cs, PeerCred.cs, Stdlib.cs,
929 Syscall.cs, UnixConvert.cs, UnixDirectory.cs, UnixDirectoryInfo.cs,
930 UnixEndPoint.cs, UnixEnvironment.cs, UnixFile.cs, UnixFileInfo.cs,
931 UnixFileSystemInfo.cs, UnixGroup.cs, UnixGroupInfo.cs, UnixIOException.cs,
932 UnixMarshal.cs, UnixProcess.cs, UnixStream.cs, UnixSymbolicLinkInfo.cs,
933 UnixUser.cs, UnixUserInfo.cs: Deal with renamed classes/members.
935 2004-11-15 Jonathan Pryor <jonpryor@vt.edu>
937 * PosixUserInfo.cs: Make the PosixUserInfo(Passwd) constructor public;
938 override Object.GetHashCode and Object.Equals.
939 * PosixGroupInfo.cs: Make the PosixGroupInfo(Group) constructor public;
940 override Object.GetHashCode and Object.Equals.
941 * PosixIOException.cs: Use PosixMarshal.GetErrorDescription instead of
942 calling Syscall.strerror_r directly
943 * PosixMarshal.cs: Add GetErrorDescription. Strerror_r() isn't portable, so
944 GetErrorDescription() first tries strerror_r(), and if it fails falls back
947 - Seal the Dirent class. It has no virtual members, so there's no point
948 in it being non-sealed. Override Object.GetHashCode and Object.Equals.
949 - Seal the Group class. It has no virtual members, so there's no point
950 in it being non-sealed. Override Object.GetHashCode and Object.Equals.
951 Provide operator== and operator!=.
952 - Seal the Passwd class. It has no virtual members, so there's no point
953 in it being non-sealed. Override Object.GetHashCode and Object.Equals.
954 Provide operator== and operator!=.
955 - Remove strerror_r() convenience overload. This is now
956 PosixMarshal.GetErrorDescription().
958 2004-11-12 Jonathan Pryor <jonpryor@vt.edu>
960 * Syscall.cs: Export time-related functions (gettimeofday, settimeofday,
961 utime, utimes), mknod.
963 2004-11-07 Atsushi Enomoto <atsushi@ximian.com>
965 * PosixEnvironment.cs : csc build fix. see bug #69195.
966 * PosixStream.cs : csc build fix. see bug #69196.
968 2004-11-05 Jonathan Pryor <jonpryor@vt.edu>
970 * PosixConvert.cs: New file; conversion functions for Mono.Posix types.
971 * PosixDirectory.cs: New file; Friendly wrapper over directory information.
972 * PosixDirectoryInfo.cs: New file; Friendly wrapper over directory information.
973 * PosixEnvironment.cs: New file; Friendly wrapper over environment information.
974 * PosixFile.cs: New file; Friendly wrapper over file information.
975 * PosixFileInfo.cs: New file; Friendly wrapper over file information.
976 * PosixFileSystemInfo.cs: New file; Friendly wrapper over `stat'.
977 * PosixGroup.cs: New file; User Group-related functionality
978 * PosixGroupInfo.cs: New file; User Group-related functionality
979 * PosixIOException.cs: New file; Exception for POSIX-generated exceptions.
980 * PosixMarshal.cs: New file; utility functions for marshaling, etc.
981 * PosixProcess.cs: New file; Friendly wrapper over process information.
982 * PosixStream.cs: New file; Friendly wrapper over file descriptors.
983 * PosixSymbolicLinkInfo.cs: New file; Friendly wrapper over symbolic links.
984 * PosixUser.cs: New file; Friendly wrapper over user information.
985 * PosixUserInfo.cs: New file; Friendly wrapper over user information.
986 * Stdlib.cs: New file; C standard library exports.
987 * Syscall.cs: Effective re-write.
988 - Organize exports by header file
989 - add additional enumerations (Error for the E* error values, etc.)
990 - always explicitly specify enumeration underlying type
991 - Use a new wrapping infrastructure so that ABI-stable types are exported
992 - For example, size_t is exported as ulong, not IntPtr.
993 - Wrap more functions, and wrap them better (such as getpwnam).
994 - This release is NOT backward compatible. Many names are the same, and
995 hopefully they're still compatible, but no effort was made to maintain
996 compatibility. For example, FileMode was removed and replaced with
997 FilePermissions, to avoid a name conflict with System.IO.FileMode.
998 - Change umount() to use MonoPosixHelper: portability fix for Mac OS X.
999 * make-map.cs: Another effective re-write, to clean up the code, produce
1000 better output, and produce more output. For example, most of
1001 PosixConvert can be auto-generated, so it is (modulo version delays and
1002 bootstrap issues). `map.c' is now conditional on all macros, and has
1003 error checking for invalid/unsupported values.
1005 2004-09-18 Jackson Harper <jackson@ximian.com>
1007 * Syscall.cs: Add support for poll ().
1009 2004-09-18 Jackson Harper <jackson@ximian.com>
1011 * make-map.cs: Use field value not name for #defines.
1013 2004-09-14 Loren Bandiera <lorenb@mmgsecurity.com>
1015 * Syscall.cs: Added method for getpwnam which uses Passwd
1017 * macros.c: Helper function for getpwnam
1018 (In committing, Josh Tauberer also added getpwuid.)
1020 2004-07-09 Dick Porter <dick@ximian.com>
1022 * PeerCred.cs: Get the unix socket peer credentials.
1024 2004-05-26 Miguel de Icaza <miguel@ximian.com>
1026 * Syscall.cs: Do not let the runtime handle strings, as we do not
1027 own those strings, we must transform the char * into a string
1030 2004-05-03 Miguel de Icaza <miguel@ximian.com>
1032 * Syscall.cs: Add symlink
1034 2004-04-19 Miguel de Icaza <miguel@ximian.com>
1036 * Syscall.cs: Use hex values for FileMode, since C# does not have
1037 an octal integer mode.
1039 2004-03-30 Joshua Tauberer <tauberer@for.net>
1041 * Added readlink, strerror, opendir, readdir, closedir
1042 * Added Mono.Posix.Stat.UnixToDateTime(long unixtime) --> DateTime
1044 2004-03-11 Joshua Tauberer <tauberer@for.net>
1046 * Syscall.cs: Removed argument to getgid that shouldn't be there.
1047 Added getusername, getgroupname which wrap getpwuid, getgrgid
1048 without dealing with pointers to structures.
1049 Removed duplicate FileMode enum nested in Syscall class.
1050 Added stat and lstat, which use StatMode enumeration
1051 (like FileMode but nicer and complete) and Stat struct.
1052 * macros.c: Helper functions for getpwuid, getgrgid, stat, lstat.
1054 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1056 * Syscall.cs: moved the assembly attribute to a proper place
1057 and added 'signal.h'
1058 * make-map.cs: use reflection to invoke the properties, as it
1059 fails under MS runtime.
1062 2004-01-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1064 * Syscall.cs: moved assembly attribute and added unsafe block to fix
1065 the build on windows.
1067 2003-11-11 Wojciech Polak <polak@gnu.org
1069 * Syscall.cs: Applied patch from Wojciech Polak <polak@gnu.org> to
1072 2003-05-16 Dick Porter <dick@ximian.com>
1074 * UnixEndPoint.cs: New property to get and set the filename, like
1075 the IPEndPoint has for the IP address. Also implement ToString().
1077 Tue Apr 29 16:53:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
1079 * Syscall.cs: remove the unsafe mess.
1081 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1084 * UnixEndPoint.cs: first file.