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