-
-# if __sun__ || sun
- /* On SunOS 4 and IRIX 5.3, fchdir returns EINVAL when auditing
- is enabled, so we have to fall back to chdir. */
- if (fchdir (cwd->desc))
- {
- if (errno == EINVAL)
- {
- close (cwd->desc);
- cwd->desc = -1;
- have_working_fchdir = 0;
- }
- else
- {
- int saved_errno = errno;
- close (cwd->desc);
- cwd->desc = -1;
- errno = saved_errno;
- return 1;
- }
- }
-# endif /* __sun__ || sun */
-#else
-# define fchdir(x) (abort (), 0)
- have_working_fchdir = 0;
-#endif