Here's a patch that should restore the ability of save-cwd to work on systems without the fchdir function.
Would you please see if this is sufficient? If so, I'll check it in to gnulib (with an AC_CHECK_FUNCS(fchdir) in save-cwd.m4). Index: save-cwd.c =================================================================== RCS file: /fetish/cu/lib/save-cwd.c,v retrieving revision 1.24 diff -u -p -r1.24 save-cwd.c --- save-cwd.c 20 Jan 2005 22:17:26 -0000 1.24 +++ save-cwd.c 9 Mar 2005 07:49:19 -0000 @@ -44,6 +44,18 @@ #include "chdir-long.h" #include "xgetcwd.h" +/* On systems without the fchdir function (WOE), pretend that open + always returns -1 so that save_cwd resorts to using xgetcwd. + Since chdir_long requires fchdir, use chdir instead. */ +#if !HAVE_FCHDIR +# undef open +# define open(File, Flags) -1 +# undef fchdir +# define fchdir(Fd) abort () +# undef chdir_long +# define chdir_long(Dir) chdir (Dir) +#endif + /* Record the location of the current working directory in CWD so that the program may change to other directories and later use restore_cwd to return to the recorded location. This function may allocate _______________________________________________ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs