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