If open + fchdir fails, fall back on xgetcwd + chdir.
commit6cffd856831130ea0a2403b88a1c57e3ed4eccf4
authorkevind <kevind>
Sat, 21 Oct 2000 21:21:11 +0000 (21 21:21 +0000)
committerkevind <kevind>
Sat, 21 Oct 2000 21:21:11 +0000 (21 21:21 +0000)
treede2cc0263c86fa0e97130755eb22f49e10ac6a49
parent3b5faed85274f035ae3cb796ee357dff3fff28b0
If open + fchdir fails, fall back on xgetcwd + chdir.
The old code tested for this at compile-time,
but SunOS 4.1.4 fchdir can fail at run-time.

* find/defs.h (fchdir): Define to -1 if not available.
* find/defs.h (starting_dir, starting_desc):
Always declare.  starting_dir now points to const.
* find/find.c (starting_dir, starting_desc): Likewise.
* find/find.c (starting_dir):
Now "." if starting_desc is nonnegative, for benefit of diagnostics.
(main, process_top_path, process_dir):
If open + fchdir fails, fall back on xgetcwd + chdir.
* find/pred.c (launch): Likewise.
find/defs.h
find/find.c
find/pred.c