bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Duplicate entries in (dir)Top node on Cygwin


From: David Hunter
Subject: Duplicate entries in (dir)Top node on Cygwin
Date: Tue, 08 Feb 2005 23:05:37 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)

The bug was observed on info-4.7-2, Cygwin 1.5.12, Windows XP Home Edition SP2. 
 From the Cygwin Bash Shell, I ran 'info' without parameters.  The (dir)Top 
node contains about four copies of all dir entries.  (If I run 'info' from 
CMD.EXE, three copies; if cwd is '/usr/share/info', five.)

The cause: Cygwin 1.5.0 and up use 64-bit inodes, but new_dir_file_p() in 
texinfo/info/dir.c stores inodes in a 32-bit unsigned long in the struct 
dir_file_list_entry_type.  On my disk, /usr/share/info/dir has an inode of 
0x000F00000000226A, which unfortunately won't fit in a 32-bit unsigned long.  
Due to the loss of precision, new_dir_file_p() fails to ever identify the 
aforementioned file as having already been seen.  info builds an INFOPATH 
containing several instances of '/usr/share/info' and appends dir to the 
(dir)Top node for each instance, hence the duplicate entries.

In struct dir_file_list_entry_type, the GNU C library file property types dev_t 
and ino_t should probably be used in place of unsigned long, as follows:

--- /usr/src/texinfo-4.7-2/info/dir.c   2004-03-13 19:57:29.000000000 -0500
+++ info/dir.c  2005-02-08 22:40:42.578125000 -0500
@@ -44,8 +44,8 @@ static char *dirs_to_add[] = {

typedef struct
{
-  unsigned long device;
-  unsigned long inode;
+  dev_t device;
+  ino_t inode;
} dir_file_list_entry_type;

static int


-Dave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]