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