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