This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using (test) coreutils-5.93-2


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 1/3/2006 7:09 AM:
> 
> I'll investigate; for what it's worth, I'm not even seeing the duplication
> in the (no longer available) 5.93-1, although the only thing that changed
> between -1 and -2 was recompilation to pick up brand new flags to open
> such as O_DIRECT.  Perhaps the ls code uses one of those flags when
> available, and the use of that flag is tickling a cygwin bug; I'll have
> more details once I finish my analysis.

Definitely a cygwin bug; probably related to the removal of d_ino changing
the d_version field of struct dirent from 1 to 2.  Reproducible test case:

$ uname -a
CYGWIN_NT-5.1 LOUNGE 1.5.19s(0.149/4/2) 20051224 14:32:37 i686 Cygwin
$ ./foo
.
..
file1
file2
foo.c
foo.exe
.
..
$ cat foo.c
$ cat ../foo.c
#include <stdio.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <libgen.h>
#include <dirent.h>

int
main (int argc, char* argv[])
{
  DIR* dir;
  struct dirent* dp;
  dir = opendir(".");
  if (! dir)
    exit(1);
  while ((dp = readdir(dir)) != NULL)
    printf("%s\n", dp->d_name);
  closedir(dir);
  return 0;
}

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDuong84KuGfSFAYARAopnAJ9jHWdQwy+4oMVzPxxQnINRWKz3KgCgiSkd
+4gI6qXCV1UyYPjGiIBM894=
=wmnp
-----END PGP SIGNATURE-----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]