[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] using dev_t and ino_t
From: |
Karl Berry |
Subject: |
[bug-gnulib] using dev_t and ino_t |
Date: |
Wed, 9 Feb 2005 09:47:40 -0500 |
Are there portability problems with using dev_t and ino_t?
Do I need to configure for them?
Advice?
Thanks,
k
Date: Tue, 08 Feb 2005 23:05:37 -0500
From: David Hunter <address@hidden>
To: address@hidden
Subject: Duplicate entries in (dir)Top node on Cygwin
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
- [bug-gnulib] using dev_t and ino_t,
Karl Berry <=