This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug manual/6895] New: dirent d_type does indicate symlinks
- From: "siward at wanadoo dot nl" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 17 Sep 2008 02:14:56 -0000
- Subject: [Bug manual/6895] New: dirent d_type does indicate symlinks
- Reply-to: sourceware-bugzilla at sourceware dot org
Hi again everyone,
In manual, in description of struct dirent,
in description of member d_type,
several possible symbolic constants for various types are mentioned,
but there is not one for symlinks,
which gives impression that struct dirent doesn't have that info,
so user would have to use an extra lstat().
However, i find that for symlinks, whether dangling or not,
d_type member has value 10 .
Looking in /usr/include/dirent.h, i find
DT_LNK = 10
I also find there
DT_WHT = 14
but i have no idea what it represents.
(these are enclosed in an #ifdef __USE_BSD ,
but since i did not explicitly define that myself,
i presume that gets defined by GNU_SOURCE or USE_GNU)
So it would be nice if someone would add that info.
--
Summary: dirent d_type does indicate symlinks
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: manual
AssignedTo: roland at gnu dot org
ReportedBy: siward at wanadoo dot nl
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=6895
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.