intprops: new macro INT_PROMOTE
[gnulib.git] / doc / posix-headers / dirent.texi
blob28ebb10c923d8a1743a05645554a8a4b01ca806d
1 @node dirent.h
2 @section @file{dirent.h}
4 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/dirent.h.html}
6 Gnulib module: dirent-h
7 @mindex dirent-h
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This header file is missing on some platforms:
13 MSVC 14.
15 @item
16 Although many systems define directory entry type macros like @code{DT_DIR},
17 some do not:
18 Minix 3.1.8, AIX 7.2, HP-UX 11, Solaris 11.4, mingw.
20 @item
21 The directory entry type macro @code{DT_WHT} is missing on many systems:
22 All systems where @code{DT_DIR} is missing, plus OpenBSD 7.5.
24 @item
25 The conversion macros @code{DTTOIF} and @code{IFTODT} are missing on
26 many systems (however, the Gnulib replacement macros
27 may evaluate their arguments multiple times):
28 All systems where @code{DT_DIR} is missing, plus OpenBSD 7.5.
30 @item
31 The type @code{ino_t} is missing on some platforms:
32 glibc 2.23 and others.
34 @end itemize
36 Portability problems not fixed by Gnulib:
37 @itemize
38 @item
39 Although many systems define a @code{struct dirent} member named
40 @code{d_type}, some do not:
41 Minix 3.1.8, AIX 7.2, HP-UX 11, Solaris 11.4, mingw.
43 @item
44 On systems with @code{d_type}, not every filesystem supports
45 @code{d_type}, and those lacking support will set it to @code{DT_UNKNOWN}.
47 @item
48 The POSIX.1-2024 directory entry type macros @code{DT_MQ},
49 @code{DT_SEM}, @code{DT_SHM} and @code{DT_TMO} are missing on many
50 platforms.
52 @item
53 Some systems define a @code{struct dirent} member named @code{d_namlen}
54 containing the string length of @code{d_name}, but others do not:
55 glibc 2.23 on Linux, Minix 3.1.8, Solaris 11.4, Cygwin.
56 All of these, except Cygwin, have a member @code{d_reclen} instead,
57 that has a different semantics.
59 @item
60 Some systems define a @code{struct dirent} member named @code{d_off}
61 containing a magic cookie suitable as an argument to @code{seekdir},
62 but others do not:
63 glibc 2.23 on Hurd, macOS 11.1, FreeBSD 11.0, NetBSD 10.0, OpenBSD 7.5, AIX 5.1, HP-UX 11, Cygwin, mingw.
65 @item
66 Some systems define a @code{struct dirent} member named
67 @code{d_reclen} containing the number of bytes in the directory entry
68 record, but others do not.  This member has limited utility, as it is
69 an implementation detail.
70 @end itemize