Sigh, enabling _POSIX_PTHREAD_SEMANTICS causes the Solaris header
files to drop several silly little C functions into the source code.
We don't want these duplicated in every Haskell-compiled object.
So plan B: just define _POSIX_PTHREAD_SEMANTICS in dirUtils.c where it
is needed to make readdir_r work. I've checked, and readdir_r is the
only function we use that is affected by _POSIX_PTHREAD_SEMANTICS. If
we ever use any more of these functions, then we'll have to be careful
to give them a C wrapper.
*
* Directory Runtime Support
*/
+
+#include "config.h"
+
+// The following is required on Solaris to force the POSIX versions of
+// the various _r functions instead of the Solaris versions.
+#ifdef solaris2_TARGET_OS
+#define _POSIX_PTHREAD_SEMANTICS
+#endif
+
#include "HsBase.h"
#if defined(mingw32_TARGET_OS)
/* -----------------------------------------------------------------------------
- * $Id: HsBase.h,v 1.8 2002/07/04 12:57:39 simonmar Exp $
+ * $Id: HsBase.h,v 1.9 2002/07/04 13:33:25 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>