Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ Path: not-for-mail From: Sam Steingold Newsgroups: gmane.os.cygwin Subject: Re: bug: hard links to soft links do not work Date: 01 Aug 2002 18:01:02 -0400 Organization: disorganization Lines: 47 Message-ID: References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20020801123520 DOT 01f97010 AT pop3 DOT cris DOT com> <20020801200325 DOT GC27689 AT redhat DOT com> <20020801210148 DOT GB29167 AT redhat DOT com> Reply-To: sds AT gnu DOT org NNTP-Posting-Host: 65.114.186.226 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1028239228 4975 65.114.186.226 (1 Aug 2002 22:00:28 GMT) X-Complaints-To: usenet AT main DOT gmane DOT org NNTP-Posting-Date: Thu, 1 Aug 2002 22:00:28 +0000 (UTC) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 > * In message <20020801210148 DOT GB29167 AT redhat DOT com> > * On the subject of "Re: bug: hard links to soft links do not work" > * Sent on Thu, 1 Aug 2002 17:01:48 -0400 > * Honorable Christopher Faylor writes: > > On Thu, Aug 01, 2002 at 04:21:43PM -0400, Sam Steingold wrote: > > > >actually, this is very easy: > > > >(defmethod hard-link :around (from to) > > (if (symbolic-link-p to) > > (symbolic-link from (resolve-symbolic-link to)) > > (call-next-method))) > > > >i.e., when the target is a symlink, you symlink to its target. > > Is that *lisp* code? This makes it easy because...? I don't quite > follow. Obviously anyone can conceive of some logic to make this fail > but without looking at the actual code in question it isn't going to > be too useful. the above is indeed CLOS code of how link() should actually be implemented in the cygwin libc. > Just to make it clear again, this is a cygwin dll problem. Modifying > ln fixes ln. It doesn't fix perl or python or any C program that uses > link(). yes it will! > >think of a symlink as if it had no inode (like it is on a real FS), > >i.e., just a special dirent pointing to the target. > >Then the hardlink of a symlink is another symlink pointing to the same > >place, since the nature of hardlink is to create a file which is > >indistinguishable from the target. int link(const char *oldpath, const char *newpath); let me repeat: when oldpath is a symbolic link, newpath should be a symbolic link too! -- Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux C combines the power of assembler with the portability of assembler. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/