Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Unable to read history on latest Cygwin



"Peter A. Castro" wrote:
>On Mon, 14 Dec 2009, Peter Stephenson wrote:
>> On Mon, 14 Dec 2009 15:19:29 +0100
>> "Thorsten Kampe" <thorsten@xxxxxxxxxxxxxxxx> wrote:
>>> "Hardlinks on FAT [...] have been faked in
>>> 1.5 by copying the file. The decision was made a couple of weeks back to
>>> drop this fake since the application should know that the underlying
>>> filesystem is not capable of creating hardlinks."
>>
>> I presume that means symlink() works OK?  We should probably be able to do
>> something relatively straightforward like the following---using exactly the
>> same code for symbolic links as hard links, most of the change is indenting
>> code---though I've only checked it to the extent that it doesn't screw up
>> somewhere that does support hard links.
> 
> There is another option to consider here: not using link().
> 
> The hist code has an alternative code path if link() is not available
> (#ifdef HAVE_LINK), and it appears this is the only place in zsh code
> which uses link().  I'm hacking configure to disable this usage on Cygwin
> to see what, exactly, the difference in behaviour will be.

I think that's rather more brittle: the code I've suggested (assuming it
does the trick) doesn't require anything more than that link() and
symlink() exist in the system library and covers any similar problem on
other systems.  Hacking something specific for any system isn't usually
desirable, plus all we've been told is that link() doesn't work on
FAT32, not that it doesn't work under Cygwin.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author