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. --- locale/programs/charmap-dir.c | 2 -- locale/programs/locale.c | 2 -- locale/programs/locarchive.c | 4 ---- 3 files changed, 8 deletions(-) (limited to 'locale/programs') diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c index a9212b7..42639fb 100644 --- a/locale/programs/charmap-dir.c +++ b/locale/programs/charmap-dir.c @@ -115,11 +115,9 @@ charmap_readdir (CHARMAP_DIR *cdir) stpcpy (stpcpy (cdir->pathname, cdir->directory), dirent->d_name); filename = cdir->pathname + cdir->directory_len; -#ifdef _DIRENT_HAVE_D_TYPE if (dirent->d_type != DT_UNKNOWN && dirent->d_type != DT_LNK) mode = DTTOIF (dirent->d_type); else -#endif { struct stat64 statbuf; diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 939214d..de2a305 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -316,11 +316,9 @@ select_dirs (const struct dirent *dirent) { mode_t mode = 0; -#ifdef _DIRENT_HAVE_D_TYPE if (dirent->d_type != DT_UNKNOWN && dirent->d_type != DT_LNK) mode = DTTOIF (dirent->d_type); else -#endif { struct stat64 st; char buf[sizeof (COMPLOCALEDIR) diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c index 633c59b..50e975d 100644 --- a/locale/programs/locarchive.c +++ b/locale/programs/locarchive.c @@ -1385,17 +1385,13 @@ add_locales_to_archive (size_t nlist, char *list[], bool replace) a directory we have to look at a file with the prefix "SYS_". Otherwise we have found what we are looking for. */ -#ifdef _DIRENT_HAVE_D_TYPE d_type = d->d_type; if (d_type != DT_REG) -#endif { char fullname[fnamelen + 2 * strlen (d->d_name) + 7]; -#ifdef _DIRENT_HAVE_D_TYPE if (d_type == DT_UNKNOWN) -#endif { strcpy (stpcpy (stpcpy (fullname, fname), "/"), d->d_name); -- cgit v1.1