Issue 5319 - rt.critical/monitor: Add support for Solaris
Summary: rt.critical/monitor: Add support for Solaris
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All Solaris
: P2 normal
Assignee: Sean Kelly
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-12-04 14:02 UTC by Iain Buclaw
Modified: 2011-02-07 09:29 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2010-12-04 14:02:41 UTC
Patch:

--- druntime-trunk~/src/rt/critical.c	2010-08-05 09:59:36.000000000 +0100
+++ druntime-trunk/src/rt/critical.c	2010-12-04 21:45:34.417486613 +0000
@@ -82,7 +82,7 @@
 
 /* ================================= linux ============================ */
 
-#if linux || __APPLE__ || __FreeBSD__
+#if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4
 
 #include <stdio.h>
 #include <stdlib.h>
--- druntime-trunk~/src/rt/monitor.c	2010-08-05 09:59:36.000000000 +0100
+++ druntime-trunk/src/rt/monitor.c	2010-12-04 21:42:17.513486612 +0000
@@ -15,7 +15,7 @@
 #include <assert.h>
 
 #if _WIN32
-#elif linux || __APPLE__ || __FreeBSD__
+#elif linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4
 #define USE_PTHREADS    1
 #else
 #endif
Comment 1 Brad Roberts 2011-02-06 23:31:38 UTC
https://github.com/D-Programming-Language/druntime/commit/1a7482679b8cf5df10d3b002beb51a285764a2a7

I used the version identifier that dmd uses, "Solaris".  I hope that's what GDC and LDC use.
Comment 2 Brad Roberts 2011-02-06 23:32:56 UTC
And the same change to critical_.d:

https://github.com/D-Programming-Language/druntime/commit/f33862c7b6084af61e79f6ab73ff86d97833221b
Comment 3 Iain Buclaw 2011-02-07 09:29:23 UTC
Solaris isn't supported in core.sys.posix.pthreads though, is it? (Admittedly I have a largely unfinished patch to add Solaris support in druntime lingering in a VM somewhere, so maybe not too much of a worry).

Regards