Message-ID: <003501c2eec7$e41e2a80$0100a8c0@acp42g> From: "Andrew Cottrell" To: , Cc: References: <10303182107 DOT AA24101 AT clio DOT rice DOT edu> <3E7868E9 DOT 19949F8E AT phekda DOT freeserve DOT co DOT uk> <9003-Wed19Mar2003174940+0200-eliz AT elta DOT co DOT il> <3E78AA1D DOT 23720139 AT phekda DOT freeserve DOT co DOT uk> <3405-Wed19Mar2003223319+0200-eliz AT elta DOT co DOT il> <3E78D73C DOT 3B41ECF AT phekda DOT freeserve DOT co DOT uk> <7263-Thu20Mar2003061743+0200-eliz AT elta DOT co DOT il> Subject: Re: DJGPP 2.04 release? [Was: Re: nmalloc revisited] Date: Thu, 20 Mar 2003 21:03:00 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Reply-To: djgpp-workers AT delorie DOT com > Are you saying that the current code does _not_ invent inodes on > Windows/XP? I'd be surprised, I thought we invent inodes for any > kind of files on all the versions of Windows except 3.1. If the invent_inode is not passed a name then under Windows 2K/XP the inode number may change between calls and as such cause failures in directory tranversial programs. It appears to be okay on Win 9x/DOS, but fails on 2K/XP. In the following email you can see a patch that I did to fix the cases that I was aware of, but the solution did not fix all cases from what I can remember. http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-workers/2003/0 2/08/23:50:22 The main line that was changed was:- From: stat_buf->st_ino = _invent_inode("", dos_ftime,trusted_fsize); To: stat_buf->st_ino = _invent_inode(fixed_filename, dos_ftime, trusted_fsize); As you can see _invent_inode passed NULL as the name and now uses the fixed file name. The original info on this can be seen in the following email:- http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-workers/2002/0 9/15/03:27:43 Excert from the email:- The reason for this is that in xstat.c the following piece of code is executed if no filename is used in the _invent_inode as is the case in fstat, but not the case for lstat The offending line in stat.c whcih is a few lines above the symlink check for trusted_fsize == 510 : stat_buf->st_ino = _invent_inode("", dos_ftime, trusted_fsize); /* If the passed name is empty, invent a new inode unconditionally. * This is for those unfortunate circumstances where we couldn't * get a name (e.g., fstat() under Novell). For these we want at * least to ensure that no two calls will get the same inode number. * The lossage here is that you get different inodes even if you call * twice with the same file. Sigh... */ if (!*name) { ino_t retval = inode_count; inode_count++; return retval; } Hope this helps and does not confuse the issue more. Regards, Andrew