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