#define _REENTRANT 1 (needed to get the right errno on some OSs)
authorSimon Marlow <simonmar@microsoft.com>
Thu, 18 May 2006 10:41:51 +0000 (10:41 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 18 May 2006 10:41:51 +0000 (10:41 +0000)
Part 2 of the fix for threaded RTS problems on Solaris and possibly
*BSD (Part 1 was the same change in ghc/includes/Rts.h).

include/HsBase.h

index 143b29d..682d808 100644 (file)
 #undef PACKAGE_TARNAME
 #undef PACKAGE_VERSION
 
+/* Needed to get the macro version of errno on some OSs (eg. Solaris).
+   We must do this, because these libs are only compiled once, but
+   must work in both single-threaded and multi-threaded programs. */
+#define _REENTRANT 1
+
 #include "HsFFI.h"
 
 #include <stdio.h>