Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79484 - in trunk/libs/filesystem: doc src
From: bdawes_at_[hidden]
Date: 2012-07-13 17:02:37


Author: bemandawes
Date: 2012-07-13 17:02:36 EDT (Fri, 13 Jul 2012)
New Revision: 79484
URL: http://svn.boost.org/trac/boost/changeset/79484

Log:
Fix #6659 and #7051, fchmodat supported only on Solaris 11. Disable fchmodat for both Sun and GCC compilers regardless of OS version; a runtime check is too much trouble.
Text files modified:
   trunk/libs/filesystem/doc/release_history.html | 3 +++
   trunk/libs/filesystem/src/operations.cpp | 6 ++++--
   2 files changed, 7 insertions(+), 2 deletions(-)

Modified: trunk/libs/filesystem/doc/release_history.html
==============================================================================
--- trunk/libs/filesystem/doc/release_history.html (original)
+++ trunk/libs/filesystem/doc/release_history.html 2012-07-13 17:02:36 EDT (Fri, 13 Jul 2012)
@@ -49,6 +49,9 @@
   <a href="http://www.boost.org/libs/foreach/">BOOST_FOREACH</a> works.</li>
   <li>Fix a Linux fchmodat problem affecting symlink permissions reported during
   discussion of #6659.</li>
+ <li>Fix #6659 and
+ #7051, fchmodat
+ supported only on Solaris 11. Fix for both Sun and GCC compilers. </li>
 </ul>
 
 <h2>1.50.0</h2>

Modified: trunk/libs/filesystem/src/operations.cpp
==============================================================================
--- trunk/libs/filesystem/src/operations.cpp (original)
+++ trunk/libs/filesystem/src/operations.cpp 2012-07-13 17:02:36 EDT (Fri, 13 Jul 2012)
@@ -1395,7 +1395,9 @@
     else if (prms & remove_perms)
       prms = current_status.permissions() & ~prms;
 
- // Mac OS X Lion and some other platforms don't support fchmodat()
+ // Mac OS X Lion and some other platforms don't support fchmodat().
+ // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher,
+ // and a runtime check is too much trouble.
     // Linux does not support permissions on symbolic links and has no plans to
     // support them in the future. The chmod() code is thus more practical,
     // rather than always hitting ENOTSUP when sending in AT_SYMLINK_NO_FOLLOW.
@@ -1405,7 +1407,7 @@
     // - See the fchmodat() Linux man page:
     // "http://man7.org/linux/man-pages/man2/fchmodat.2.html"
 # if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
- && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5100) \
+ && !(defined(__SUNPRO_CC) || defined(sun)) \
       && !(defined(linux) || defined(__linux) || defined(__linux__))
       if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
            !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))


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