Commit Graph
159 Commits
Author SHA1 Message Date
Jonathan Pryor 34cacf1317 * map.h, map.c: Flush; add new ST_NOEXEC, ST_REMOUNT, and ST_BIND MountFlags
enumeration values.

svn path=/trunk/mono/; revision=92275
2008-01-05 12:31:40 +00:00
Jonathan Pryor aaf6f0a816 * map.h: Flush; add Mono_Posix_Syscall__Utsname, Mono_Posix_Syscall_uname()
declarations.
	* Makefile.am: Add sys-utsname.c to the build.
	* sys-utsname.c: Added; binding for uname(2).
	* mph.h: Change definition of _mph_copy_structure_strings() so that the
	  offset array specifies whether the string is a pointer (char*) or inline
	  array (char[]) within the structure.  Necessary because most bound
	  structure string members are pointers, but `struct utsname' uses arrays.
	* fstab.c, pwd.c: Update offset array generation due to above.
	* x-struct-str.c: Update _mph_copy_structure_strings() as above.

svn path=/trunk/mono/; revision=91500
2007-12-17 22:49:20 +00:00
Geoff Norton 6a9029faf5 2007-11-01 Geoff Norton <[email protected]>
* stdio.c:  Handle Leopards lack of L_cuserid.

svn path=/trunk/mono/; revision=88675
2007-11-01 19:04:01 +00:00
Jonathan Pryor 5f70c9f1a3 * stdio.c: Provide errno as a parameter and set errno before calling
perror(3), as errno is cleared during P/Invoke.
	* map.h: Updated prototype for Mono_Posix_Stdlib_perror().

svn path=/trunk/mono/; revision=88161
2007-10-25 14:03:16 +00:00
Miguel de Icaza f7025fccc0 Add support for sending breaks
svn path=/trunk/mono/; revision=87452
2007-10-14 03:08:59 +00:00
Jonathan Pryor 084bcac035 * dirent.c: NAME_MAX isn't defined on Solaris; fix the build.
svn path=/trunk/mono/; revision=85524
2007-09-08 19:07:17 +00:00
Jonathan Pryor 5d29a8bf34 * dirent.c: Fix `struct dirent' overflow on Solaris. See #82678.
svn path=/trunk/mono/; revision=85271
2007-09-04 12:32:25 +00:00
Jonathan Pryor 1465241c54 * dirent.c: Fix logic to determine if readdir_r() succeeded.
Thanks to Albert Lee for the patch; see #82678.

svn path=/trunk/mono/; revision=85252
2007-09-03 23:27:59 +00:00
Wade Berrier 1dae9b6828 2007-08-14 Wade Berrier <[email protected]>
* serial.c: include sys/time.h for mac osx 10.3 for timeval


svn path=/trunk/mono/; revision=84116
2007-08-14 19:38:11 +00:00
Miguel de Icaza c1618ae78e First part of patch for bug #81967,
2007-08-12  Lukasz Byczynski <[email protected]>

	* serial.c:
	
	- all changes are based on Windows .Net SerialPort behavior and
	this
	document: http://www.easysw.com/~mike/serial/serial.html
	- removed wrong default values from open_serial
	- added timeout detection in write_serial
	- added proper parameters setting in set_attributes

svn path=/trunk/mono/; revision=83921
2007-08-12 16:11:08 +00:00
Jonathan Pryor c5a868627a * dirent.c, grp.c, pwd.c, stdio.c, syslog.c, unistd.c: Following in the
logic of the 2007-06-27 logic...  Only return failure if an actual
	  DOCUMENTED error occurred.  For many of these functions, there are no
	  docuemented errors, so they "can't fail," even if errno were set.
	  All praise the POSIX standard?

svn path=/trunk/mono/; revision=81037
2007-06-29 11:28:25 +00:00
Jonathan Pryor 31de07c25b * configure.in: Add a check for `struct utimbuf'; needed by MonoPosixHelper.
* support/map.c, support/map.h: Refresh -- to add Utimbuf copy conversion functions.
	  - Includes latest-and-greatest create-native-map output.
	  - Mono's Reflection output has changed as well --
	    FieldInfo.GetValue().ToString("x") is now "correct" for the underlying
	    type, so `short' enums are 0x0000, etc.
	  - Member sorting is now case-insensitive.

svn path=/trunk/mono/; revision=81002
2007-06-28 20:54:22 +00:00
Jonathan Pryor 81350af83e * grp.c, pwd.c: Only return failure if a documented errno is encountered.
This fixes UnixUserInfo.GetLocalUsers() and UnixGroupInfo.GetLocalGroups()
	  on systems missing the file /etc/default/nss (which generates ENOENT,
	  which isn't documented, so therefore it's not a "real" error).
	* mph.h: Add mph_return_if_val_in_list5().

svn path=/trunk/mono/; revision=80868
2007-06-27 13:43:21 +00:00
Wade Berrier c9756a7bdf * supportw.c (SendMessageA/GetWindowLongA): Return values to fix some
warnings, even though these aren't called (Patch from suse rpms)


svn path=/trunk/mono/; revision=75119
2007-03-29 00:11:34 +00:00
Miguel de Icaza 9cd6a45e87 2007-01-23 Miguel de Icaza <[email protected]>
* serial.c (poll_serial): Fix for #79073, based on the patch by
	Leszek Ciesielski, without introducing a GNU libc-ism.
	(write_serial): Handle EINTR here as well.

svn path=/trunk/mono/; revision=71514
2007-01-23 15:19:58 +00:00
Miguel de Icaza 521d7dde5d This time only use the embedded zlib if we cant find a suitable zlib
svn path=/trunk/mono/; revision=70507
2007-01-04 22:28:51 +00:00
Miguel de Icaza c1b93c0908 Added zlib files to the build, it will be part of MonoSupport
svn path=/trunk/mono/; revision=70501
2007-01-04 20:37:59 +00:00
Jonathan Pryor 4e1892e8eb * map.c: _cnm_return_val_if_overflow() should be a no-op unless DEBUG is
defined.  "Fixes" false positives pending further investigation.

svn path=/trunk/mono/; revision=68770
2006-11-30 19:38:31 +00:00
Miguel de Icaza d7aac05b28 2006-11-18 Miguel de Icaza <[email protected]>
* serial.c (poll_serial): Do not report an error for EINTR. 

svn path=/trunk/mono/; revision=68124
2006-11-18 16:40:25 +00:00
Miguel de Icaza 48082bacde 2006-11-18 Jelle Hissink <[email protected]>
* serial.c (poll_serial): Add timeout parameter to poll.

	Fixes #79722 and #79735

svn path=/trunk/mono/; revision=68123
2006-11-18 16:33:52 +00:00
Jonathan Pryor 9bf5509f91 * map.c: Flush (fix FromFilePermissions for SuppressFlags-marked values).
svn path=/trunk/mono/; revision=68103
2006-11-17 21:33:36 +00:00
Jonathan Pryor b25e68591d * map.c: Flush (removes warnings due to _cnm_return_val_if_overflow()).
svn path=/trunk/mono/; revision=67933
2006-11-15 16:03:37 +00:00
Jonathan Pryor 66cbda12a3 * map.c: Flush (fixes FilePermissions conversion, allowing Syscall.stat() to
work as expected).

svn path=/trunk/mono/; revision=67884
2006-11-15 04:47:32 +00:00
Jonathan Pryor 0d55306d21 * mph.h: Add macro for XATTR_AUTO, so that XattrFlags mapping works (as
XATTR_AUTO is a value which frequently isn't definedy by any OS, yet it
	  has the value 0, a default value which is supported by most OS's).

svn path=/trunk/mono/; revision=67768
2006-11-13 17:05:59 +00:00
Jonathan Pryor 8061464a50 * Makefile.am: Revert addition of L_SET et al; this breaks the Win32 build.
* map.c: Revert addition of L_SET et al; this breaks the Win32 build.
	* mph.h: Add macros for L_SET, L_INCR, and L_XTND for non-Win32 platforms.

svn path=/trunk/mono/; revision=67536
2006-11-08 15:12:06 +00:00
Jonathan Pryor 7e4c7a64a2 * Makefile.am: Add implementation macros for L_SET, L_INCR, and L_XTND.
* map.c: Make sure that L_SET, L_INCR, and L_XTND are defined.  Lets
	  Mono_Posix_FromSeekFlags() work on Solaris, fixing Gnome Bugzilla 370081.

svn path=/trunk/mono/; revision=67502
2006-11-07 23:27:20 +00:00
Jonathan Pryor c0dfc5f803 * stdio.c: Some BSDs define clearerr(3) as a macro, so we need to cast
`stream' to a `FILE*' to avoid derefing a `void*'.
	* sys-statvfs.c: Build fix to support OS X 10.3.9 & systems w/o statvfs(2).

svn path=/trunk/mono/; revision=67254
2006-11-02 03:45:34 +00:00
Jonathan Pryor aa0f7790e5 * configure.in: Add type checks for blkcnt_t, blksize_t, suseconds_t. Some
versions of Mac OS X don't define these, needed by support/map.c.
	* support/mph.h: Add fallback typedefs for blkcnt_t, blksize_t, suseconds_t 
	  so that map.c can rely on their presence.  (Some versions of OS X don't 
	  provide these typedefs.)

svn path=/trunk/mono/; revision=67252
2006-11-02 02:35:09 +00:00
Jonathan Pryor 496103894d * map.c: Improve handling of [Flags] enumerations which mix bitfields and
non-bitfield values (i.e. FilePermissions and S_IFREG, which isn't a bit
	  field, along with a few other FilePermissions values).  Fixes #79161.

svn path=/trunk/mono/; revision=67056
2006-10-28 01:45:44 +00:00
Jonathan Pryor 653f1b75be * configure.in: Add type checks for structs pollfd, stat, timeval, timezone.
This is so that support/map.c can use HAVE_STRUCT_... wrappers around
	  structure conversion functions, allowing them to be omitted from the Win32
	  build.
	* support/map.c: Enclose structure conversion functions with 
	  HAVE_<<STRUCT NAME>>, so that Unix-specific structures don't break the 
	  Win32 build.

svn path=/trunk/mono/; revision=67012
2006-10-26 19:45:14 +00:00
Jonathan Pryor 5d93deb06f * create-native-map.exe: Remove. Just grab a new copy whenever we need to
refresh map.[ch].
	* Makefile.am: Remove `update-create-native-map' target, and just have the
	  `refresh' target grab the latest create-native-map.exe program.
	* map.c: Flush (remove fallback to <inttypes.h> constants).

svn path=/trunk/mono/; revision=67004
2006-10-26 19:00:38 +00:00
Jonathan Pryor e3c3bc994e * create-native-map.exe: Update; Adds support for integral limit fallback.
* map.c: Flush (adds integral limits fallback, so that if G_MININT8 doesn't
	  exist we can fallback sanely instead of breaking the build).

svn path=/trunk/mono/; revision=66995
2006-10-26 16:28:48 +00:00
Jonathan Pryor 1816859727 * Makefile.am: Add "mph.h" to the generated code for map.c, so that
EOVERFLOW is defined on Win32.
	* map.c: Flush (adds #include "mph.h").

svn path=/trunk/mono/; revision=66991
2006-10-26 14:29:02 +00:00
Wade Berrier f474fceb4e * Makefile.am: remove map-icalls.h so make dist succeeds
svn path=/trunk/mono/; revision=66953
2006-10-25 15:11:45 +00:00
Jonathan Pryor 37829d3208 * dirent.c, errno.c, fcntl.c, fstab.c, grp.c, macros.c, pwd.c, signal.c,
stdio.c, stdlib.c, string.c, sys-mman.c, sys-sendfile.c, sys-stat.c, 
	  sys-statvfs.c, sys-time.c, sys-xattr.c syslog.c, time.c, unistd.c, 
	  utime.c: Remove structure definitions, and use the
	  create-native-map generated definitions within map.h.  Update function
	  prototypes to match current map.h declarations.
	* map.c, map.h: Flush (current create-native-map output).
	* mph.h: Don't include "map-icalls.h"; "icalls" are now in map.h.
	* create-native-map.exe: Added; cached version of create-native-map.exe
	  used to update map.c, map.h.  (create-native-map.exe source within
	  mono-tools/create-native-map.)
	* Makefile.am: Added update-create-native-map target to update 
	  create-native-map.exe using pkg-config & the create-native-map.pc package. 
		Use create-native-map.exe to generate map.* files instead of make-map.exe.
	* sys-statvfs.c: Add Mono_Posix_ToStatvfs, Mono_Posix_FromStatvfs exports.

svn path=/trunk/mono/; revision=66946
2006-10-24 22:28:25 +00:00
Miguel de Icaza 9874935dd8 Do not depend on glib/types.h
svn path=/trunk/mono/; revision=66767
2006-10-17 22:32:47 +00:00
Jonathan Pryor f31bb832ad * configure.in: Remove check for setkey(3).
* support/Makefile.am: Remove CRYPT_LIBS use; we no longer rely on libcrypt.
 	* support/stdlib.c: Remove setkey(3) wrapper.
 	* support/unistd.c: Remove encrypt(3) wrapper.

svn path=/trunk/mono/; revision=65458
2006-09-15 14:12:09 +00:00
Miguel de Icaza 9d72c87356 2006-08-13 Miguel de Icaza <[email protected]>
* serial.c (get_bytes_in_buffer): Change the signature, we do not
	return any meaningful error other than -1.

svn path=/trunk/mono/; revision=63687
2006-08-13 21:09:48 +00:00
Zoltan Varga 21512f0b77 2006-06-28 Zoltan Varga <[email protected]>
* mph.h (MPH_INTERNAL): Only use this if HAVE_VISIBILITY_HIDDEN is
	defined since it is not supported on some archs with gcc.

svn path=/trunk/mono/; revision=62099
2006-06-27 22:05:17 +00:00
Wade Berrier 6c9200a7b8 serial.c: Add sys/filio.h for solaris for FIONREAD
svn path=/trunk/mono/; revision=60062
2006-04-28 22:11:12 +00:00
Geoff Norton dea23f2d32 2006-04-20 Geoff Norton <[email protected]>
* serial.c: Change TIOCINQ to FIONREAD to
        fix the build on the *BSDs.  

svn path=/trunk/mono/; revision=59720
2006-04-20 23:19:16 +00:00
Carlos Alberto Cortez 0066b2c837 2006-04-19 Carlos Alberto Cortez <[email protected]>
* serial.c: Added poll_serial () function, to poll
	outside the read_serial () functions; and get_bytes_in_buffer (), to
	get bytes in serialport buffers . Update some functions/enums
	used by System.IO.Port.SerialPort too (Changes aproved by Miguel:
	we will add tests in the managed side).
	

svn path=/trunk/mono/; revision=59625
2006-04-19 08:14:45 +00:00
Carlos Alberto Cortez 1f97e02525 2006-03-22 Carlos Alberto Cortez <[email protected]>
* serial.c: Add get_signal_code, get_signal, and set_signal
	functions to access serial signals. Also add a MonoSerialSignal
	enum, which is a copy of System.IO.Ports.SerialSignal.


svn path=/trunk/mono/; revision=58288
2006-03-22 09:40:27 +00:00
Paolo Molaro ea7839e95f Thu Mar 16 17:27:46 CET 2006 Paolo Molaro <[email protected]>
* serial.c: removed useless serial.h file (it was also
	breaking the build).


svn path=/trunk/mono/; revision=58067
2006-03-16 16:28:48 +00:00
Carlos Alberto Cortez 69e2fc6b7f 2006-03-09 Carlos Alberto Cortez <[email protected]>
* serial.c: Fix a pair of wrong or incomplete assignations
	in set_attributes.
	

svn path=/trunk/mono/; revision=57714
2006-03-09 08:42:07 +00:00
Carlos Alberto Cortez 87f82f506d 2006-02-28 Carlos Alberto Cortez <[email protected]>
* serial.h: New file with serial port constants.
	* serial.c: Use the constants in serial.h instead of magic numbers.
	

svn path=/trunk/mono/; revision=57383
2006-02-28 08:25:00 +00:00
Jonathan Pryor b4bddc0ee4 * configure.in: Add check for lutimes(2). Mac OS X doesn't provide this.
* support/sys-time.c: lutimes(2) only exists on some BSDs.  There's a 
	  configure check for it now -- use it.

svn path=/trunk/mono/; revision=55015
2006-01-03 17:09:52 +00:00
Jonathan Pryor af7de2864c * map-icalls.h: Flush (add utimes_bad, lutimes, futimes).
* sys-time.c: Add lutimes(2) and futimes(2) wrapper.

svn path=/trunk/mono/; revision=54922
2005-12-30 01:35:40 +00:00
Jonathan Pryor 7d03031260 * configure.in: Add check for <sys/mman.h>. Fixes #77091.
Thanks to Ben Gamari for the patch.
	* support/map.c: Include <sys/mman.h>.  Fixes #77091.  Thanks to Ben Gamari.

svn path=/trunk/mono/; revision=54894
2005-12-28 03:25:10 +00:00
Jonathan Pryor 05207de43f * configure.in: Check for setkey(3) in -lcrypt and define CRYPT_LIBS
accordingly.
	* support/Makefile.am: Use $(CRYPT_LIB), not -lcrypt, as not all platforms
	  support -lcrypt.
	* support/stdlib.c: Wrap Mono_Posix_Syscall_setkey() within HAVE_SETKEY, 
	  not PLATFORM_WIN32

svn path=/trunk/mono/; revision=53787
2005-12-01 19:34:09 +00:00