Re: cygwin <sys/dirent.h> has changed during dec. 2005

John Ellis <[email protected]> Tue, 07 Feb 2006 20:56:48 -0500
Newsgroups gmane.comp.gnome.apps.gqview.devel
Message-ID <[email protected]>
wj-UZ7K6S0fGFBaa/[email protected] wrote:

> during attempt to compile gqview 2.1.1 under cygwin I discovered that the
> system file <sys/dirent.h> had changed so that gqview no longer compiles
> "out of the box"
> 
> The gqview source files involved are:
> 
> $ grep d_ino *.c
> cache_maint.c:          if (dir->d_ino > 0 &&
> ui_fileops.c:           if (dir->d_ino > 0)
> ui_pathsel.c:           if (dir->d_ino > 0 && (dd->show_hidden || !is_hidden(dir->d_name))
> )
> ui_tabcomp.c:                if (dir->d_ino > 0)
> 
> the statement 'dir->d_ino' should be changed to 'dir->__invalid_d_ino' to
> reflect the change in <sys/dirent.h>
> 
> (At least that makes gqview compile again. )

Sorry for delay.

My guess is that the test for a valid (non-zero) inode is not really needed 
at all, and is only a holdover from the past when readdir did not filter 
out invalid (unlinked) files. Can anyone confirm this?

Greetings,
John

-- 
John Ellis <[email protected]>

http://gqview.sourceforge.net <GQview> | http://hideseek.sourceforge.net
http://gqmpeg.sourceforge.net <GQmpeg> |     <Preferences Hide and Seek>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642