This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: #import future (summary and proposed solutions)


> 11) Change #import as follows:
> 
>     Create a normalized version of the include file nams, such that every
>     symlink therein is resolved, and that if a part of the name is on a
>     case insensitive filesystem (I hope MacOS X has a way to find that
>     out) it is replaced by a canonicalized (probably lowercased) version.
>     (This should also be possible on other case-ignoring systems like
>     Windows or DOS.)
> 
>     Then, define #import to use that normalized filename as file identity.
> 

As far as I know, identifying files with their paths (no matter how much
normalized they are) is not usually correct - usually you identify files
with inodes.

In fact, I don't understand how your solution would manage hard links.

If /home/nicola/B.h is a hard link to /home/nicola/A.h (that is, they have
different names on disk, but they are the same inode/file), then

#import "A.h"
#import "B.h"

wouldn't work properly, because it would include the file twice (since A.h
and B.h have different paths on disk), while it should include it only
once, because they are the same file.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]