mono/mono — pull request #555 by jack-pappas (2013-02-10 00:47:29+00:00)
Title: Fix sigaltstack on BSD

Linux uses some specific behavior for sigaltstack, whereas OS X and FreeBSD (and likely the other BSDs) use the default flag value of 0. This fix changes the conditional macro to check for __linux__ instead of __APPLE__, so that Linux can use the appropriate flag and other platforms can use the default.

As this change allows sigaltstack to work correctly on BSDs, I've removed the explicit `sigaltstack=no` setting for FreeBSD so it is enabled automatically when supported by the system. It is likely that sigaltstack now works on the other BSDs, but since I haven't had a chance to test them yet, I left their settings as-is.

This change has been tested (with the standard test suite, via `make check`) on FreeBSD 9.1 (i386, amd64) and Ubuntu 12.04.1 (i386), and all but 2 tests pass on both platforms.