Re: [Boost-bugs] [Boost C++ Libraries] #7440: boost::filesystem compile error on solaris 10

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7440: boost::filesystem compile error on solaris 10
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-04 22:11:20


#7440: boost::filesystem compile error on solaris 10
------------------------------------------------+---------------------------
  Reporter: aleksandar.vukajlovic@… | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------------+---------------------------

Comment (by Derek Beatty <dbeatty@…>):

 Actually the OS, not the compiler or compiler version, determines whether
 or not `fchmodat` is defined, so a better fix is to test against the OS.

 One possible fix is per this diff (relative to boost 1.50.0).
 {{{
 % diff -c libs/filesystem/src/operations.cpp.ori
 libs/filesystem/src/operations.cpp
 *** libs/filesystem/src/operations.cpp.ori Mon Jun 18 04:40:57 2012
 --- libs/filesystem/src/operations.cpp Fri Feb 22 15:00:15 2013
 ***************
 *** 1397,1403 ****

       // Mac OS X Lion and some other platforms don't support fchmodat()
   # if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
 ! && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5100)
         if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
              !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
   # else // fallback if fchmodat() not supported
 --- 1397,1403 ----

       // Mac OS X Lion and some other platforms don't support fchmodat()
   # if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
 ! && (!defined(__SunOS))
         if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
              !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
   # else // fallback if fchmodat() not supported
 %

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7440#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC