1 2010-05-13 Geoff Norton <gnorton@novell.com>
3 * fakepoll.h: Added for OSX
5 * signal.c: poll on OSX is broken, so we use a select based
6 implementation instead.
8 2010-04-19 Gonzalo Paniagua Javier <gonzalo@novell.com>
10 * zlib-helper.c: don't call Z_FINISH if nothing has been written.
12 2010-04-19 Jonathan Pryor <jpryor@novell.com>
14 * dirent.c, grp.c, macros.c, pwd.c, signal.c, sys-statvfs.c, sys-time.c,
15 unistd.c: Add #if HAVE_XXX checks for functions which aren't
18 2010-04-15 Jonathan Pryor <jpryor@novell.com>
20 * Makefile.am: Revert previous linkage against libmono.so, as lupus
21 mentioned that it's unacceptable for MonoPosixHelper to link against
22 libmono (e.g. when embedding mono, there might not be a libmono).
23 * map.h: Flush updated Mono_Unix_UnixSignal_SignalInfo prototype.
24 * signal.c: Don't use mono_runtime_is_shutting_down(). Instead, change
25 Mono_Unix_UnixSignal_WaitAny() to accept a function pointer argument,
26 which will return Environment.HasShutdownStarted in managed code (the
27 moral equivalent of mono_runtime_is_shutting_down()). This allows
28 us to avoid a libmono dependency w/o lots of rewriting. Fixes #592981.
30 2010-04-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
32 * zlib-helper.c: now that we don't use Z_SYNC_FLUSH, there might be
33 unflushed input in zstream, so always call Z_FINISH.
35 2010-04-02 Jonathan Pryor <jpryor@novell.com>
37 * Makefile.am: On non-Windows platforms, MonoPosixHelper now links
38 against libmono.so, for mono_runtime_is_shutting_down().
39 * signal.c: Only continue retrying system calls if Mono is NOT
40 attempting to shut down. Fixes #592981.
42 2010-03-29 Zoltan Varga <vargaz@gmail.com>
44 * mph.h: Applied some changes from the openbsd ports tree to fix openbsd
47 2010-03-23 Andreas Faerber <andreas.faerber@web.de>
49 * old-map.c (map_Mono_Posix_Signals): Fix build for platforms where
50 SIGIO is not defined (Haiku).
52 Code is contributed under MIT/X11 license.
54 2010-02-23 Carlos Alberto Cortez <calberto.cortez@gmail.com>
56 * serial.cs: Add 921600 to the list of possible baud rates, and
57 use it only if defined, as is not available in all the unix systems.
60 2010-01-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
62 * zlib-helper.c: no need for sync flush when compressing.
63 Thanks to Hin-Tak Leung.
65 2010-01-28 Rodrigo Kumpera <rkumpera@novell.com>
67 * serial.c: Fix the OSX build.
69 2010-01-22 Leszek Ciesielski <skolima@gmail.com>
71 * serial.c: baud rate 460800 by Thad Thompson <TThompson@nucsafe.com>
72 * serial.c: report errors from every function
74 2009-12-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
76 * zlib-helper.c: when finishing uncompressing a buffer, we might need
77 more than one call to deflate with Z_FINISH since the uncompressed
78 data can take more space than the allocated buffer.
80 Fixes the IPY+Chiron test case.
82 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
84 * zlib-helper.c: stop trying to decompress when we get Z_STREAM_END.
85 Patch by Ives Bastide. Fixes bug #549942.
87 2009-09-21 Leszek Ciesielski <skolima@gmail.com>
89 * serial.c: return -1 from close() on error
91 2009-09-14 Jonathan Pryor <jpryor@novell.com>
93 * zlib-helper.c: support reverse callbacks within MonoTouch.
95 2009-09-09 Gonzalo Paniagua Javier <gonzalo@novell.com>
98 * Makefile.am: attempt to fix the windows GCC build.
100 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
102 * time.c (Mono_Posix_Syscall_nanosleep): Avoid referencing unitialized
105 2009-08-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
121 * infback.c: updated to 1.2.3.3
123 2009-07-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
125 * zlib-helper.c: use glib for malloc/free.
127 2009-07-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
129 * zlib-helper.c: don't try to finish the z_stream if it has not been
130 used. This fixes all the tests after the latest change.
132 2009-07-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
134 * Makefile.am: replaced zlib_macros.c with zlib-helper.c
135 * zlib_macros.c: Removed file.
136 * zlib-helper.c: new interface for DeflateStream. Flush() actually
139 2009-04-13 Jonathan Pryor <jpryor@novell.com>
141 * sys-time.c: Properly set the modification time, instead of using the
142 access time as the modification time. Fixes #494253.
144 2009-03-20 Jonathan Pryor <jpryor@novell.com>
146 * x-struct-str.c: It's possible for struct members to be NULL, so make
147 sure we don't pass NULL to strlen(3).
149 2009-02-20 Jonathan Pryor <jpryor@novell.com>
151 * map.h: Flush (adds Mono_Unix_UnixSignal_SignalInfo::pipecnt, removes
152 functions no longer declared within Mono.Posix.dll).
153 * signal.c: Allow Mono_Unix_UnixSignal_WaitAny() to be called
154 concurrently from multiple threads w/o blocking each thread;
155 previously, calls to Mono_Unix_UnixSignal_WaitAny() would block
156 until the previous call completed. This required restructuring
157 Mono_Unix_UnixSignal_SignalInfo to hold a ref-counted
158 read_fd/write_fd pair (instead of allocating & releasing within
159 _WaitAny()) so that the pipes could be "shared" between threads.
160 Patch thanks to tim.jenks@realtimeworlds.com.
162 2009-02-10 Jeffrey Stedfast <fejj@novell.com>
164 * minizip/zip.c: Fix warnings about old-style paramater type
167 * minizip/unzip.c Fix warnings about old-style paramater type
169 (unzlocal_DosDateToTmuDate): Fix ambiguous else's.
170 (unzlocal_DosDateToTmuDate): Here too.
171 (unzlocal_CheckCurrentFileCoherencyHeader): And here.
173 * old-map.c: Added prototypes to silence compile warnings. Looks
174 like this file is supposed to be autogenerated, so probably not
175 the right fix but I can't find the autogen script.
177 * map.h (helper_Mono_Posix_getpwnamuid): Added a prototype for
178 this - it doesn't seem to be used anywhere in mono, so
179 maybe it can be removed but I'm not positive.
180 (map_Mono_Posix_PollEvents): Added prototype.
181 (map_Mono_Posix_Signals): Added prototype.
183 * macros.c: #include "map.h" to silence compile warnings about no
186 2009-02-09 Jeffrey Stedfast <fejj@novell.com>
188 * supportw.c (SetWindowPos): Fixed compile warnings about
189 printf-style formatters.
190 (SendMessageA): Same.
192 2009-01-14 Geoff Norton <gnorton@novell.com>
194 * supportw.c: Use unsigned int instead of uint, as its more portable.
195 Fixes compilation issue on Mac OSX.
197 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
199 * signal.c: Don't allow registration of a realtime signal to happen
200 if it was already registered outside of Mono.Posix.
202 2008-12-19 Jonathan Pryor <jpryor@novell.com>
204 * signal.c: Improve error checking within Mono_Posix_FromRealTimeSignum.
206 2008-12-19 Jonathan Pryor <jpryor@novell.com>
209 * signal.c: Add Mono_Posix_SIGRTMIN(), Mono_Posix_SIGRTMAX(),
210 Mono_Posix_FromRealTimeSignum().
211 Patch thanks to tim.jenks@realtimeworlds.com.
213 2008-11-06 Alan McGovern <amcgovern@novell.com>
215 * Makefile.am: Missed out on a header file for minizip
217 2008-11-06 Alan McGovern <amcgovern@novell.com>
219 * minizip/minizip/miniunz.c :
220 * Makefile.am: Removed unnecessary file from build and svn.
222 2008-11-06 Alan McGovern <amcgovern@novell.com>
225 * Makefile.am: Merged minizip build into the support code.
227 2008-11-05 Bill Holmes <billholmes54@gmail.com>
229 * Makefile.am : For generation of map.c adding preprocessor
230 checks for sys/time.h, unistd.h, dirent.h and utime.h.
232 * map.c : Re-run 'make refresh' to add preprocessor checks
233 for sys/time.h, unistd.h, dirent.h and utime.h.
235 Code is contributed under MIT/X11 license.
237 2008-10-15 Jonathan Pryor <jpryor@novell.com>
239 * time.c: Add Mono_Posix_Syscall_nanosleep().
241 2008-10-15 Jonathan Pryor <jpryor@novell.com>
243 * fcntl.c: Use Mono_Posix_{From,To}Flock() for flock conversion.
244 * Makefile.am: Include <time.h> in map.c.
245 * map.c, map.h: Flush; adds Flock, Timespec support.
247 2008-09-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
249 * serial.c: When writing bytes and polling, take into account negative
250 values to indicate infinite timeout. Patch by Leszek Ciesielski.
253 2008-07-22 Zoltan Varga <vargaz@gmail.com>
255 * Makefile.am (patch-libtool): New helper target.
257 2008-04-05 Carlos Alberto Cortez <calberto.cortez@gmail.com>
259 * serial.c (set_attributes): When setting parity to Even,
260 besides removing the PARODD bit, add the PARENB bit to actually
262 Patch by Leszek Ciesielski.
265 2008-03-31 Miguel de Icaza <miguel@novell.com>
267 * serial.c (write_serial): Avoid infinite loops, see #375580.
269 2008-02-12 Jonathan Pryor <jpryor@novell.com>
271 * signal.c: SLES9 has glib 2.2, so we can't rely on g_atomic_int_*().
272 Provide a fallback mechanism between using Mono's atomic.h, glib 2.4
273 functions, and horribly unsafe-but-no-alternative code.
275 2008-02-12 Jonathan Pryor <jpryor@novell.com>
277 * signal.c: Fix another build break; g_atomic_int_set() (part of GLib 2.10)
278 isn't present on all build machines, so use an alternate function.
280 2008-02-08 Jonathan Pryor <jpryor@novell.com>
282 * signal.c: Mono_Unix_UnixSignal_WaitAny() semantic change: return the index
283 into the signals array of the first signaled signal if successful,
284 otherwise return the timeout.
286 2008-02-07 Jonathan Pryor <jpryor@novell.com>
288 * signal.c: Make the signal handler thread-safe, so that it can safely be
289 invoked concurrently from multiple threads.
291 2008-02-05 Jonathan Pryor <jpryor@novell.com>
293 * signal.c: Fix the Win32 build.
295 2008-01-28 Jonathan Pryor <jpryor@novell.com>
297 * signal.c: Provide support functions for Mono.Unix.UnixSignal, which
298 supports both polling and waiting on signal emission.
299 * map.h: Flush (adds UnixSignal-related prototypes).
301 2008-01-05 Jonathan Pryor <jpryor@novell.com>
303 * map.h, map.c: Flush; add new ST_NOEXEC, ST_REMOUNT, and ST_BIND MountFlags
306 2007-12-17 Jonathan Pryor <jpryor@novell.com>
308 * map.h: Flush; add Mono_Posix_Syscall__Utsname, Mono_Posix_Syscall_uname()
310 * Makefile.am: Add sys-utsname.c to the build.
311 * sys-utsname.c: Added; binding for uname(2).
312 * mph.h: Change definition of _mph_copy_structure_strings() so that the
313 offset array specifies whether the string is a pointer (char*) or inline
314 array (char[]) within the structure. Necessary because most bound
315 structure string members are pointers, but `struct utsname' uses arrays.
316 * fstab.c, pwd.c: Update offset array generation due to above.
317 * x-struct-str.c: Update _mph_copy_structure_strings() as above.
319 2007-11-01 Geoff Norton <gnorton@novell.com>
321 * stdio.c: Handle Leopards lack of L_cuserid.
323 2007-10-25 Jonathan Pryor <jonpryor@vt.edu>
325 * stdio.c: Provide errno as a parameter and set errno before calling
326 perror(3), as errno is cleared during P/Invoke.
327 * map.h: Updated prototype for Mono_Posix_Stdlib_perror().
329 2007-09-08 Jonathan Pryor <jonpryor@vt.edu>
331 * dirent.c: NAME_MAX isn't defined on Solaris; fix the build.
333 2007-09-04 Jonathan Pryor <jonpryor@vt.edu>
335 * dirent.c: Fix `struct dirent' overflow on Solaris. See #82678.
337 2007-09-03 Jonathan Pryor <jonpryor@vt.edu>
339 * dirent.c: Fix logic to determine if readdir_r() succeeded.
340 Thanks to Albert Lee for the patch; see #82678.
342 2007-08-14 Wade Berrier <wberrier@novell.com>
344 * serial.c: include sys/time.h for mac osx 10.3 for timeval
346 2007-08-12 Lukasz Byczynski <lukaszb@forcom.com.pl>
350 - all changes are based on Windows .Net SerialPort behavior and
352 document: http://www.easysw.com/~mike/serial/serial.html
353 - removed wrong default values from open_serial
354 - added timeout detection in write_serial
355 - added proper parameters setting in set_attributes
357 2007-06-29 Jonathan Pryor <jonpryor@vt.edu>
359 * dirent.c, grp.c, pwd.c, stdio.c, syslog.c, unistd.c: Following in the
360 logic of the 2007-06-27 logic... Only return failure if an actual
361 DOCUMENTED error occurred. For many of these functions, there are no
362 docuemented errors, so they "can't fail," even if errno were set.
363 All praise the POSIX standard?
365 2007-06-28 Jonathan Pryor <jonpryor@vt.edu>
367 * map.c, map.h: Refresh -- to add Utimbuf copy conversion functions.
368 - Includes latest-and-greatest create-native-map output.
369 - Mono's Reflection output has changed as well --
370 FieldInfo.GetValue().ToString("x") is now "correct" for the underlying
371 type, so `short' enums are 0x0000, etc.
372 - Member sorting is now case-insensitive.
374 2007-06-27 Jonathan Pryor <jonpryor@vt.edu>
376 * grp.c, pwd.c: Only return failure if a documented errno is encountered.
377 This fixes UnixUserInfo.GetLocalUsers() and UnixGroupInfo.GetLocalGroups()
378 on systems missing the file /etc/default/nss (which generates ENOENT,
379 which isn't documented, so therefore it's not a "real" error).
380 * mph.h: Add mph_return_if_val_in_list5().
382 2007-03-28 Wade Berrier <miguel@novell.com>
384 * supportw.c (SendMessageA/GetWindowLongA): Return values to fix some
385 warnings, even though these aren't called (Patch from suse rpms)
387 2007-01-23 Miguel de Icaza <miguel@novell.com>
389 * serial.c (poll_serial): Fix for #79073, based on the patch by
390 Leszek Ciesielski, without introducing a GNU libc-ism.
391 (write_serial): Handle EINTR here as well.
393 2006-11-30 Jonathan Pryor <jonpryor@vt.edu>
395 * map.c: _cnm_return_val_if_overflow() should be a no-op unless DEBUG is
396 defined. "Fixes" false positives pending further investigation.
398 2006-11-18 Miguel de Icaza <miguel@novell.com>
400 * serial.c (poll_serial): Do not report an error for EINTR.
402 2006-11-18 Jelle Hissink <Jelle.Hissink@C-it.nl>
404 * serial.c (poll_serial): Add timeout parameter to poll.
406 Fixes #79722 and #79735
408 2006-11-17 Jonathan Pryor <jonpryor@vt.edu>
410 * map.c: Flush (fix FromFilePermissions for SuppressFlags-marked values).
412 2006-11-15 Jonathan Pryor <jonpryor@vt.edu>
414 * map.c: Flush (removes warnings due to _cnm_return_val_if_overflow()).
416 2006-11-14 Jonathan Pryor <jonpryor@vt.edu>
418 * map.c: Flush (fixes FilePermissions conversion, allowing Syscall.stat() to
421 2006-11-13 Jonathan Pryor <jonpryor@vt.edu>
423 * mph.h: Add macro for XATTR_AUTO, so that XattrFlags mapping works (as
424 XATTR_AUTO is a value which frequently isn't definedy by any OS, yet it
425 has the value 0, a default value which is supported by most OS's).
427 2006-11-08 Jonathan Pryor <jonpryor@vt.edu>
429 * Makefile.am: Revert addition of L_SET et al; this breaks the Win32 build.
430 * map.c: Revert addition of L_SET et al; this breaks the Win32 build.
431 * mph.h: Add macros for L_SET, L_INCR, and L_XTND for non-Win32 platforms.
433 2006-11-07 Jonathan Pryor <jonpryor@vt.edu>
435 * Makefile.am: Add implementation macros for L_SET, L_INCR, and L_XTND.
436 * map.c: Make sure that L_SET, L_INCR, and L_XTND are defined. Lets
437 Mono_Posix_FromSeekFlags() work on Solaris, fixing Gnome Bugzilla 370081.
439 2006-11-01 Jonathan Pryor <jonpryor@vt.edu>
441 * stdio.c: Some BSDs define clearerr(3) as a macro, so we need to cast
442 `stream' to a `FILE*' to avoid derefing a `void*'.
443 * sys-statvfs.c: Build fix to support OS X 10.3.9 & systems w/o statvfs(2).
445 2006-11-01 Jonathan Pryor <jonpryor@vt.edu>
447 * mph.h: Add fallback typedefs for blkcnt_t, blksize_t, suseconds_t so that
448 map.c can rely on their presence. (Some versions of OS X don't provide
451 2006-10-27 Jonathan Pryor <jonpryor@vt.edu>
453 * map.c: Improve handling of [Flags] enumerations which mix bitfields and
454 non-bitfield values (i.e. FilePermissions and S_IFREG, which isn't a bit
455 field, along with a few other FilePermissions values). Fixes #79161.
457 2006-10-26 Jonathan Pryor <jonpryor@vt.edu>
459 * map.c: Enclose structure conversion functions with HAVE_<<STRUCT NAME>>,
460 so that Unix-specific structures don't break the Win32 build.
462 2006-10-26 Jonathan Pryor <jonpryor@vt.edu>
464 * create-native-map.exe: Remove. Just grab a new copy whenever we need to
466 * Makefile.am: Remove `update-create-native-map' target, and just have the
467 `refresh' target grab the latest create-native-map.exe program.
468 * map.c: Flush (remove fallback to <inttypes.h> constants).
470 2006-10-26 Jonathan Pryor <jonpryor@vt.edu>
472 * create-native-map.exe: Update; Adds support for integral limit fallback.
473 * map.c: Flush (adds integral limits fallback, so that if G_MININT8 doesn't
474 exist we can fallback sanely instead of breaking the build).
476 2006-10-26 Jonathan Pryor <jonpryor@vt.edu>
478 * Makefile.am: Add "mph.h" to the generated code for map.c, so that
479 EOVERFLOW is defined on Win32.
480 * map.c: Flush (adds #include "mph.h").
482 2006-10-25 Wade berrier <wberrier@novell.com>
484 * Makefile.am: remove map-icalls.h so make dist succeeds
486 2006-10-24 Jonathan Pryor <jonpryor@vt.edu>
488 * dirent.c, errno.c, fcntl.c, fstab.c, grp.c, macros.c, pwd.c, signal.c,
489 stdio.c, stdlib.c, string.c, sys-mman.c, sys-sendfile.c, sys-stat.c,
490 sys-statvfs.c, sys-time.c, sys-xattr.c syslog.c, time.c, unistd.c,
491 utime.c: Remove structure definitions, and use the
492 create-native-map generated definitions within map.h. Update function
493 prototypes to match current map.h declarations.
494 * map.c, map.h: Flush (current create-native-map output).
495 * mph.h: Don't include "map-icalls.h"; "icalls" are now in map.h.
496 * create-native-map.exe: Added; cached version of create-native-map.exe
497 used to update map.c, map.h. (create-native-map.exe source within
498 mono-tools/create-native-map.)
499 * Makefile.am: Added update-create-native-map target to update
500 create-native-map.exe using pkg-config & the create-native-map.pc package.
501 Use create-native-map.exe to generate map.* files instead of make-map.exe.
502 * sys-statvfs.c: Add Mono_Posix_ToStatvfs, Mono_Posix_FromStatvfs exports.
504 2006-09-15 Jonathan Pryor <jonpryor@vt.edu>
506 * Makefile.am: Remove CRYPT_LIBS use; we no longer rely on libcrypt.
507 * stdlib.c: Remove setkey(3) wrapper.
508 * unistd.c: Remove encrypt(3) wrapper.
510 2006-08-13 Miguel de Icaza <miguel@novell.com>
512 * serial.c (get_bytes_in_buffer): Change the signature, we do not
513 return any meaningful error other than -1.
515 2006-06-28 Zoltan Varga <vargaz@gmail.com>
517 * mph.h (MPH_INTERNAL): Only use this if HAVE_VISIBILITY_HIDDEN is
518 defined since it is not supported on some archs with gcc.
520 2006-04-28 Wade Berrier <wberrier@novell.com>
522 * serial.c: Add sys/filio.h for solaris for FIONREAD
524 2006-04-20 Geoff Norton <gnorton@customerdna.com>
526 * serial.c: Change TIOCINQ to FIONREAD to
527 fix the build on the *BSDs.
529 2006-04-19 Carlos Alberto Cortez <calberto.cortez@gmail.com>
531 * serial.c: Added poll_serial () function, to poll
532 outside the read_serial () functions; and get_bytes_in_buffer (), to
533 get bytes in serialport buffers . Update some functions/enums
534 used by System.IO.Port.SerialPort too (Changes aproved by Miguel:
535 we will add tests in the managed side).
537 2006-03-22 Carlos Alberto Cortez <calberto.cortez@gmail.com>
539 * serial.c: Add get_signal_code, get_signal, and set_signal
540 functions to access serial signals. Also add a MonoSerialSignal
541 enum, which is a copy of System.IO.Ports.SerialSignal.
543 Thu Mar 16 17:27:46 CET 2006 Paolo Molaro <lupus@ximian.com>
545 * serial.c: removed useless serial.h file (it was also
548 2006-03-09 Carlos Alberto Cortez <calberto.cortez@gmail.com>
550 * serial.c: Fix a pair of wrong or incomplete assignations
553 2006-02-28 Carlos Alberto Cortez <calberto.cortez@gmail.com>
555 * serial.h: New file with serial port constants.
556 * serial.c: Use the constants in serial.h instead of magic numbers.
558 2006-01-03 Jonathan Pryor <jonpryor@vt.edu>
560 * sys-time.c: lutimes(2) only exists on some BSDs. There's a configure
561 check for it now -- use it.
563 2005-12-28 Jonathan Pryor <jonpryor@vt.edu>
565 * map-icalls.h: Flush (add utimes_bad, lutimes, futimes).
566 * sys-time.c: Add lutimes(2) and futimes(2) wrapper.
568 2005-12-27 Jonathan Pryor <jonpryor@vt.edu>
570 * map.c: Include <sys/mman.h>. Fixes #77091. Thanks to Ben Gamari.
572 2005-12-01 Jonathan Pryor <jonpryor@vt.edu>
574 * Makefile.am: Use $(CRYPT_LIB), not -lcrypt, as not all platforms
576 * stdlib.c: Wrap Mono_Posix_Syscall_setkey() within HAVE_SETKEY, not
579 2005-12-01 Daniel Drake <dsd@gentoo.org>
581 * Makefile.am: Link against libcrypt, needed for setkey(3) as referenced
582 in stdlib.c. Problem caught by Michael Hill.
584 2005-11-07 Jonathan Pryor <jonpryor@vt.edu>
586 * map-icalls.h: Oddly, this file didn't get the new functions added in
587 2005-10-14 -- ToConfstrName, FromConfstrName, etc. Add them.
588 * map.c, map.h: Remove invalid enumeration value SyslogFacility.LOG_USRE.
590 2005-10-14 Jonathan Pryor <jonpryor@vt.edu>
592 * signal.c: Don't build Syscall wrappers on Win32.
594 2005-10-14 Jonathan Pryor <jonpryor@vt.edu>
596 * Makefile.am (MPH_UNIX_SOURCE): Add syslog.c.
597 * dirent.c, grp.c, pwd.c, signal.c, stdio.c, stdlib.c: Wrap functions which
598 return `void' so that they instead: (1) return `int', (2) clear errno
599 before calling the real function, and (3) return -1 if errno changed.
600 This must be done in native code because calling
601 Stdlib.SetLastError/Syscall.xxx
602 from managed code won't work reliably (since errno may change between the
603 SetLastError call and the actual Syscall invocation).
604 * unistd.c: Same as above, and allow fpathconf(3), pathconf(3), sysconf(3),
605 and confstr(3) callers to explicitly choose their own errno value.
606 * map.c, map.h: Handle enumeration name change in Mono.Unix.Native
607 (e.g. ConfStr --> ConfstrName, etc.). This is so that they follow the
608 established naming conventions.
609 * map-icalls.h: Add new icalls.
610 * syslog.c: Added; wraps <syslog.h> functions.
612 2005-10-06 Jonathan Pryor <jonpryor@vt.edu>
614 * Makefile.am (MPH_C_SOURCE): Add string.c.
615 * string.c: Added; exports strlen(3) wrapper.
616 * map-icalls.h: Prototype for strlen(3) wrapper.
618 2005-09-29 Miguel de Icaza <miguel@novell.com>
620 * support-heap.c: Add meat to the Heap routines.
622 2005-09-20 Jonathan Pryor <jonpryor@vt.edu>
624 * Makefile.am (refresh): Use the make-map.exe in Mono.Unix.Native.
625 * map-icalls.h, map.c, map.h: Update to catch new enums AccessModes, Errno,
626 and MmapProts. Huge re-ordering because of namespace change in managed
627 code (not relevant to C API), and make-map.exe now outputs types/members
628 in alphabetical order (to avoid major code churn in the future).
630 2005-07-12 Daniel Drake <dsd@gentoo.org>
632 * sys-xattr.c: Use <attr/attr.h> if <sys/xattr.h> does not exist (e.g. for
634 * Makefile.am: Link to libattr if libc does not provide the xattr
637 Thu Jul 7 12:35:20 EDT 2005 Paolo Molaro <lupus@ximian.com>
639 *supportw.c, Makefile.am: remove calls and link to libmono/libwapi.
641 2005-07-01 Daniel Drake <dsd@gentoo.org>
643 * sys-xattr.c: Support FreeBSD's extattr implementation. Slight API rework
644 to provide transparency between Linux and FreeBSD EA's.
645 * map-icalls.h: Update as above
647 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
649 * supportw.c: HeapDestroy.
650 * Makefile.am: don't build supportw on windows.
652 2005-06-29 Ben Maurer <bmaurer@ximian.com>
654 * Makefile.am: namespace our library.
656 2005-06-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
660 * Makefile.am: new library intended to provide often P/Invoked windows
661 API functions not present in io-layer.
663 2005-06-29 Jonathan Pryor <jonpryor@vt.edu>
665 * map.c: Handle Syslog-related changes (SyslogFacility isn't a
666 [Flags] enum); make-map.exe changes.
668 2005-06-28 Jonathan Pryor <jonpryor@vt.edu>
670 * map.c, map.h: Handle Syslog-related changes (SyslogLevel isn't a [Flags]
671 enum; change in order between LOG_USER and LOG_USRE).
673 2005-06-27 Jonathan Pryor <jonpryor@vt.edu>
675 * map.c, map.h: Add corrected spelling of LOG_USER.
677 2005-06-13 Miguel de Icaza <miguel@novell.com>
679 * sys-statvfs.c (copy_statfs): f_flags is the field name on BSD,
682 2005-06-08 Jonathan Pryor <jonpryor@vt.edu>
684 * Makefile.am: Create an unversioned library. We won't make any gaurantees
685 about ABI stability until Mono 1.2 (if then).
687 2005-06-07 Jonathan Pryor <jonpryor@vt.edu>
689 * sys-mman.c: Check for presence of mremap and remap_file_pages.
691 2005-06-05 Jonathan Pryor <jonpryor@vt.edu>
693 * map-icalls.h, map.h: Change header comment so it matches what
694 `make refresh` generates.
695 * map.c: Add <sys/xattr.h> header.
697 2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
699 * sys-mman.c: Add wrappers for mmap, munmap, mprotect, msync, mlock,
700 munlock, mremap, mincore, remap_file_pages.
701 * map-icalls.h: Update to latest shared interface.
702 * map.c, map.h: Add {To,From} pairs for MmapFlags, MmapProt, MsyncFlags,
703 MlockallFlags, MremapFlags.
704 * mph.h: Add mph_return_*_if_ssize_t_overflow macros.
706 2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
708 * unistd.c: Oops -- deal with s/LockFlags/LockfCommand/ change.
710 2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
712 * map.h, map.c, map-icalls.h: Rename LockFlags to LockfCommand.
714 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
716 * Makefile.am (MPH_C_SOURCE): Add map-icalls.h. Fixes #75012.
718 2005-05-18 Jonathan Pryor <jonpryor@vt.edu>
720 * map-icalls.h: Added; auto-generated file which contains Mono_Posix_*
721 declarations for DllImport functions in Mono.Posix.dll. This ensure
722 consistency between Mono.Posix.dll and MonoPosixHelper.so.
723 * mph.h: Add include for map-icalls.h, to ensure that all MonoPosixHelper
724 exports have correct prototypes.
725 * dirent.c, grp.c, macros.c, pwd.c, signal.c, stdio.c, sys-stat.c,
726 sys-time.c, utime.c: Correct prototypes to match map-icalls.h. Alas, this
727 "loses" information -- FILE* becomes void*, etc. -- but no semantics or
728 ABI should be changed (except for Mono_Posix_Syscall_utime). Some
729 structure names also changed to match the generated names; since the
730 structures are private, this shouldn't break anything.
731 * errno.c: Remove Mono_Posix_Syscall_SetLastError so we don't get a warning
732 about a missing prototype. This was never in a stable release.
733 * old-map.c: Include mph.h for prototype checking.
734 * unistd.c: SeekFlags conversion is now done in managed code so that a short
735 isn't passed as a parameter; Correct prototypes to match map-icalls.h.
736 * sys-xattr.c: fix lsetxattr/fsetxattr confusion; Correct prototypes to
738 * sys-sendfile.c: Move mph.h include so that HAVE_SYS_SENDFILE_H is used.
739 * sys-wait.c: Include mph.h so that prototypes are checked.
741 2005-05-16 Jonathan Pryor <jonpryor@vt.edu>
743 * sys-statvfs.c: Include "map.h" for Mono_Posix_ToMountFlags prototype.
744 * map.c: Include <sys/statvfs.h> so Mono_Posix_{To,From}MountFlags actually
745 does something useful.
747 2005-05-12 Jonathan Pryor <jonpryor@vt.edu>
749 * map.c, map.h: Add FromMountFlags, ToMountFlags. (MountFlags is used in
750 `struct statvfs', which is POSIX).
751 * sys-statvfs.c: Use ToMountFlags to convert the OS flags value into the
754 2005-05-03 Geoff Norton <gnorton@customerdna.com>
756 * sys-xattr.c: Mac OS/X Tiger supports xattr but has a different API for supporting
757 resource forks. Allow mono to build on Tiger.
759 2005-04-30 Jonathan Pryor <jonpryor@vt.edu>
761 * stdio.c: Add Mono_Posix_Stdlib_DumpFilePosition, which create a hex string
762 "dump" of a fpos_t. This is used for Mono.Unix.FilePosition.ToString().
764 2005-04-19 Jonathan Pryor <jonpryor@vt.edu>
766 * map.c, map.h: Added XattrFlags values, functions.
767 * sys-xattr.c: Added; <sys/xattr.h> wrapper functions. Thanks to Daniel
768 Drake for writing these.
769 * Makefile.am: Add sys-xattr.c to the build.
771 2005-04-07 Jonathan Pryor <jonpryor@vt.edu>
773 * errno.c: Use the GNU version of strerror_r if _GNU_SOURCE is defined
774 (otherwise assume existence of XPG variant). This allows proper
775 compilation under Red Hat 9.
776 * fstab.c: protect against users calling setfsent(), setfsent(), ...
777 endfsent(), which would otherwise leak a FILE handle.
779 2005-04-05 Zoltan Varga <vargaz@freemail.hu>
781 * mph.h: Apply patch from the freebsd ports collection.
783 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
785 * zlib_macros.c (create_z_stream): Explicitly check for older versions
788 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
790 * pwd.c (Mono_Posix_Syscall_getpwnam_r): Add another part missing from the last patch.
792 2005-02-07 Jonathan Pryor <jonpryor@vt.edu>
794 * grp.c: Oops. Didn't see other Solaris fix in #72292.
796 2005-02-07 Jonathan Pryor <jonpryor@vt.edu>
798 * grp.c, pwd.c: Clear errno before calling the actual calls, as errno may
799 have a stale value, leading to spurious errors later. Fixes #72292.
801 2005-02-03 Jonathan Pryor <jonpryor@vt.edu>
803 * Makefile.am (MPH_C_SOURCE): Move errno.c into MPH_C_SOURCE, so it's built
804 on Windows as well as Unix.
806 2005-02-03 Jonathan Pryor <jonpryor@vt.edu>
808 * errno.c: Mono_Posix_Syscall_SetLastError should be in Stdlib, not Syscall,
809 since it's part of ANSI C (and errno will be used from StdioFileStream).
810 Add Mono_Posix_Stdlib_SetLastError. Don't remove the Syscall version, as
811 we don't want to break Mono 1.1.4/svn users the day after release. :-)
813 2005-01-25 Jonathan Pryor <jonpryor@vt.edu>
815 * macros.c: Use gint64, not long, to match C# declaration. Fixes 71152.
817 2005-01-23 Geoff Norton <gnorton@customerdna.com>
819 * dirent.c: Include <unistd.h> to bring off_t in on gcc4.0+OSX
821 2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
823 * map.h: Correct Mono_Posix_OpenFlags values (they should now match
824 x86 linux); remove unused enumerations (MountFlags, etc.).
826 2005-01-13 Jonathan Pryor <jonpryor@vt.edu>
828 * fstab.c: Fix HPUX support. HPUX includes both <fstab.h> and
829 <checkpoint.h>, so we need to give preference to <checkpoint.h>.
831 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
833 * fstab.c: Add support for HPUX, which uses <checklist.h>.
835 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
837 * map.c: Continuing my ineptitude... <sys/wait.h> isn't on Win32.
838 * mph.h: Win32 doesn't define EOVERFLOW, either. Define it.
840 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
842 * map.c: Include <config.h> so we can check for PLATFORM_WIN32.
844 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
846 * map.c: Fix Win32 build break. Win32 doesn't have all the sys/* headers.
848 2005-01-05 Jonathan Pryor <jonpryor@vt.edu>
850 * serial.c: HPUX compiler fix.
851 * stdlib.c: Add C-defined macro wrappers.
853 2005-01-04 Jonathan Pryor <jonpryor@vt.edu>
855 * stdio.c: Add wrapper for C99's snprintf(3).
857 2005-01-04 Jonathan Pryor <jonpryor@vt.edu>
859 * Makefile.am: Rewrite. Remove configure-generated warnings about
860 multiple _LIBADD and _SOURCES lines. Add support for Win32.
861 Win32 support is limited to ANSI C functions.
862 * stdio.c: Don't compile Unix wrappers on Win32.
864 2005-01-04 Raja R Harinath <rharinath@novell.com>
866 * Makefile.am (LIBS): Remove. Was overriding results of configure check.
867 (libMonoPosixHelper_la_LIBADD): List $(GLIB_LIBS) here.
869 2005-01-04 Jonathan Pryor <jonpryor@vt.edu>
871 * Makefile.am: Add libnsl to LIBS. Hopefully this will let sparc link.
872 * mph.h: Make MPH_INTERNAL conditional on __GNUC__.
874 2005-01-03 Jonathan Pryor <jonpryor@vt.edu>
876 * signal.c, stdio.c: Remove "function declaration isn't a prototype" warnings.
877 * unistd.c: Check for presence of gethostname and sethostname.
879 2005-01-03 Jonathan Pryor <jonpryor@vt.edu>
881 * mph.h, x-struct-str.c: Add "const" to parameters to remove
882 "warning: passing arg [2|4]...discards qualifiers" message.
884 2005-01-03 Jonathan Pryor <jonpryor@vt.edu>
886 * fstab.c: Remove some sparc compiler warnings.
888 2005-01-03 Jonathan Pryor <jonpryor@vt.edu>
890 * fstab.c: Solaris doesn't support getfsent(3), but it provides equivalent
891 functionality in getvfsent(3C). Implement Solaris support.
893 2005-01-02 Jonathan Pryor <jonpryor@vt.edu>
895 * stdio.c: More wrapper functions. I missed a few macros... This should
896 complete all macro's defined in <stdio.h> for C99.
898 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
900 * stdio.c: More wrapper functions. This should complete C89's <stdio.h>
903 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
905 * sys-statvfs.c: Further proving that changing code without compiling is
906 dangerous business... Compiler fix for OS X.
908 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
910 * signal.c: Mac OS X portability fixes -- it doesn't provide sighandler_t!
912 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
914 * Makefile.am: Add signal.c to the build.
915 * signal.c: Added. Contains helper functions to wrap signal(2).
917 2004-12-30 Jonathan Pryor <jonpryor@vt.edu>
919 * sys-statvfs.c: Fix Mac OS X build (statfs.f_frsize doesn't exist on OSX;
920 f_fsid isn't an integral type; fstatfs needs to use fpathconf).
922 2004-12-29 Jonathan Pryor <jonpryor@vt.edu>
924 * unistd.c: Null-terminate the string returned by readlink(2). This works
925 around a marshaler "issue".
927 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
929 * Makefile.am: Add GLIB_LIBS to the LIBS line, since we require linking
930 against glib-2.0 (to use g_assert()).
932 2004-12-28 Jonathan Pryor <jonpryor@vt.edu>
934 * fstab.c: Added; wrap <fstab.h> functions: getfsent(3), getfsfile(3),
936 * map.c: Add new conversion functions for SyslogOptions, SyslogFacility,
937 SyslogLevel; see syslog(3) for details.
938 * map.h: Add new conversion functions and values for SyslogOptions,
939 SyslogFacility, SyslogLevel; see syslog(3) for details.
940 * Makefile.am (MPH_SOURCE): add fstab.c, sys-statvfs.c, x-struct-str.c.
941 * mph.h: Document location for Mac OS X man page documentation; add
942 MPH_INTERNAL macro for intra-library function calls (for functions that
943 shouldn't be exported from libMonoPosixHelper.so); declare
944 _mph_copy_structure_strings().
945 * pwd.c: Use _mph_copy_structure_strings() to copy strings embedded within
947 * sys-statvfs.c: Added; wrap <sys/statvfs.h> functions statvfs(2),
948 fstatvfs(2), and (to complicate things) implement (f)statvfs(2) in terms
949 of (f)statfs(2) on Mac OS X (which lacks the -vfs calls).
950 * x-struct-str.c: implements _mph_copy_structure_strings(), which is a
951 generalized interface to copy strings between structures (as is needed in
954 Thu Dec 23 14:58:09 EST 2004 Paolo Molaro <lupus@ximian.com>
956 * serial.c: remove mono calls from here: they break the build
957 and they don't belong here.
959 2004-12-21 Chris Toshok <toshok@ximian.com>
961 * serial.c: initial import of System.IO.Ports pinvoke stuff.
963 * Makefile.am (MPH_SOURCE): add serial.c.
965 2004-11-30 Jonathan Pryor <jonpryor@vt.edu>
967 * mph.h: Use <glib.h>, not <glib/gtypes.h>, as the HP/UX compiler needs
968 <glib/gutils.h> to handle the `inline' keyword.
970 2004-11-27 Miguel de Icaza <miguel@ximian.com>
972 * Makefile.am (MPH_SOURCE): Add macros.c for compatibility with
973 the old API (currently the old API would fail).
975 2004-11-25 Raja R Harinath <rharinath@novell.com>
977 * Makefile.am (MPH_SOURCE): Distribute old-map.h and map.h.
979 2004-11-18 Jonathan Pryor <jonpryor@vt.edu>
981 * stdio.c: Add fread(3) and fwrite(3) wrappers.
983 2004-11-16 Jonathan Pryor <jonpryor@vt.edu>
985 * Makefile.am: Remove sys-mount.c from the build.
986 * sys-mount.c: Delete. We're not exporting mount-related functionality
987 anymore. It's not remotely portable, and trying to make it portable is a
989 * map.c: Remove mount- and umount-related conversion functions.
991 2004-11-14 Geoff Norton <gnorton@customerdna.com>
993 * mph.h: Revernt jonp's removal of MPH_ON_BSD define as sys-mount.c
994 and unistd.c still check this configuration value. This allows mono
995 to build on *BSD again.
997 2004-11-12 Jonathan Pryor <jonpryor@vt.edu>
999 * dirent.c: Only access members which exist on the target
1001 * errno.c: Only export strerror_r if it's available.
1002 * mph.h: Remove MPH_ON_BSD; use the configure checks instead.
1003 * sys-mman.c: Only export posix_madvise if it's available.
1004 * unistd.c: Only export sethostid if it's available.
1006 2004-11-08 Jonathan Pryor <jonpryor@vt.edu>
1008 * Makefile.am: Add sys-sendfile.c to the build.
1009 * dirent.c, fcntl.c, unistd.c: Remove
1010 compile-time checks for -64 apis (pread64, etc.), as they're
1011 superfluous. GLibc #defines the functions to the appropriate
1012 -64 counterpart when necessary, and Darwin is intrinsically
1013 large-file-aware, so manual checking on my part is redundant and
1015 * grp.c: Add checks for non-portable functions getgrnam_r,
1017 * pwd.c: Add checks for non-portable functions getpwnam_r,
1019 * map.c: Remove <poll.h> include. Building on Tiger (Mac
1020 OS X 10.4 beta) breaks when both <poll.h> and <sys/poll.h> are
1021 included, so only use <sys/poll.h>.
1022 * mph.h: Clean up macro handling for type overflow checking.
1024 2004-11-05 Jonathan Pryor <jonpryor@vt.edu>
1026 * .cvsignore: Ignore generated files.
1027 * Makefile.am: Add new INCLUDE directives (for glib
1028 headers), source; bump library version (so we don't clobber
1029 previous versions of libMonoPosixHelper.so).
1030 * dirent.c: New file; <dirent.h> wrapper functions;
1031 BSD portability fixes.
1032 * errno.c: New file; <errno.h> wrapper functions
1033 * fcntl.c: New file; <fcntl.h> wrapper functions;
1034 BSD portability fixes.
1035 * grp.c: New file; <grp.h> wrapper functions;
1036 BSD portability fixes.
1037 * map.c: Updated macro mapping functions (more enums
1038 mapped, more error checking, etc.).
1039 * map.h: Updated macro mapping functions
1040 * old-map.c: Previous map.c implementation, for backward
1041 compatibility Remove spurious warning about redefining
1043 * old-map.h: Previous map.h implementation, for backward
1045 * mph.h: New file; Utility types, macros;
1046 BSD portability fixes.
1047 * pwd.c: New file; <pwd.h> wrapper functions;
1048 BSD portability fixes.
1049 * stdio.c: New file; <stdio.h> wrapper functions
1050 * stdlib.c: New file; <stdlib.h> wrapper functions
1051 * sys-mman.c: New file; <sys/mman.h> wrapper functions
1052 * sys-mount.c: New file; <sys/mount.h> wrapper functions;
1053 BSD portability fixes.
1054 * sys-sendfile.c: New file; <sys/sendfile.h> wrapper
1055 functions; BSD portability fixes.
1056 * sys-stat.c: New file; <sys/stat.h> wrapper functions
1057 * sys-wait.c: New file; <sys/wait.h> wrapper functions
1058 * time.c: New file; <time.h> wrapper functions;
1059 BSD portability fixes.
1060 * unistd.c: New file; <unistd.h> wrapper functions;
1061 BSD portability fixes.