Re: [Boost-bugs] [Boost C++ Libraries] #6659: Filesystem compilation broken on Solaris 9 and 10

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6659: Filesystem compilation broken on Solaris 9 and 10
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-13 15:26:20


#6659: Filesystem compilation broken on Solaris 9 and 10
----------------------------------------------+-----------------------------
  Reporter: Vasily Sukhanov <basil@…> | Owner: bemandawes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.49.0 | Severity: Regression
Resolution: | Keywords: compilation
----------------------------------------------+-----------------------------

Comment (by Duncan Exon Smith <duncanphilipnorman@…>):

 Replying to [comment:11 bemandawes]:
> I'd prefer you rework the patch, test it, and resubmit.

 I've put together another patch that avoids `fchmodat()` on Linux (but
 only Linux, this time). Let me argue why:
  - As documented in http://man7.org/linux/man-pages/man7/symlink.7.html,
 Linux does not support changing permissions on symbolic links (look for
 the section "Symbolic link ownership, permissions, and timestamps").
 Based on the documentation, I can't believe they plan to support this in
 the future.
  - I think you're right that if support for `AT_SYMLINK_NOFOLLOW` were
 coming to `fchmodat()`, it would be best to "future proof" by testing for
 support programatically (check for `ENOTSUP` and recall `chmod()`).
  - However, since the limitation of `fchmodat()` is caused by an operating
 system limitation that's unlikely to change, I think it's better to just
 avoid the issue entirely.
  - Let me know what you think.

 This version of the patch (attachment:linux-no_fchmod_at-r79468.patch)
 applies cleanly to the trunk at r79568.
  - It uses the simpler `chmod()` code on Linux.
  - It documents why `fchmodat()` is not being used on Linux.
  - Unlike attachment:boost-1.49.0-dont_use_fchmodat.patch, it '''does
 not''' fix the Solaris issue from the [comment:description], and it also
 '''does not''' fix the related Solaris issue from #7051.

 Finally, I don't have access to a Solaris system for testing.
  - If someone else can figure out the preprocessor code necessary to test
 for Solaris 11, please add it to the patch. I suspect you'll need some
 sort of sun-specific include.
  - Alternatively, if someone on a Solaris 11 or 12 box could run
 attachment:test-fchmodat.cpp to determine if `AT_SYMLINK_NOFOLLOW` is even
 supported, perhaps the fix suggested in #7051 would be appropriate. In
 that case a similar approach to the one I argue for above for Linux
 probably makes sense for Solaris as well (I think you'll just need to add
 `|| defined(sun) || defined(__sun)` to my list, as well as some supporting
 documentation in the comments).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6659#comment:12>
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:10 UTC