From 4484b9e29656980f18bb0fc8cdb6b1bbe5364f21 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 30 Oct 2017 15:48:33 +0100 Subject: Assume that _DIRENT_HAVE_D_TYPE is always defined. References remain in io/fts.c, io/ftw.c, posix/glob.c, sysdeps/posix/getcwd.c. These files are (potentially) externally shared. --- posix/tst-dir.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'posix/tst-dir.c') diff --git a/posix/tst-dir.c b/posix/tst-dir.c index fee79b3..52ff36f 100644 --- a/posix/tst-dir.c +++ b/posix/tst-dir.c @@ -149,10 +149,8 @@ main (int argc, char *argv[]) while ((d = readdir64 (dir1)) != NULL) { -#ifdef _DIRENT_HAVE_D_TYPE if (d->d_type != DT_UNKNOWN && d->d_type != DT_REG) continue; -#endif if (d->d_ino == st2.st_ino) { @@ -234,10 +232,8 @@ main (int argc, char *argv[]) while ((d = readdir64 (dir2)) != NULL) { -#ifdef _DIRENT_HAVE_D_TYPE if (d->d_type != DT_UNKNOWN && d->d_type != DT_DIR) continue; -#endif if (d->d_ino == st2.st_ino) { @@ -327,10 +323,8 @@ main (int argc, char *argv[]) rewinddir (dir1); while (readdir64_r (dir1, &direntbuf.d, &d) == 0 && d != NULL) { -#ifdef _DIRENT_HAVE_D_TYPE if (d->d_type != DT_UNKNOWN && d->d_type != DT_DIR) continue; -#endif if (d->d_ino == st1.st_ino) { @@ -457,13 +451,11 @@ main (int argc, char *argv[]) || strcmp (d->d_name, "..") == 0 || strcmp (d->d_name, "another-dir") == 0) { -#ifdef _DIRENT_HAVE_D_TYPE if (d->d_type != DT_UNKNOWN && d->d_type != DT_DIR) { printf ("d_type for \"%s\" is wrong\n", d->d_name); result = 1; } -#endif if (stat64 (d->d_name, &st3) < 0) { printf ("cannot stat \"%s\" is wrong\n", d->d_name); @@ -477,13 +469,11 @@ main (int argc, char *argv[]) } else if (strcmp (d->d_name, "and-a-file") == 0) { -#ifdef _DIRENT_HAVE_D_TYPE if (d->d_type != DT_UNKNOWN && d->d_type != DT_REG) { printf ("d_type for \"%s\" is wrong\n", d->d_name); result = 1; } -#endif if (stat64 (d->d_name, &st3) < 0) { printf ("cannot stat \"%s\" is wrong\n", d->d_name); -- cgit v1.1