This is an archive of the discontinued LLVM Phabricator instance.

[Solaris] Fix PR33228 - llvm::sys::fs::is_local_impl done right
ClosedPublic

Authored by fedor.sergeev on May 30 2017, 2:20 PM.

Details

Summary

Solaris-specific implementation for llvm::sys::fs::is_local_impl.
FStype pattern matching might be a bit unreliable, but at least it fixes the build failure.

Diff Detail

Event Timeline

fedor.sergeev created this revision.May 30 2017, 2:20 PM
krytarowski added a comment.EditedMay 30 2017, 3:44 PM

Illumos uses __sun, not __sun__. I know that __something__ is more POSIX friendly, but does it handle only commercial Solaris? What version?

fedor.sergeev added a comment.EditedMay 30 2017, 3:51 PM

Illumos uses __sun, not __sun__. I know that __something__ is more POSIX friendly, but does it handle only commercial Solaris? What version?

gcc on Solaris 10/11 sparc/intel specifies both __sun and __sun__.
I can see __sun being used in llvm sources once, but none of __sun__.
I will switch to __sun.

fedor.sergeev updated this revision to Diff 100794.EditedMay 30 2017, 3:57 PM

__sun__ -> __sun

Looks correct, in theory f_flag could be investigated, but there are no exported values to userspace.

The same solution is used in LibreOffice: https://github.com/LibreOffice/core/blob/35f3759e5ca44bc7bc8f275833e1be54494c5ff3/sal/osl/unx/file_volume.cxx#L177

I don't see a better way to handle it.

krytarowski accepted this revision.May 31 2017, 5:35 AM
This revision is now accepted and ready to land.May 31 2017, 5:35 AM
krytarowski added inline comments.May 31 2017, 5:36 AM
lib/Support/Unix/Path.inc
387

This is true at least for Illumos.

I'm new to all this process/machinery, what should be my next action?
How integration is done for the change that is "Reviewed"?

thanks,

Fedor.

I can commit it within 24h if nobody will complain.

krytarowski closed this revision.Jun 1 2017, 5:57 AM