[project @ 2002-07-04 12:57:39 by simonmar]
authorsimonmar <unknown>
Thu, 4 Jul 2002 12:57:39 +0000 (12:57 +0000)
committersimonmar <unknown>
Thu, 4 Jul 2002 12:57:39 +0000 (12:57 +0000)
We have to define _POSIX_PTHREAD_SEMANTICS on Solaris in order to get
the right versions of the _r functions.  Otherwise we get
Solaris-specific versions of these, which puts a spanner in the works.

Fixes problems with getDirectoryContents on Solaris in the HEAD.

include/HsBase.h

index f15fc83..1070aac 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: HsBase.h,v 1.7 2002/04/02 15:33:34 sof Exp $
+ * $Id: HsBase.h,v 1.8 2002/07/04 12:57:39 simonmar Exp $
  *
  * (c) The University of Glasgow 2001-2002
  *
 #include "config.h"
 #include "HsFFI.h"
 
+// The following is required on Solaris to force the POSIX versions of
+// the various _r functions instead of the Solaris versions.
+#ifdef solaris_TARGET_OS
+#define _POSIX_PTHREAD_SEMANTICS
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>