Posix RTS test fixes and Android compatibility
authorMarek Habersack <grendel@twistedcode.net>
Mon, 3 Aug 2015 14:48:25 +0000 (10:48 -0400)
committerMarek Habersack <grendel@twistedcode.net>
Thu, 13 Aug 2015 09:53:28 +0000 (11:53 +0200)
commit7fe7f931887baa2968b081725bb417ebc368dc01
treebcd89e086a554a4798a4b249b07946a272ac7170
parent5511b94946f756c3bcf8b6e51ab28ddf313a4111
Posix RTS test fixes and Android compatibility

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.
mcs/class/Mono.Posix/Mono.Posix_test.dll.sources
mcs/class/Mono.Posix/Mono.Unix.Native/NativeConvert.cs
mcs/class/Mono.Posix/Test/Mono.Unix.Android/TestHelper.cs [new file with mode: 0644]
mcs/class/Mono.Posix/Test/Mono.Unix.Native/RealTimeSignumTests.cs
mcs/class/Mono.Posix/Test/Mono.Unix/UnixSignalTest.cs
support/errno.c