[cfe-dev] using clang on unionfs on mac

Eli Friedman eli.friedman at gmail.com
Thu Nov 29 20:02:02 PST 2012


On Thu, Nov 29, 2012 at 9:58 AM, Yingshen Yu <yingshen.yu at gmail.com> wrote:
> Hi,
> I'm trying to use unionFS-FUSE with fuse4x, which is to overlay a writable directory onto a read-only source directory.
> both the writable and the read-only source directory are on a real HFS+ case insensitive volume.
>
> clang worked well but for one issue,  it seems becoming case sensitive to header file includes. so
> #include "Foo.h"
> #include "foo.h"  // assuming Foo.h has #pragma once
>
> actually includes both copies. This doesn't occur if I compile on source directory directly.
>
> My understanding is, whether the two files should be treated as one file or two different file is depend on the underlying file system case sensitiveness.
> so I guess clang can determine underlying FS is case sensitive or not, can anyone explain how it determines this?

clang doesn't directly query whether a filesystem is case-sensitive.
The way clang determines if two different names refer to the same file
is based on the inode returned by stat().  It's possible that your
FUSE filesystem is somehow messing up the invariant that each file has
a unique inode.

-Eli



More information about the cfe-dev mailing list