1 2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
3 * Syscall.cs: Add [Map] to AccessMode and MmapProt, as the Mono.Unix.Native
4 replacements go by different names (AccessModes, MmapProts), but we need
5 to continue generating the mapping code for these types (backward compat).
7 2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
9 * CdeclFunction.cs: [Obsolete]d by Mono.Unix.Native.CdeclFunction.
10 * make-map.cs: Remove.
11 * Stdlib.cs: [Obsolete] the types; use the Mono.Unix.Native.* types instead.
12 * StdioFileStream.cs: Add GC.KeepAlive statements to prevent premature GC's
14 * Syscall.cs: Remove [Map] attribute from all types; [CLSCompliant(false)]
15 work; [Obsolete] all types and suggest using the Mono.Unix.Native.*
16 replacements; remove [IncludeAttribute] -- superseded by
17 Mono.Unix.Native/Syscall.cs's [HeaderAttribte] for CLS compliance.
18 * UnixConvert.cs: [Obsolete]d by Mono.Unix.Native.NativeConvert.
19 * UnixDirectory.cs, UnixDriveInfo.cs, UnixEnvironment.cs,
20 UnixGroup.cs, UnixGroupInfo.cs,
21 UnixSymbolicLinkInfo.cs, UnixUser.cs, UnixUserInfo.cs:
22 Add [CLSCompliant(false)] as necessary.
23 * UnixFile.cs, UnixDirectory.cs, UnixFileInfo.cs, UnixFileSystemInfo.cs:
24 [CLSCompliant(false)], addition of method overloads for [Obsolete]d types,
25 warn about changing return types.
26 * UnixProcess.cs, UnixStream.cs: Add [CLSCompliant(false)] as necessary,
27 and warn about changing property types.
29 2005-09-02 Jonathan Pryor <jonpryor@vt.edu>
31 * Stdlib.cs: Cache delegates passed to Stdlib.signal() so that they survive
32 garbage collections. Delegates can be removed by calling Stdlib.signal()
33 again with one of the Stdlib.SIG_* values (or the original return value of
35 * UnixUser.cs, UnixGroup.cs, UnixEnvironment.cs: Clarify "Id" (int) vs.
36 "Name" (string) differences by always using a Id or Name suffix.
38 2005-07-01 Daniel Drake <dsd@gentoo.org>
40 * Syscall.cs: The entire extended attribute API now goes through MPH, to
41 be shared between both Linux's and FreeBSD's similar EA implementations.
43 2005-06-29 Miguel de Icaza <miguel@ximian.com>
45 * StdioFileStream.cs: Only flush if we do not own the handle, as
46 fclose does a flush internally.
48 2005-06-29 Jonathan Pryor <jonpryor@vt.edu>
50 * UnixEnvironment: Add User, Login properties.
51 * Syscall.cs: Add locking around cuserid, crypt, encrypt, getlogin.
53 2005-06-29 Jonathan Pryor <jonpryor@vt.edu>
55 * Syscall.cs: SyslogFacility shouldn't be [Flags] either. Sigh.
56 Thanks to Vorobiev Maksim for pointing this out.
57 * make-map.cs: Don't generate conversion code for [Obsolete] enum members.
58 This assumes that (1) the enum member's value is invalid, or (2) a
59 corrected member with the same value exists. This fix allows us to
60 obsolete invalid members (instead of removing them) without screwing up
61 the generated code -- consider LOG_USRE, the mis-spelling of LOG_USER.
62 Since SyslogFacility was (incorrectly) a [Flags] enum, since both LOG_USER
63 and LOG_USRE had the same value, we'd get a EINVAL error trying to convert
64 a valid value, since LOG_USRE would exist, would be checked for, and the
65 check would succeed (since it had the same value as LOG_USER).
66 This change allows us to be slightly more permissive with versioning.
68 2005-06-28 Jonathan Pryor <jonpryor@vt.edu>
70 * Syscall.cs: correct value of LOG_CRON (it shouldn't be identical to
71 LOG_UUCP). SyslogLevel shouldn't have [Flags]. Move LOG_USER to be
72 before LOG_USRE so that the generated map code doesn't return EINVAL when
73 LOG_USER is specified.
75 2005-06-15 Jonathan Pryor <jonpryor@vt.edu>
77 * Syscall.cs: s/LOG_USRE/LOG_USER/. Fixes #75274.
78 Thanks to Martin Honermeyer.
80 2005-06-09 Jonathan Pryor <jonpryor@vt.edu>
82 * make-map.cs: Look for [Obsolete] members, and mark the UnixConvert
83 conversion functions with the same [Obsolete] message. This should permit
84 more graceful deprecation of enumerations in the future (rather than just
87 2005-06-08 Jonathan Pryor <jonpryor@vt.edu>
89 * Syscall.cs: Add execvp(2). (This should have been added with the other
90 exec(2) additions...).
92 2005-06-08 Jonathan Pryor <jonpryor@vt.edu>
94 * Syscall.cs: Update comment with correct exception type.
95 * UnixConvert.cs: Rename ToFilePermissions(string) to
96 FromOctalPermissionString; Add ToOctalPermissionString,
97 FromUnixPermissionString, ToUnixPermissionString.
98 * UnixMarshal.cs: Remove ErrorMarshal.HaveStrerror_r and
99 UnixMarshal.IsErrorDescriptionThreadSafe. strerror(3) is now thread-safe
100 (from managed code, at least). Update comment.
102 2005-06-07 Jonathan Pryor <jonpryor@vt.edu>
104 * UnixFileSystemInfo.cs: Don't use lstat(2), use stat(2). This fits with
105 expectations better -- if you create a UnixFileInfo() on a symlink, you
106 want to get the target's information, not the symlink's info. Add
107 GetFileStatus so UnixSymbolicLinkInfo can override this behavior.
108 * UnixSymbolicLinkInfo.cs: Implement GetFileStatus() (which calls lstat(2)).
110 2005-06-07 Jonathan Pryor <jonpryor@vt.edu>
112 * Syscall.cs: Document naming conventions.
114 2005-06-05 Jonathan Pryor <jonpryor@vt.edu>
116 * make-map.cs: Change automatic "ifdef HAVE_<header>" support prefix to
117 "ah:" from ">". I hadn't known about ">", and "ah:" is (somewhat) more
119 * Syscall.cs: Change IncludeAttribute to put all headers/defines one/line.
120 It's easier to read this way. Add "ah:sys/xattr.h" to the headers.
122 2005-06-03 Jonathan Pryor <jonpryor@vt.edu>
124 * Stdlib.cs: Add sanity checking to snprintf(3) to avoid buffer overflows.
126 2005-06-02 Jonathan Pryor <jonpryor@vt.edu>
128 * StdioFileStream.cs: Remove FilePosition property & replace with
129 SaveFilePosition/RestoreFilePosition methods. Since FilePosition has a
130 finalizer, it's not right to have implicitly created instances.
132 - FilePosition: GC.SuppressFinalize() should be last in Dispose()
133 (following .NET guidelines).
134 - Syscall: Add locking around functions most likely to be thread unsafe.
135 This should provide some level of thread-safety to managed code.
136 * Syscall.cs: Add locking around functions most likely to be thread unsafe;
137 add mkstemp(3) export.
138 * UnixEnvironment.cs: GetUserShells should be atomic (from managed code).
139 * UnixGroup.cs: GetLocalGroups should be atomic (from managed code).
140 * UnixGroupInfo.cs: Add ToGroup() method to retrieve underlying Group info.
141 * UnixUser.cs: GetLocalUsers should be atomic (from managed code).
142 * UnixUserInfo.cs: Add ToPasswd () method to retrieve underlying Passwd info.
143 * UnixDriveInfo.cs: GetDrives should be atomic (from managed code).
145 2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
147 * Stdlib.cs: Add comment for atexit(3) so I don't try to add it.
148 * Syscall.cs: Add fcntl(2) overload which takes DirectoryNotifyFlags (so
149 that *something* accepts a DirectoryNotifyFlags); Fix IncludeAttribute
150 header files (">sys/poll.h" doesn't exist);
151 Add additional <sys/mman.h> functions mmap, munmap, msync, mlock, munlock,
152 mlockall, munlockall, mremap, mincore, remap_file_pages.
153 * UnixConvert.cs: Add conversion functions for MmapFlags, MmapProt, MsyncFlags,
154 MlockallFlags, MremapFlags.
156 2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
158 * Syscall.cs, UnixConvert.cs: Rename LockFlags to LockfCommand. This is a more
159 consistent naming, and it's more correct (they weren't flags in the first place).
161 2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
163 * Stdlib.cs: Correct Mono_Posix_Stdlib_InvokeSignalHandler export.
165 2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
167 * make-map.cs: Process the Mono.Posix namespace as well as Mono.Unix; add
168 mapping for Boolean => int for native type conversion.
170 2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
172 * make-map.cs: Add a MphPrototypeFileGenerator, which looks for DllImport
173 methods across all types and generates a C header file declaration for
174 those methods. This allows us to ensure consistency between
175 Mono.Posix.dll and MonoPosixHelper.so. Rename WrapperFileGenerator to
176 ConvertFileGenerator (it generates UnixConvert).
177 * MapAttribute.cs, IncludeAttribute.cs: Make these internal -- there's no
178 reason for external users to even know these exist.
179 * StdioFileStream.cs: Move GC.SuppressFinalize call to be last Dispose()
180 call. This follows current design guidelines, and allows an exception to
181 be thrown from Dispose() without un-registering the finalizer.
182 * Syscall.cs: Change method declarations to match MonoPosixHelper, etc.
183 - posix_fallocate(P) takes a size_t
184 - mis-spelled settimeofday(2), sethostname(2)
185 - exec(2) can be public; it's safe to call
186 - change lseek(2) so int's are passed to MonoPosixHelper.so, not shorts
187 - We can't allow two incompatible prototypes to exist (since C allows
188 only one prototype, and we're cross-checking prototypes now). Change
189 utime(2) so only one prototype is needed.
190 * UnixMarshal.cs: ErrorMarshal.ErrorTranslator and ErrorMarshal.Translate
191 shouldn't be public; make them internal.
192 * UnixStream.cs: Remove `unsafe` code block when a "safe" alternative works;
193 Close() should also call GC.SuppressFinalize.
195 2005-05-12 Jonathan Pryor <jonpryor@vt.edu>
197 * Syscall.cs: The Statvfs structure should contain a MountFlags enumeration,
198 not a ulong (we can "safely" do this since POSIX defines some values for
199 f_flag, so we should be kind and expose them).
200 * UnixConvert.cs: Add MountFlags conversion functions.
202 2005-05-02 Joe Shaw <joeshaw@novell.com>
204 * UnixListener.cs (Init): Remove the call to Cleanup() and the
205 method itself, which was not supposed to be here. We try to
206 connect to the socket if it exists instead of deleting it
209 2005-04-30 Ben Maurer <bmaurer@ximian.com>
211 * Stdlib.cs: Comment out usage of `UnmanagedFunctionPointer'. It
212 isn't supported in the runtime -- it throws an assert -- so better
213 not to use it at all for now.
215 2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
217 * UnixConvert.cs: Fix time_t -> DateTime conversions. time_t should be
218 assumed to be in the local time zone, so don't mess with UTC shifts.
219 This allows Mono.Unix to produce sane output (e.g. identical to ls(1) or
220 stat(1), instead of several hours different).
222 2005-04-29 Jonathan Pryor <jonpryor@vt.edu>
224 * Stdlib.cs: Make FilePosition slightly more useful by providing a
225 ToString() override which dumps the fpos_t structure contents into a
226 hex string. Add Equals(), GetHashCode(), operator==, and operator!=
227 so FilePosition behaves like a value type.
229 2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
232 * UnixListener.cs: TcpListener/TcpClient clones from Jow Shaw.
234 2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
236 * Mono.Posix.dll.sources: added UnixListener and UnixClient from Joe
239 2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
241 * UnixEndPoint.cs: fix from Mono.Posix.
243 2005-04-20 Jonathan Pryor <jonpryor@vt.edu>
245 * Syscall.cs: Make all fork(2) and exec(2) functions `private`. It
246 currently isn't safe to call these under *any* circumstances. See also
247 68141, and this pertinent quote from Butenhof's
248 "Programming with POSIX Threads", p197, s6.1:
250 "When a threaded process calls fork to create a child process,
251 Pthreads specifies that only the thread calling fork exists in the
252 child. ... Pthreads does not 'terminate' the other threads in a forked
253 process...They simply cease to exist. ... This is not a problem if
254 the child process is about to call exec to run a new program, but if
255 you use fork to clone a threaded program, beware that you may lose
256 access to memory, especially heap memory stored only as
257 thread-specific data values."
259 Since P/Invoke currently requires using thread local storage, once you
260 fork(2) you won't be able to invoke exec(2) from managed code (since that
261 would require a P/Invoke transition to call exec(2), which would require
262 TLS, which doesn't exist in the new process).
264 This can only be fixed by removing the TLS dependency on P/Invoke, which
265 isn't a priority (and may not be possible).
267 The workaround is to create a C function which does your fork(2)/exec(2)
268 (and any other functions such as daemon(3)) on your behalf, and P/Invoke
269 to call this C function.
271 2005-04-18 Jonathan Pryor <jonpryor@vt.edu>
273 * Syscall.cs: Update comment specifying which functions belong in Syscall.
274 * UnixConvert.cs: Add XattrFlags conversion functions.
275 * UnixMarshal.cs: Remove warning about self-assignment.
277 2005-04-16 Daniel Drake <dsd@gentoo.org>
279 * Syscall.cs: Add bindings for extended attribute manipulation
281 2005-04-05 Miguel de Icaza <miguel@novell.com>
283 * Syscall.cs: Set entry point for sys_syslog to be syslog.
284 Include the syslog.h header in the generated map so that we
285 actually do the mapping.
287 2005-03-28 Jonathan Pryor <jonpryor@vt.edu>
289 * UnixConvert.cs: Add ToFopenMode() methods, which convert FileMode/FileAccess
290 into an fopen(3) mode string. ToOpenFlags() should throw
291 ArgumentOutOfRangeException for argument violations.
292 * StdioFileStream.cs: Add constructor overloads accepting filename and
293 FileMode/FileAccess overloads; Compatibility fixes with regression tests;
294 remove IDisposable implementation since System.IO.Stream already
295 implements it (which calls Close() for us).
297 2005-03-17 Jonathan Pryor <jonpryor@vt.edu>
299 * Stdlib.cs: Move Errno-related functionality into Stdlib from Syscall,
300 since (1) errno is part of C89, and (2) StdioFileStream will need it, and
301 StdioFileStream shouldn't use Syscall. Add [UnmanagedFunctionPointer]
302 attribute to SignalHandler for .NET 2.0 (since signal handlers use C
303 calling convention, not Stdcall).
304 * Syscall.cs: Move Errno-related functionality into Stdlib.
305 * UnixMarshal.cs: Use ERANGE not EPERM when figuring out appropriate
306 translator, since ERANGE is part of C99 and EPERM isn't. Use Stdlib
307 instead of Syscall for Errno-related functionality.
309 2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
311 * UnixFile.cs: Cope with changes in UnixStream.
312 * UnixStream.cs: Change FileDescriptor property to Handle for consistency.
313 * StdioFileStream.cs: Change FileStream property to Handle for consistency.
315 2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
317 * Syscall.cs: Remove public sys_ methods. Some were public by mistake, and
318 others so that users could manually marshal strings if desired. Manually
319 marshaling strings shouldn't be necessary, though, so remove them too.
321 2005-02-02 Jonathan Pryor <jonpryor@vt.edu>
323 * StdioFileStream.cs: Fix Length property to actually return the size of the
324 file, not the # of bytes from the current position to EOF. Oops.
326 2005-01-31 Jonathan Pryor <jonpryor@vt.edu>
328 * Stdlib.cs: Import "msvcrt", not "libc". These members are part of the
329 ANSI C standard, and thus should be present on Windows via msvcrt.dll
330 (except snprintf, until they catch up to C99). Change the calling
331 convention of all functions to Cdecl, as the .NET default is Stdcall.
332 Changing the calling convention isn't needed in Syscall, as it can only be
333 run on Unix platforms anyway, where the default is Cdecl.
334 * Syscall.cs: Add LIBC member that points to the real "libc"; we can't use
335 the imported definition from Stdlib as "msvcrt" doesn't exist on Unix.
337 2005-01-29 Jonathan Pryor <jonpryor@vt.edu>
339 * Stdlib.cs: sys_* functions shouldn't be public.
341 2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
343 * make-map.cs: libMonoPosixHelper exports Mono_Posix prefixes, not Mono_Unix
344 prefixes, so change the type and namespace to generate compatible code.
345 * Syscall.cs: Change OpenFlags values so they match the Linux values.
347 2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
349 * Stdlib.cs: Use Stdlib.LIBC instead of "libc".
350 * StdioFileStream.cs: Add FilePosition property (not that I expect anyone to
351 use it) and Rewind() method.
353 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
355 * StdioFileStream.cs: Added; System.IO.Stream wrapper for C FILE struct.
356 * Stdlib.cs: Correct visibility of ftell().
358 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
360 * Stdlib.cs: Re-order declarations to match the order used in the
361 C99 Standard Annex B; Complete <stdio.h> exports (except for those not
362 worth supporting); Add non-"unsafe" versions of fread(3), fwrite(3) and
363 add some rudimentary buffer-overflow checking; Add <stdlib.h> exports such
364 as getenv(3), exit(3), rand(3), EXIT_SUCCESS, RAND_MAX, etc.
366 2005-01-03 Jonathan Pryor <jonpryor@vt.edu>
368 * Syscall.cs: Update endfsent() and setfsent() declarations, as these must
369 now be implemented in MonoPosixHelper.
371 2005-01-01 Jonathan Pryor <jonpryor@vt.edu>
373 * Stdlib.cs, Syscall.cs: Minimize duplicate declarations of
374 "MonoPosixHelper" for use in DllImport statements.
376 2005-01-01 Jonathan Pryor <jonpryor@vt.edu>
378 * Stdlib.cs: Don't use C# v2 features; fixes build under CSC.EXE.
380 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
382 * Stdlib.cs: On miguel's suggestion, rename Sighandler_t to SignalHandler.
384 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
386 * Stdlib.cs: Implement all C89 <stdio.h> functions except for the scanf(3)
387 family. These are too dangerous to expose.
389 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
391 * CdeclFunctions.cs: Remove warning about unused variable.
392 * Stdlib.cs: Make signal(2) sane and (hopefully) complete.
393 * Syscall.cs: Fix cuserid Obsolete message to reference correct class name.
394 * UnixProcess.cs: Remove warning about unused variable.
395 * UnixMarshal.cs: Remove warnings about unused variables.
397 2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
399 * UnixPath.cs: Add ReadSymbolicLink(), which takes an intelligent approach
400 to reading symlinks (since their contents may be any size, we grow the
401 buffer dynamically to fit them all, instead of assuming a maximum size).
402 * UnixSymbolicLinkInfo.cs: Remove MaxContentsSize.
404 2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
406 * UnixPath.cs: Add check for when symlink points to a full path name.
408 2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
410 * Syscall.cs: Fix Object.Equals implementations.
411 * UnixPath.cs: New & improved, with Testing! GetRealPath() is changed so
412 that it doesn't walk the entire path looking for symlinks, it just reads
413 the leaf. GetCompletRealPath() walks the entire path resolving symlinks.
414 GetCanonicalPath() added, which "cleans up" a path (removing extraneous
415 "." and ".." entries).
416 * UnixSymbolicLinkInfo.cs: Rename ContentsLength -> MaxContentsSize.
418 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
420 * UnixFileSystemInfo.cs: Add a link(2) wrapper, CreateLink(). Strictly
421 speaking it's only "safe" to do this on files, but an exception will be
422 returned if the user tries to hard link directories (because of EPERM),
423 unless the user is root, in which case it should be allowed anyway...
425 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
427 * CdeclFunctions.cs: Correct the comments for AMD64
428 * UnixDirectoryInfo.cs: override Name; add Parent & Root properties;
429 Correct Path usage (s/Path/FullPath/g).
430 * UnixDriveInfo.cs: Added. Based on .NET 2.0 System.IO.DriveInfo docs,
431 provides statvfs(2) and getfsfile(3) information about a mounted volume.
432 GetDrives() wraps getfsent(3), thus parsing /etc/fstab.
433 * UnixFile.cs: Use UnixConver.ToOpenFlags, deleting the local version.
434 * UnixFileInfo.cs: Use UnixConver.ToOpenFlags, deleting the local version;
435 override Name; add DirectoryName and Directory properties;
436 * UnixFileSystemInfo.cs: Make more .NET-like, using FullPath and
437 OriginalPath protected members, abstract Name property; Add
438 CreateSymbolicLink; Remove ReadLink (it's now
439 UnixSymbolicLinkInfo.Contents); Use lstat(2) for Create(string), so we
440 properly detect Symbolic Links.
441 * UnixPath.cs: Added; Path manipulation utility functions.
442 * UnixSymbolicLinkInfo.cs:
444 - override new abstract member Name;
445 - rename ReadLink to ContentsPath (and Contents) properties
446 (why "Contents"? Because readlink(2) says "readlink places the
447 contents of the symbolic link in the buffer...")
448 - Add CreateSymbolicLinkTo(), which creates a symlink to the specified
451 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
453 * Stdlib.cs: Add syslog(3) to XPrintfFunctions; Add additional printf(3)
454 and fprintf(3) overload which properly escape the format string
455 (by using "%s" as the format for the user-supplied message).
456 * Syscall.cs: Add #regions for enummerations, structures, classes; Wrap
457 syslog(3) and related enumerations; fix operator!= on Dirent, Group;
458 wrap {f}statvfs(2); wrap <fstab.h> entries (getfsent(3), etc.).
459 * UnixConvert.cs: Add Syslog-releated enumeration translation functions;
460 Move ToOpenFlags here from UnixFile and UnixFileInfo.
461 * UnixMarshal.cs: Missing P/Invoke methods throw
462 EntryPointNotFoundException, not MissingMethodException; add
463 EscapeFormatString, which escapes printf-style format strings so that they
464 can be safely handed off to native code (avoiding stack overflow, etc);
465 make CreateExceptionForError internal.
467 2004-12-15 Jonathan Pryor <jonpryor@vt.edu>
469 * Stdlib.cs: Add more <stdio.h> wrappers, such as fread(3) and fwrite(3).
470 These will be useful in implementing System.IO.Stream subclass for
471 reading/writing to a FILE*. Fix a typo in the realloc(3) DllImport.
472 * Syscall.cs: Fix the sys_kill and sys_crypt declarations.
473 * CdeclFunction.cs: Document calling convention problems on AMD64.
475 2004-11-18 Jonathan Pryor <jonpryor@vt.edu>
477 * CdeclFunction.cs: Added.
478 * Stdlib.cs: Re-add printf(3) and fprintf(3). They may not be portable (the
479 jury is still out on that; the AMD64 SysV ABI looks like it should be
480 portable to AMD64 to my eyes), but they will work on *some* platforms, so
481 we should permit it. The new implementation takes a page out of
482 cocoa-sharp: use System.Reflection.Emit to generate a P/Invoke method at
483 runtime to invoke printf(3) or fprintf(3). This way, we can export a
484 params signature to C# code, permitting natural usage such as:
485 Stdlib.printf ("Hello, %s world! (%i)\n", "silly", 42);
486 * Syscall.cs: Mark which headers are complete, which functions still need
487 wrapping (for headers which have anything done to them), add #region
488 blocks for each header;
489 export mkfifo(3), fexecve(), getppid(2), setlogin(); fix sleep(3) export.
490 * UnixEnvironment.cs: Export a friendly getppid(2) wrapper.
491 GetParentProcessId isn't in UnixProcess as there's no way (that I know of)
492 to get the Parent's Parent, so it can't be a class member, and exposing it
493 as a static member of UnixProcess doesn't make sense to me, as it isn't
494 general. Added GetUserShells().
495 * UnixProcess.cs: Change constructor to internal, so it can be used from
498 2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
500 * Stdlib.cs: Remove printf(3) and fprintf(3). These are vararg/CDECL
501 functions, and it's not portable to call them in this manner.
502 (It's not portable because some architectures, such as AMD64, use a
503 "cookie" as part of the vararg calling sequence to help reduce buffer
504 overflow exploits. Trying to call vararg functions as if they were an
505 overloaded function will not properly set this hardware cookie, resulting
506 in a hardware exception. Talk to lupus for more information.)
508 2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
510 * Syscall.cs, UnixConvert.cs: Remove mount- and umount-related
511 functionality. Mount/umount is inherently non-portable (see the C code
512 for mount/umount), and trying to provide a consistent interface is
513 impossible. If you need mount/umount support, use the command-line
514 programs mount(1) and umount(1).
516 2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
518 + Lots o' Renames, as the namespace changed.
519 * PosixConvert.cs: Moved to UnixConvert.cs:
520 * PosixDirectory.cs: Moved to UnixDirectory.cs:
521 * PosixEnvironment.cs: Moved to UnixEnvironment.cs:
522 * PosixDirectoryInfo.cs: Moved to UnixDirectoryInfo.cs:
523 * PosixFile.cs: Moved to UnixFile.cs:
524 * PosixFileInfo.cs: Moved to UnixFileInfo.cs:
525 * PosixFileSystemInfo.cs: Moved to UnixFileSystemInfo.cs:
526 * PosixGroup.cs: Moved to UnixGroup.cs:
527 * PosixGroupInfo.cs: Moved to UnixGroupInfo.cs:
528 * PosixIOException.cs: Moved to UnixIOException.cs:
529 * PosixMarshal.cs: Moved to UnixMarshal.cs:
530 * PosixProcess.cs: Moved to UnixProcess.cs:
531 * PosixStream.cs: Moved to UnixStream.cs:
532 * PosixSymbolicLinkInfo.cs: Moved to UnixSymbolicLinkInfo.cs:
533 * PosixUser.cs: Moved to UnixUser.cs:
534 * PosixUserInfo.cs: Moved to UnixUserInfo.cs:
535 * Catalog.cs, IncludeAttribute.cs, MapAttribute.cs, PeerCred.cs, Stdlib.cs,
536 Syscall.cs, UnixConvert.cs, UnixDirectory.cs, UnixDirectoryInfo.cs,
537 UnixEndPoint.cs, UnixEnvironment.cs, UnixFile.cs, UnixFileInfo.cs,
538 UnixFileSystemInfo.cs, UnixGroup.cs, UnixGroupInfo.cs, UnixIOException.cs,
539 UnixMarshal.cs, UnixProcess.cs, UnixStream.cs, UnixSymbolicLinkInfo.cs,
540 UnixUser.cs, UnixUserInfo.cs: Deal with renamed classes/members.
542 2004-11-15 Jonathan Pryor <jonpryor@vt.edu>
544 * PosixUserInfo.cs: Make the PosixUserInfo(Passwd) constructor public;
545 override Object.GetHashCode and Object.Equals.
546 * PosixGroupInfo.cs: Make the PosixGroupInfo(Group) constructor public;
547 override Object.GetHashCode and Object.Equals.
548 * PosixIOException.cs: Use PosixMarshal.GetErrorDescription instead of
549 calling Syscall.strerror_r directly
550 * PosixMarshal.cs: Add GetErrorDescription. Strerror_r() isn't portable, so
551 GetErrorDescription() first tries strerror_r(), and if it fails falls back
554 - Seal the Dirent class. It has no virtual members, so there's no point
555 in it being non-sealed. Override Object.GetHashCode and Object.Equals.
556 - Seal the Group class. It has no virtual members, so there's no point
557 in it being non-sealed. Override Object.GetHashCode and Object.Equals.
558 Provide operator== and operator!=.
559 - Seal the Passwd class. It has no virtual members, so there's no point
560 in it being non-sealed. Override Object.GetHashCode and Object.Equals.
561 Provide operator== and operator!=.
562 - Remove strerror_r() convenience overload. This is now
563 PosixMarshal.GetErrorDescription().
565 2004-11-12 Jonathan Pryor <jonpryor@vt.edu>
567 * Syscall.cs: Export time-related functions (gettimeofday, settimeofday,
568 utime, utimes), mknod.
570 2004-11-07 Atsushi Enomoto <atsushi@ximian.com>
572 * PosixEnvironment.cs : csc build fix. see bug #69195.
573 * PosixStream.cs : csc build fix. see bug #69196.
575 2004-11-05 Jonathan Pryor <jonpryor@vt.edu>
577 * PosixConvert.cs: New file; conversion functions for Mono.Posix types.
578 * PosixDirectory.cs: New file; Friendly wrapper over directory information.
579 * PosixDirectoryInfo.cs: New file; Friendly wrapper over directory information.
580 * PosixEnvironment.cs: New file; Friendly wrapper over environment information.
581 * PosixFile.cs: New file; Friendly wrapper over file information.
582 * PosixFileInfo.cs: New file; Friendly wrapper over file information.
583 * PosixFileSystemInfo.cs: New file; Friendly wrapper over `stat'.
584 * PosixGroup.cs: New file; User Group-related functionality
585 * PosixGroupInfo.cs: New file; User Group-related functionality
586 * PosixIOException.cs: New file; Exception for POSIX-generated exceptions.
587 * PosixMarshal.cs: New file; utility functions for marshaling, etc.
588 * PosixProcess.cs: New file; Friendly wrapper over process information.
589 * PosixStream.cs: New file; Friendly wrapper over file descriptors.
590 * PosixSymbolicLinkInfo.cs: New file; Friendly wrapper over symbolic links.
591 * PosixUser.cs: New file; Friendly wrapper over user information.
592 * PosixUserInfo.cs: New file; Friendly wrapper over user information.
593 * Stdlib.cs: New file; C standard library exports.
594 * Syscall.cs: Effective re-write.
595 - Organize exports by header file
596 - add additional enumerations (Error for the E* error values, etc.)
597 - always explicitly specify enumeration underlying type
598 - Use a new wrapping infrastructure so that ABI-stable types are exported
599 - For example, size_t is exported as ulong, not IntPtr.
600 - Wrap more functions, and wrap them better (such as getpwnam).
601 - This release is NOT backward compatible. Many names are the same, and
602 hopefully they're still compatible, but no effort was made to maintain
603 compatibility. For example, FileMode was removed and replaced with
604 FilePermissions, to avoid a name conflict with System.IO.FileMode.
605 - Change umount() to use MonoPosixHelper: portability fix for Mac OS X.
606 * make-map.cs: Another effective re-write, to clean up the code, produce
607 better output, and produce more output. For example, most of
608 PosixConvert can be auto-generated, so it is (modulo version delays and
609 bootstrap issues). `map.c' is now conditional on all macros, and has
610 error checking for invalid/unsupported values.
612 2004-09-18 Jackson Harper <jackson@ximian.com>
614 * Syscall.cs: Add support for poll ().
616 2004-09-18 Jackson Harper <jackson@ximian.com>
618 * make-map.cs: Use field value not name for #defines.
620 2004-09-14 Loren Bandiera <lorenb@mmgsecurity.com>
622 * Syscall.cs: Added method for getpwnam which uses Passwd
624 * macros.c: Helper function for getpwnam
625 (In committing, Josh Tauberer also added getpwuid.)
627 2004-07-09 Dick Porter <dick@ximian.com>
629 * PeerCred.cs: Get the unix socket peer credentials.
631 2004-05-26 Miguel de Icaza <miguel@ximian.com>
633 * Syscall.cs: Do not let the runtime handle strings, as we do not
634 own those strings, we must transform the char * into a string
637 2004-05-03 Miguel de Icaza <miguel@ximian.com>
639 * Syscall.cs: Add symlink
641 2004-04-19 Miguel de Icaza <miguel@ximian.com>
643 * Syscall.cs: Use hex values for FileMode, since C# does not have
644 an octal integer mode.
646 2004-03-30 Joshua Tauberer <tauberer@for.net>
648 * Added readlink, strerror, opendir, readdir, closedir
649 * Added Mono.Posix.Stat.UnixToDateTime(long unixtime) --> DateTime
651 2004-03-11 Joshua Tauberer <tauberer@for.net>
653 * Syscall.cs: Removed argument to getgid that shouldn't be there.
654 Added getusername, getgroupname which wrap getpwuid, getgrgid
655 without dealing with pointers to structures.
656 Removed duplicate FileMode enum nested in Syscall class.
657 Added stat and lstat, which use StatMode enumeration
658 (like FileMode but nicer and complete) and Stat struct.
659 * macros.c: Helper functions for getpwuid, getgrgid, stat, lstat.
661 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
663 * Syscall.cs: moved the assembly attribute to a proper place
665 * make-map.cs: use reflection to invoke the properties, as it
666 fails under MS runtime.
669 2004-01-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
671 * Syscall.cs: moved assembly attribute and added unsafe block to fix
672 the build on windows.
674 2003-11-11 Wojciech Polak <polak@gnu.org
676 * Syscall.cs: Applied patch from Wojciech Polak <polak@gnu.org> to
679 2003-05-16 Dick Porter <dick@ximian.com>
681 * UnixEndPoint.cs: New property to get and set the filename, like
682 the IPEndPoint has for the IP address. Also implement ToString().
684 Tue Apr 29 16:53:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
686 * Syscall.cs: remove the unsafe mess.
688 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
691 * UnixEndPoint.cs: first file.