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