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