[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: root-dev-ino.c limitation
From: |
Eric Blake |
Subject: |
Re: root-dev-ino.c limitation |
Date: |
Mon, 27 Feb 2006 05:32:48 +0000 |
> So cygwin has are two root directories, / and //, with distinct dev/inode
> pairs?
Yes, as allowed by POSIX.
> If so, then we may need a new type that corresponds to a single
> pair on Unix-like systems, and to two dev/ino pairs on cygwin -- which
> is needed would be selected at configure time.
My already-proposed patch to fix basename/dirname introduced
DOUBLE_SLASH_IS_DISTINCT_ROOT, which sounds like the
right macro to base this decision on. Note, however, that while
native compiles always define the macro correctly, a cross-compile
must be pessimistic and assume that // might be distinct from /
unless taught otherwise from config.cache, since there is no
compile time test that will expose the target's file system
characteristics in relation to / vs. // (at least not that I could
come up with).
>
> It is not appropriate to change the dev_ino type, because it is used in
> other contexts where the added space would be a pointless waste.
Agreed, and I was planning on introducing a new type to
store info on a doubled root. I'll work on a patch, and propose
it once I get it hammered out alongside a repost of my
basename/dirname patch.
--
Eric Blake