Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-27Improve build and configureCalvin
* detect sys/errno.h * Fix errenous LIBS in haiku * use HAVE_MINCORE
2017-02-27Get support libraries compilingCalvin
These return no-ops, but its enough to make it happy
2017-02-01Fixes the Mono.Posix API breakage introduced in #3985Niklas Therning
Also reverts the changes done to support/map.c. This is a generated file which shouldn't be changed directly. An alternate fix for the problem in map.c on Windows was to make sure L_SET et al are defined in mph.h which was already done for Solaris.
2017-01-23Fix a few cppcheck errors (#4281)Alexander Köplinger
* [zlib] Fix CppCheck error "Shifting a negative value is undefined behaviour" This matches what upstream now does: https://github.com/madler/zlib/blob/2edb94a3025d288dc251bc6cbb2c02e60fbd7438/inflate.c#L1529 * [scripts] Fix CppCheck error "Memory leak: nargv" * [tests] Fix CppCheck error: "Memory leak: reference" * [aot-compiler] Fix CppCheck error: "Resource leak: infile" * [metadata] Fix CppCheck error: "Uninitialized variable: ret"
2017-01-21[io-layer] Extract error (#4279)Ludovic Henry
* [file] Remove dead field * [process] Remove wapi_getpid * [process] Remove CloseHandle * [io-layer] Remove dead MONO_TRACE * [io-layer] Extract error * [io-layer] Extract wapi.h * [io-layer] Remove the io-layer
2016-11-18Merge pull request #3985 from ntherning/fix-Mono.Posix-on-windowsNiklas Therning
Fix Mono.Posix tests on Windows
2016-11-18Fixes compile error in support/stdio.c on XANiklas Therning
2016-11-17Fix Mono.Posix tests on WindowsNiklas Therning
Cleaned up Mono_Posix_FromSeekFlags() in support/map.c. It didn't properly handle the case when L_INCR, L_SET, L_XTND aren't available, like on Windows. Added Mono_Posix_Stdlib_GetLastError() to support/errno.c and changed Stdlib.GetlastError() use it. Without this Stdlib.GetlastError() wouldn't take errno in the C runtime used by libMonoPosixHelper.dll into account. On Windows the Syscall class failed to initialize due to missing functions, e.g. Mono_Posix_Syscall_get_at_fdcwd(), in libMonoPosixHelper.dll. Those readonly static fields which were initialized at class initialization have now been converted to static readonly properties so that the Syscall class can be initialized despite those functions not being defined. Cleaned up temp file handling in StdioFileStreamTest to avoid failures due to sharing violations on Windows. Fixed a bug in the StdioFileStreamTest.Write() test method when reading back the batch of bytes written in the second part of the test. Enabled the Mono.Posix test suite to run on PR builds. This test suite should from now on be green.
2016-11-16Prevent Mono.Posix from using multiple C runtimes on WindowsNiklas Therning
Since libMonoPosixHelper.dll is linked against ucrtbase.dll the C runtime wrapper functions in it will call into ucrtbase.dll. Some pinvokes in Mono.Unix.Native.Stdlib, however, bind directly to C runtime functions in msvcrt. This is problematic if a resource (heap memory, file pointer, etc) is allocated using one C runtime and then operated upon using funcitons form the other C runtime. E.g., Stdlib.malloc() calls into a wrapper in libMonoPosixHelper so it will use the ucrtbase heap while Stdlib.free() calls directly into msvcrt's free() which will abort the process since it's called with a pointer in an unknown heap. This commit adds libMonoPosixHelper wrappers for all memory and file related functions in Stdlib to ensure that all such functions use the same C runtime. Some of the Mono.Posix tests still fail but at least the test suite doesn't crash after this change. The test failures will be addressed in a future PR.
2016-10-28[System.IO.Compression] Fixed potential bug when keeping track of total read ↵Joao Matos
bytes of input stream. This didn't manifest as a bug, to to be on the safe side, replicate the behavior introduced in https://github.com/mono/mono/commit/b4d5016b5e42fec226d93fd13260b6cac80eb384 and use the same approach when calculating the total of the read bytes of the input stream.
2016-10-28[System.IO.Compression] Fixed DeflateStream input stream EOF condition.Joao Matos
What was happening is that we set the stream EOF flag to true when we could not read any more input data, and that made us early out before fully finishing the processing of the compressed data. Now the only EOF flag is set to true is if zlib's inflate() has actually finished processing the data. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44994#c2.
2016-10-27[System.IO.Compression] Fixed DeflateStream inflate() decompression loop.Joao Matos
This reworks the fix from https://github.com/mono/mono/commit/7c4d41a518aaf0370b882f9430752ebcd5544c10. That fix introduced a regression when handling some inputs, which lead us to ignore some left-over data from zlib's inflate output buffer. Now we only break from the loop if inflate() returns Z_BUF_ERROR. This makes sure all data is fully processed before returning to managed code. Fixes one of the bugs in https://bugzilla.xamarin.com/show_bug.cgi?id=44994#c2.
2016-08-09Define _NETBSD_SOURCE for mincore(2) (#3380)Kamil Rytarowski
2016-04-17Implement mremap(2) usage on NetBSDKamil Rytarowski
The NetBSD version of mremap takes additional argument "newp" to hint new position of a mapped range. void * mremap(void *oldp, size_t oldsize, void *newp, size_t newsize, int flags); -- NetBSD's mremap(2) While Linux by default sets old_address and fails if the resize operation cannot be finished for the original address. void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */); -- Linux's mremap(2) NetBSD offers inversed logic with the MAP_FIXED flag to Linux's MREMAP_MAYMOVE: MAP_FIXED newp is tried and mremap() fails if that address can't be used as new base address for the range. Otherwise, oldp and newp are used as hints for the position, factoring in the given alignment. -- NetBSD's mremap(2) MREMAP_MAYMOVE By default, if there is not sufficient space to expand a mapping at its current location, then mremap() fails. If this flag is specified, then the kernel is permitted to relocate the mapping to a new virtual address, if necessary. If the mapping is relocated, then absolute pointers into the old mapping location become invalid (offsets relative to the starting address of the mapping should be employed). -- Linux's mremap(2) The thing that bothers is calling mremap(2) syntax from Linux "posix", but we cannot do anything with it, for now just simulate the Linux behavior on NetBSD.
2016-02-25Fixed the build.João Matos
2016-02-25[support/zlib] Added API exports to exported calls from zlib-helper.c.João Matos
This is so we can re-use this code from libmonodroid, which currently has its own duplicated copy.
2016-02-25[support/zlib] Remove eglib link dependencies from zlib-helper.c.João Matos
This is so we can re-use this code from libmonodroid, which currently has its own duplicated copy.
2016-02-23[System.IO.Compression.DeflateStream] Fixed end condition in decompression loop.João Matos
Keep track of total bytes read from input stream and break from the loop if it matches the number of bytes inflated by zlib. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=34916.
2016-01-29Remove ChangeLog files from the repoAlexander Köplinger
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-19[Mono.Posix] Add support for sending and receiving socket control messagesSteffen Kieß
Add wrappers for struct cmsghdr, the macros for manipulating control messages (CMSG_*) and recvmsg() and sendmsg().
2016-01-19[Mono.Posix] Fix OSX build break by checking if accept4() is availableAlexander Köplinger
It's a Linux-specific extension and not available on OSX or Linux <2.6.28
2016-01-19Merge pull request #2006 from steffen-kiess/posix-sockets-2Jonathan Pryor
[Mono.Posix] Add wrappers for struct sockaddr_*
2016-01-18[Mono.Posix] Add wrappers for struct sockaddr_*Steffen Kieß
Add wrappers for the sockaddr_* structures and add the syscalls using these structures (bind(), accept(), ...).
2015-12-03Merge pull request #2260 from xmcclure/fix-testwaitanyRodrigo Kumpera
Cleanup and crash fix around UnixSignal.WaitAny (bug #36214)
2015-12-02Cleanup in signal.c and related testsAndi McClure
Add comments, add assert for edge case around signal registration, and make consistent *always* using atomic get/set for memory shared between the signal handler and the threads.
2015-12-02Fail cleanly when MonoPosixHelper.dll version is wrong (bug #35655)Andi McClure
Add version keys to the C and C# versions of Mono.Posix and add static constructors which fail early if the version keys differ.
2015-11-24Spinlock to prevent SIGPIPE in signal.c (bug #36214)Andi McClure
There is a race condition in signal.c where a signal-waiting thread can close the pipe and then the signal handler can try to write to it. Introduce a locking mechanism to prevent this. Separate mph_int_set and mph_int_test_and_set to support the lock code.
2015-11-24Merge pull request #2264 from xmcclure/fix-testwaitany-miniJonathan Pryor
Minimal fix for sporadic Mono.Unix.UnixSignalTest.TestWaitAny crashes (bug #35936)
2015-11-24Don't fsync() on a pipe (causes bug #35936)Andi McClure
fsync() on a file descriptor from a pipe() is invalid, and occasionally crashes on current OS X.
2015-11-23Fix sys-stat.c where a pointer to a mode_t (potentially an int16) was being ↵Andi McClure
unsafely converted to an int32 pointer
2015-09-25[support] Limit possible valuesMarek Habersack
Value returned from the reader function can be negative and ZStream's avail_in should not be less than 0 as that value makes no sense and other parts of code assume it to be equal or higher than 0.
2015-09-11There's no IOKit on the Apple TV.Rolf Bjarne Kvinge
2015-08-28Remove stray ifdefMarek Habersack
2015-08-27[MonoPosixHelper] Fix compilation for Android.Jonathan Pryor
The Android NDK decalres the `struct timeval` struct in <sys/time.h>. Update sys-socket.c to #include <sys/time.h> to fix compilation with the Android NDK.
2015-08-27Merge pull request #1993 from steffen-kiess/posix-sockets-1Jonathan Pryor
Add socket-related functions and data structures to Mono.Posix
2015-08-24Add socket-related functions and data structures to Mono.PosixSteffen Kieß
This commit adds those socket-related functions which do not require the sockaddr_* structures or the msghdr structure.
2015-08-13Posix RTS test fixes and Android compatibilityMarek Habersack
Android's libc (bionic) defines the _GNU_SOURCE macro but fails to adhere to the GNU sematics in (at least) one case - the strerror_r function. The function follows XSI semantics instead of the GNU one which caused our code to segfault on Android. This patch special-cases Android to use the XSI semantics for strerror_r. This un-breaks some POSX real-time singals tests. It also makes provisions for detecting whether the real-time signals are safe to use on the current platform. They are safe for all platforms desktop Mono runs on, but they're not safe on most Android platforms.
2015-07-24[runtime] Workaround lack of signal().João Matos
2015-04-07[System] Fix DeflateStream throw on empty flush, double flush. Fixes #28777Gabriel Garcia
2015-03-30[runtime] Add some complex math support code.João Matos
This is adapted from FreeBSD's code.
2015-03-25[runtime] Fixed complex.h usage in MS's thread pool to work in Android.João Matos
Android does not provide complex.h in the API levels that we compile against so bundle our own header (based on the one from FreeBSD). Turns out GCC already provides built-in handling for the complex functions used by the code so there's no need to provide our own implementations.
2015-02-26Restrict IOKit usage to desktop OSX.Rolf Bjarne Kvinge
IOKit is a private framework in iOS, so it can't be used (and no headers are provided, so it doesn't even compile).
2015-02-26Fixed compilation on Linux targets without `linux/serial.h`.João Matos
/Users/builder/data/lanes/monodroid-mavericks-master/7de6731a/source/mono/support/serial.c:25:26: fatal error: linux/serial.h: No such file or directory #include <linux/serial.h> The header is only available on Android NDK API level >= 21.
2015-02-25[Serial] Add support for high baud rates to MacOSMiguel de Icaza
2015-02-25[serial,signal] Add support for Linux arbitrary baud rates + drop Apple ↵Miguel de Icaza
legacy poll support This patch brings support for arbitrary baud rates in Linux, from patch: https://bugzilla.xamarin.com/show_bug.cgi?id=8207 Which has been MIT licensed (see mono-devel-list). In addition, while testing the patch, discovered that we are using fakepoll.h on MacOS which was there to support Tiger-era broken poll implementations. The details about the lack of poll support come from this document that is now only available on web.archive.org: http://web.archive.org/web/20030604064847/http://developer.apple.com/technotes/tn2002/tn2071.html And the original Mono bug that reported the problem in 2008, followed by the fixes is reported and discussed here: https://bugzilla.novell.com/show_bug.cgi?id=384227 The source of the problem, confirmed by an Apple employee at the time (form the bug) is that poll sometimes results in returning POLLHUP when a POLLIN was expected: http://curl.haxx.se/mail/lib-2005-05/0122.html This web site tracks the behavior of poll (POLLHUP and POLLIN) across Posix implementations when you reach an end of file: http://www.greenend.org.uk/rjk/tech/poll.html
2015-01-19[runtime] Workaround missing net/route.h in iOS SDK.João Matos
2015-01-16[Mono.Posix] Add overloads to pass ints and pointersMiguel de Icaza
2015-01-13[Mono.Posix] Add support for OSX F_NOCACHEMiguel de Icaza
2014-12-16[System.IO.Compression] Fixed DeflateStream native error when handling empty ↵João Matos
input. Bug: https://bugzilla.xamarin.com/show_bug.cgi?id=22346
2014-06-26Remove Mono_Posix_Syscall_utimes_badJonas 'Sortie' Termansen
Welcome to the world of tomorrow! It's been almost a decade since this was made obsolete in 2005. Nothing uses this function any longer. Additionally it is completely broken as utimes takes a pointer to an array with two timevals, but the code passes only a pointer to a single timeval. This change is released under the MIT/X11 license.