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