On Thu, May 04, 2023 at 11:30:30AM +0200, Bruno Haible wrote: > Paul Eggert wrote: > > That being said, I see a path through lib/dirfd.c where dirfd's arg is > > ignored. > > Yes, that may happen in systems that don't have d_fd nor dd_fd in 'DIR' > and are not Windows. But such systems are of the 1980ies or 1990ies, and > Gnulib does not support them any more. > > I would not install the patch with _GL_UNUSED. > Paul Eggert asked in
https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00027.msg Why did 'configure' decide to replace dirfd? ### With "REPLACE_DIRFD=0" in gnulib/m4/dirfd.m4 : ... else HAVE_DIRFD=1 dnl Replace only if the system declares dirfd already. if test $ac_cv_have_decl_dirfd = yes; then -> REPLACE_DIRFD=0 /* FIX ME, was =1 */ fi dnl Replace dirfd() on native Windows, to support fdopendir(). AC_REQUIRE([gl_DIRENT_DIR]) if test $DIR_HAS_FD_MEMBER = 0; then REPLACE_DIRFD=1 fi dnl OS/2 kLIBC dirfd() does not work. case "$host_os" in os2*) REPLACE_DIRFD=1 ;; esac #### this is the result checking for d_ino member in directory struct... yes checking for dirfd... yes checking whether dirfd is declared... yes checking whether dirfd is a macro... no ../configure: 25974: ./configure.lineno: /bin: Permission denied checking whether // is distinct from /... no lrwxrwxrwx 1 root root 7 sep 21 2022 /bin -> usr/bin and the compilation is without the warning from the compiler.