D-Programming-Language/druntime — pull request #303 by alexrp (2012-09-13 05:45:55+00:00)
Title: Some Solaris port updates.

Here's the beginning of a proper Solaris port of druntime:

* Makes posix.mak understand Solaris, SunOS (and OpenBSD; consistent with DMD's posix.mak).
* Fixes (hopefully) root registration of the data segment(s). The previous method was incorrect as `extext` is not the beginning of the data segment on Solaris.
* Adds a `_main` function when building on Solaris. I'm not entirely sure why this is needed (it doesn't even seem to be called anywhere). But druntime doesn't build without it.
* Adds thread stack bottom detection for Solaris.
* Fixes an import error in `gc.gcalloc` that only happened on Solaris.
* Adds Solaris-specific declarations to many `core.stdc` and `core.sys.posix` modules.
* Fixes a minor typo in `netent`.
* Adds some missing declarations for other OSs that I happened to come across.
* Fixes some build errors in `rt.deh2` when building with `-debug`.

This not a complete port; some things are still broken (I'm seeing some libpthread-related crashes in single-threaded scenarios) and missing (in the `core.stdc` and `core.sys.posix` packages).