bug-global
[Top][All Lists]
Advanced

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

Re: readdir d_type bug causes probrems.


From: Shigio Yamaguchi
Subject: Re: readdir d_type bug causes probrems.
Date: Sun, 24 Aug 2003 07:54:15 +0900

Hi,
> Gtags-4.6 doesn't work correctry in my linux box (using libc-2.2.5).
> It always outputs zero-size GRTAGS and GTAGS.
> 
> I think that the cause would be the readdir(3) d_type bug.
> "BUGS Field d_type is not implemented as of libc6 2.0.4 and will always
> return 0(unknown)."

I have changed the default method to traverse directory tree from find(1)
to dirent(3) since GLOBAL-4.5.3. But it seems to be hasty.
I have made a patch to reverse the default method.
Would you please try this patch?

Index: find.c
===================================================================
RCS file: /cvsroot/global/global/libutil/find.c,v
retrieving revision 1.30
diff -c -r1.30 find.c
*** find.c      27 Jun 2003 15:51:34 -0000      1.30
--- find.c      23 Aug 2003 22:31:16 -0000
***************
*** 20,34 ****
   */
  
  /*
!  * If dirent(3) is available, then use it to traverse directory tree.
!  * Otherwise use find(1).
   */
  #ifdef HAVE_CONFIG_H
  #include <config.h>
  #endif
  #include <assert.h>
  #include <ctype.h>
! #ifdef HAVE_DIRENT_H
  #include <sys/types.h>
  #include <dirent.h>
  #ifndef HAVE_DP_D_TYPE
--- 20,34 ----
   */
  
  /*
!  * If find(1) is available, then use it to traverse directory tree.
!  * Otherwise use dirent(3).
   */
  #ifdef HAVE_CONFIG_H
  #include <config.h>
  #endif
  #include <assert.h>
  #include <ctype.h>
! #ifndef HAVE_FIND
  #include <sys/types.h>
  #include <dirent.h>
  #ifndef HAVE_DP_D_TYPE
***************
*** 321,327 ****
        }
        return 0;
  }
! #ifdef HAVE_DIRENT_H
  /*----------------------------------------------------------------------*/
  /* dirent version find_xxx()                                          */
  /*----------------------------------------------------------------------*/
--- 321,327 ----
        }
        return 0;
  }
! #ifndef HAVE_FIND
  /*----------------------------------------------------------------------*/
  /* dirent version find_xxx()                                          */
  /*----------------------------------------------------------------------*/
***************
*** 525,531 ****
                regfree(skip);
        opened = 0;
  }
! #else /* HAVE_DIRENT_H */
  /*----------------------------------------------------------------------*/
  /* find command version                                                       
*/
  /*----------------------------------------------------------------------*/
--- 525,531 ----
                regfree(skip);
        opened = 0;
  }
! #else /* !HAVE_FIND */
  /*----------------------------------------------------------------------*/
  /* find command version                                                       
*/
  /*----------------------------------------------------------------------*/
***************
*** 606,609 ****
        if (skip)
                regfree(skip);
  }
! #endif /* HAVE_DIRENT_H */
--- 606,609 ----
        if (skip)
                regfree(skip);
  }
! #endif /* !HAVE_FIND */
--
Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
Spare mail address: <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3




reply via email to

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