d6e3f4a7760f94405a6e44a78793c3ae87716b1d
[mono.git] / mcs / class / Mono.Posix / Mono.Unix / ChangeLog
1 2005-01-03  Jonathan Pryor <jonpryor@vt.edu>
2
3         * Syscall.cs: Update endfsent() and setfsent() declarations, as these must
4           now be implemented in MonoPosixHelper.
5
6 2005-01-01  Jonathan Pryor <jonpryor@vt.edu>
7
8         * Stdlib.cs, Syscall.cs: Minimize duplicate declarations of
9           "MonoPosixHelper" for use in DllImport statements.
10
11 2005-01-01  Jonathan Pryor <jonpryor@vt.edu>
12
13         * Stdlib.cs: Don't use C# v2 features; fixes build under CSC.EXE.
14
15 2004-12-30  Jonathan Pryor <jonpryor@vt.edu>
16
17         * Stdlib.cs: On miguel's suggestion, rename Sighandler_t to SignalHandler.
18
19 2004-12-30  Jonathan Pryor <jonpryor@vt.edu>
20
21         * Stdlib.cs: Implement all C89 <stdio.h> functions except for the scanf(3)
22           family.  These are too dangerous to expose.
23
24 2004-12-30  Jonathan Pryor <jonpryor@vt.edu>
25
26         * CdeclFunctions.cs: Remove warning about unused variable.
27         * Stdlib.cs: Make signal(2) sane and (hopefully) complete.
28         * Syscall.cs: Fix cuserid Obsolete message to reference correct class name.
29         * UnixProcess.cs: Remove warning about unused variable.
30         * UnixMarshal.cs: Remove warnings about unused variables.
31
32 2004-12-29  Jonathan Pryor <jonpryor@vt.edu>
33
34         * UnixPath.cs: Add ReadSymbolicLink(), which takes an intelligent approach
35           to reading symlinks (since their contents may be any size, we grow the
36           buffer dynamically to fit them all, instead of assuming a maximum size).
37         * UnixSymbolicLinkInfo.cs: Remove MaxContentsSize.
38
39 2004-12-29  Jonathan Pryor <jonpryor@vt.edu>
40
41         * UnixPath.cs: Add check for when symlink points to a full path name.
42
43 2004-12-29  Jonathan Pryor <jonpryor@vt.edu>
44
45         * Syscall.cs: Fix Object.Equals implementations.
46         * UnixPath.cs: New & improved, with Testing!  GetRealPath() is changed so
47           that it doesn't walk the entire path looking for symlinks, it just reads 
48           the leaf.  GetCompletRealPath() walks the entire path resolving symlinks.
49           GetCanonicalPath() added, which "cleans up" a path (removing extraneous
50           "." and ".." entries).
51         * UnixSymbolicLinkInfo.cs: Rename ContentsLength -> MaxContentsSize.
52
53 2004-12-28  Jonathan Pryor <jonpryor@vt.edu>
54
55         * UnixFileSystemInfo.cs: Add a link(2) wrapper, CreateLink().  Strictly
56           speaking it's only "safe" to do this on files, but an exception will be 
57           returned if the user tries to hard link directories (because of EPERM), 
58           unless the user is root, in which case it should be allowed anyway...
59
60 2004-12-28  Jonathan Pryor <jonpryor@vt.edu>
61
62         * CdeclFunctions.cs: Correct the comments for AMD64
63         * UnixDirectoryInfo.cs: override Name; add Parent & Root properties; 
64           Correct Path usage (s/Path/FullPath/g).
65         * UnixDriveInfo.cs: Added.  Based on .NET 2.0 System.IO.DriveInfo docs,
66           provides statvfs(2) and getfsfile(3) information about a mounted volume.
67           GetDrives() wraps getfsent(3), thus parsing /etc/fstab.
68         * UnixFile.cs: Use UnixConver.ToOpenFlags, deleting the local version.
69         * UnixFileInfo.cs: Use UnixConver.ToOpenFlags, deleting the local version;
70           override Name; add DirectoryName and Directory properties; 
71         * UnixFileSystemInfo.cs: Make more .NET-like, using FullPath and
72           OriginalPath protected members, abstract Name property; Add
73           CreateSymbolicLink; Remove ReadLink (it's now 
74           UnixSymbolicLinkInfo.Contents); Use lstat(2) for Create(string), so we
75           properly detect Symbolic Links.
76         * UnixPath.cs: Added; Path manipulation utility functions.
77         * UnixSymbolicLinkInfo.cs: 
78           - Seal the class; 
79           - override new abstract member Name; 
80           - rename ReadLink to ContentsPath (and Contents) properties 
81             (why "Contents"?  Because readlink(2) says "readlink places the 
82             contents of the symbolic link in the buffer...")
83           - Add CreateSymbolicLinkTo(), which creates a symlink to the specified
84             "normal" file
85
86 2004-12-28  Jonathan Pryor <jonpryor@vt.edu>
87
88         * Stdlib.cs: Add syslog(3) to XPrintfFunctions; Add additional printf(3) 
89           and fprintf(3) overload which properly escape the format string 
90           (by using "%s" as the format for the user-supplied message).
91         * Syscall.cs: Add #regions for enummerations, structures, classes; Wrap
92           syslog(3) and related enumerations; fix operator!= on Dirent, Group; 
93           wrap {f}statvfs(2); wrap <fstab.h> entries (getfsent(3), etc.).
94         * UnixConvert.cs: Add Syslog-releated enumeration translation functions;
95           Move ToOpenFlags here from UnixFile and UnixFileInfo.
96         * UnixMarshal.cs: Missing P/Invoke methods throw
97           EntryPointNotFoundException, not MissingMethodException; add
98           EscapeFormatString, which escapes printf-style format strings so that they
99           can be safely handed off to native code (avoiding stack overflow, etc);
100           make CreateExceptionForError internal.
101
102 2004-12-15  Jonathan Pryor <jonpryor@vt.edu>
103
104         * Stdlib.cs: Add more <stdio.h> wrappers, such as fread(3) and fwrite(3).
105           These will be useful in implementing System.IO.Stream subclass for
106           reading/writing to a FILE*.  Fix a typo in the realloc(3) DllImport.
107         * Syscall.cs: Fix the sys_kill and sys_crypt declarations.
108         * CdeclFunction.cs: Document calling convention problems on AMD64.
109
110 2004-11-18  Jonathan Pryor <jonpryor@vt.edu>
111
112         * CdeclFunction.cs: Added.
113         * Stdlib.cs: Re-add printf(3) and fprintf(3).  They may not be portable (the
114           jury is still out on that; the AMD64 SysV ABI looks like it should be
115           portable to AMD64 to my eyes), but they will work on *some* platforms, so
116           we should permit it.  The new implementation takes a page out of
117           cocoa-sharp: use System.Reflection.Emit to generate a P/Invoke method at
118           runtime to invoke printf(3) or fprintf(3).  This way, we can export a
119           params signature to C# code, permitting natural usage such as:
120               Stdlib.printf ("Hello, %s world! (%i)\n", "silly", 42);
121         * Syscall.cs: Mark which headers are complete, which functions still need
122           wrapping (for headers which have anything done to them), add #region
123           blocks for each header;
124           export mkfifo(3), fexecve(), getppid(2), setlogin(); fix sleep(3) export.
125         * UnixEnvironment.cs: Export a friendly getppid(2) wrapper.
126           GetParentProcessId isn't in UnixProcess as there's no way (that I know of)
127           to get the Parent's Parent, so it can't be a class member, and exposing it
128           as a static member of UnixProcess doesn't make sense to me, as it isn't
129           general.  Added GetUserShells().
130         * UnixProcess.cs: Change constructor to internal, so it can be used from
131           UnixEnvironment.
132
133 2004-11-16  Jonathan Pryor <jonpryor@vt.edu>
134
135         * Stdlib.cs: Remove printf(3) and fprintf(3).  These are vararg/CDECL 
136           functions, and it's not portable to call them in this manner.
137           (It's not portable because some architectures, such as AMD64, use a
138           "cookie" as part of the vararg calling sequence to help reduce buffer
139           overflow exploits.  Trying to call vararg functions as if they were an
140           overloaded function will not properly set this hardware cookie, resulting
141           in a hardware exception.  Talk to lupus for more information.)
142
143 2004-11-16  Jonathan Pryor <jonpryor@vt.edu>
144
145         * Syscall.cs, UnixConvert.cs: Remove mount- and umount-related
146           functionality.  Mount/umount is inherently non-portable (see the C code
147           for mount/umount), and trying to provide a consistent interface is
148           impossible.  If you need mount/umount support, use the command-line
149           programs mount(1) and umount(1).
150
151 2004-11-16  Jonathan Pryor <jonpryor@vt.edu>
152
153         + Lots o' Renames, as the namespace changed.
154         * PosixConvert.cs: Moved to UnixConvert.cs:
155         * PosixDirectory.cs: Moved to UnixDirectory.cs:
156         * PosixEnvironment.cs: Moved to UnixEnvironment.cs:
157         * PosixDirectoryInfo.cs: Moved to UnixDirectoryInfo.cs:
158         * PosixFile.cs: Moved to UnixFile.cs:
159         * PosixFileInfo.cs: Moved to UnixFileInfo.cs:
160         * PosixFileSystemInfo.cs: Moved to UnixFileSystemInfo.cs:
161         * PosixGroup.cs: Moved to UnixGroup.cs:
162         * PosixGroupInfo.cs: Moved to UnixGroupInfo.cs:
163         * PosixIOException.cs: Moved to UnixIOException.cs:
164         * PosixMarshal.cs: Moved to UnixMarshal.cs:
165         * PosixProcess.cs: Moved to UnixProcess.cs:
166         * PosixStream.cs: Moved to UnixStream.cs:
167         * PosixSymbolicLinkInfo.cs: Moved to UnixSymbolicLinkInfo.cs:
168         * PosixUser.cs: Moved to UnixUser.cs:
169         * PosixUserInfo.cs: Moved to UnixUserInfo.cs:
170         * Catalog.cs, IncludeAttribute.cs, MapAttribute.cs, PeerCred.cs, Stdlib.cs,
171           Syscall.cs, UnixConvert.cs, UnixDirectory.cs, UnixDirectoryInfo.cs,
172           UnixEndPoint.cs, UnixEnvironment.cs, UnixFile.cs, UnixFileInfo.cs,
173           UnixFileSystemInfo.cs, UnixGroup.cs, UnixGroupInfo.cs, UnixIOException.cs,
174           UnixMarshal.cs, UnixProcess.cs, UnixStream.cs, UnixSymbolicLinkInfo.cs,
175           UnixUser.cs, UnixUserInfo.cs: Deal with renamed classes/members.
176
177 2004-11-15  Jonathan Pryor <jonpryor@vt.edu>
178
179         * PosixUserInfo.cs: Make the PosixUserInfo(Passwd) constructor public;
180           override Object.GetHashCode and Object.Equals.
181         * PosixGroupInfo.cs: Make the PosixGroupInfo(Group) constructor public;
182           override Object.GetHashCode and Object.Equals.
183         * PosixIOException.cs: Use PosixMarshal.GetErrorDescription instead of
184           calling Syscall.strerror_r directly
185         * PosixMarshal.cs: Add GetErrorDescription.  Strerror_r() isn't portable, so
186           GetErrorDescription() first tries strerror_r(), and if it fails falls back
187           to strerror(3).
188         * Syscall.cs: 
189           - Seal the Dirent class.  It has no virtual members, so there's no point 
190       in it being non-sealed.  Override Object.GetHashCode and Object.Equals.
191           - Seal the Group class.  It has no virtual members, so there's no point 
192       in it being non-sealed.  Override Object.GetHashCode and Object.Equals.
193             Provide operator== and operator!=.
194           - Seal the Passwd class.  It has no virtual members, so there's no point 
195       in it being non-sealed.  Override Object.GetHashCode and Object.Equals.
196             Provide operator== and operator!=.
197           - Remove strerror_r() convenience overload.  This is now
198             PosixMarshal.GetErrorDescription().
199
200 2004-11-12  Jonathan Pryor <jonpryor@vt.edu>
201
202         * Syscall.cs: Export time-related functions (gettimeofday, settimeofday,
203           utime, utimes), mknod.
204
205 2004-11-07  Atsushi Enomoto  <atsushi@ximian.com>
206
207         * PosixEnvironment.cs : csc build fix. see bug #69195.
208         * PosixStream.cs : csc build fix. see bug #69196.
209
210 2004-11-05  Jonathan Pryor  <jonpryor@vt.edu>
211
212         * PosixConvert.cs: New file; conversion functions for Mono.Posix types.
213         * PosixDirectory.cs: New file; Friendly wrapper over directory information.
214         * PosixDirectoryInfo.cs: New file; Friendly wrapper over directory information.
215         * PosixEnvironment.cs: New file; Friendly wrapper over environment information.
216         * PosixFile.cs: New file; Friendly wrapper over file information.
217         * PosixFileInfo.cs: New file; Friendly wrapper over file information.
218         * PosixFileSystemInfo.cs: New file; Friendly wrapper over `stat'.
219         * PosixGroup.cs: New file; User Group-related functionality
220         * PosixGroupInfo.cs: New file; User Group-related functionality
221         * PosixIOException.cs: New file; Exception for POSIX-generated exceptions.
222         * PosixMarshal.cs: New file; utility functions for marshaling, etc.
223         * PosixProcess.cs: New file; Friendly wrapper over process information.
224         * PosixStream.cs: New file; Friendly wrapper over file descriptors.
225         * PosixSymbolicLinkInfo.cs: New file; Friendly wrapper over symbolic links.
226         * PosixUser.cs: New file; Friendly wrapper over user information.
227         * PosixUserInfo.cs: New file; Friendly wrapper over user information.
228         * Stdlib.cs: New file; C standard library exports.
229         * Syscall.cs: Effective re-write.  
230           - Organize exports by header file
231           - add additional enumerations (Error for the E* error values, etc.)
232           - always explicitly specify enumeration underlying type
233           - Use a new wrapping infrastructure so that ABI-stable types are exported
234                 - For example, size_t is exported as ulong, not IntPtr.
235           - Wrap more functions, and wrap them better (such as getpwnam).
236           - This release is NOT backward compatible.  Many names are the same, and
237             hopefully they're still compatible, but no effort was made to maintain
238             compatibility.  For example, FileMode was removed and replaced with
239             FilePermissions, to avoid a name conflict with System.IO.FileMode.
240                 - Change umount() to use MonoPosixHelper: portability fix for Mac OS X.
241         * make-map.cs: Another effective re-write, to clean up the code, produce
242           better output, and produce more output.  For example, most of
243           PosixConvert can be auto-generated, so it is (modulo version delays and
244           bootstrap issues).  `map.c' is now conditional on all macros, and has
245           error checking for invalid/unsupported values.
246
247 2004-09-18  Jackson Harper  <jackson@ximian.com>
248
249         * Syscall.cs: Add support for poll ().
250
251 2004-09-18  Jackson Harper  <jackson@ximian.com>
252
253         * make-map.cs: Use field value not name for #defines.
254                 
255 2004-09-14  Loren Bandiera <lorenb@mmgsecurity.com>
256
257         * Syscall.cs: Added method for getpwnam which uses Passwd
258         struct.
259         * macros.c: Helper function for getpwnam
260         (In committing, Josh Tauberer also added getpwuid.)
261
262 2004-07-09  Dick Porter  <dick@ximian.com>
263
264         * PeerCred.cs: Get the unix socket peer credentials.
265
266 2004-05-26  Miguel de Icaza  <miguel@ximian.com>
267
268         * Syscall.cs: Do not let the runtime handle strings, as we do not
269         own those strings, we must transform the char * into a string
270         ourselves. 
271
272 2004-05-03  Miguel de Icaza  <miguel@ximian.com>
273
274         * Syscall.cs: Add symlink
275
276 2004-04-19  Miguel de Icaza  <miguel@ximian.com>
277
278         * Syscall.cs: Use hex values for FileMode, since C# does not have
279         an octal integer mode.
280
281 2004-03-30  Joshua Tauberer <tauberer@for.net>
282
283         * Added readlink, strerror, opendir, readdir, closedir
284         * Added Mono.Posix.Stat.UnixToDateTime(long unixtime) --> DateTime
285
286 2004-03-11  Joshua Tauberer <tauberer@for.net>
287
288         * Syscall.cs: Removed argument to getgid that shouldn't be there.
289                 Added getusername, getgroupname which wrap getpwuid, getgrgid
290                 without dealing with pointers to structures.
291                 Removed duplicate FileMode enum nested in Syscall class.
292                 Added stat and lstat, which use StatMode enumeration
293                 (like FileMode but nicer and complete) and Stat struct.
294         * macros.c: Helper functions for getpwuid, getgrgid, stat, lstat.
295
296 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
297
298         * Syscall.cs: moved the assembly attribute to a proper place
299         and added 'signal.h'
300         * make-map.cs: use reflection to invoke the properties, as it
301         fails under MS runtime.
302         
303
304 2004-01-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
305
306         * Syscall.cs: moved assembly attribute and added unsafe block to fix
307         the build on windows.
308
309 2003-11-11  Wojciech Polak <polak@gnu.org
310
311         * Syscall.cs: Applied patch from Wojciech Polak <polak@gnu.org> to
312         support IsAtty.
313
314 2003-05-16  Dick Porter  <dick@ximian.com>
315
316         * UnixEndPoint.cs: New property to get and set the filename, like
317         the IPEndPoint has for the IP address.  Also implement ToString().
318
319 Tue Apr 29 16:53:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
320
321         * Syscall.cs: remove the unsafe mess.
322
323 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
324
325         * Check in.
326         * UnixEndPoint.cs: first file.
327