Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63414 - trunk/libs/filesystem/v3/src
From: bdawes_at_[hidden]
Date: 2010-06-28 16:37:58


Author: bemandawes
Date: 2010-06-28 16:37:58 EDT (Mon, 28 Jun 2010)
New Revision: 63414
URL: http://svn.boost.org/trac/boost/changeset/63414

Log:
Tentative fix for 1578
Text files modified:
   trunk/libs/filesystem/v3/src/operations.cpp | 8 ++++++--
   1 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/libs/filesystem/v3/src/operations.cpp
==============================================================================
--- trunk/libs/filesystem/v3/src/operations.cpp (original)
+++ trunk/libs/filesystem/v3/src/operations.cpp 2010-06-28 16:37:58 EDT (Mon, 28 Jun 2010)
@@ -18,8 +18,9 @@
 # define BOOST_SYSTEM_NO_DEPRECATED
 #endif
 
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this
+// Sun must told to use modern semantics for readdir_r. See their readdir_r man page.
+#if defined(__sun)
+# define _POSIX_C_SOURCE 199506L
 #endif
 
 #if !(defined(__HP_aCC) && defined(_ILP32) && \
@@ -75,6 +76,9 @@
 # include <fcntl.h>
 # include <utime.h>
 # include "limits.h"
+# if defined(__sun) && (!defined(_POSIX_PTHREAD_SEMANTICS) || !defined(_REENTRANT))
+# error Library not behaving as specified by Sun's readdir_r man page
+# endif
 
 # else // BOOST_WINDOW_API
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk