This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug manual/6895] New: dirent d_type does indicate symlinks


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.


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