- AC_DEFINE([FCHDIR_REPLACEMENT], [1],
- [Define if gnulib's fchdir() replacement is used.])
+ AC_DEFINE([REPLACE_FCHDIR], [1],
+ [Define to 1 if gnulib's fchdir() replacement is used.])
+ dnl We must also replace anything that can manipulate a directory fd,
+ dnl to keep our bookkeeping up-to-date. We don't have to replace
+ dnl fstatat, since no platform has fstatat but lacks fchdir.
+ REPLACE_FSTAT=1
+ REPLACE_OPENDIR=1
+ REPLACE_CLOSEDIR=1
+ REPLACE_DUP=1