#define _REENTRANT 1 (needed to get the right errno on some OSs)
[ghc-base.git] / 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>