Paul Eggert
2d0c5eefd0
Sync from gnulib.
2005-09-22 06:05:39 +00:00
Paul Eggert
9c34c16a06
Include fcntl--.h rather than fcntl.h.
...
Do not include unistd-safer.h.
(save_cwd): Don't call fd_safer; no longer needed
now that we include fcntl--.h.
2005-07-03 07:15:39 +00:00
Jim Meyering
410f98fc2b
Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
2005-07-02 08:41:46 +00:00
Jim Meyering
58076430c3
Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
...
and don't include <sys/file.h>).
2005-07-01 20:55:29 +00:00
Jim Meyering
116e6fb244
Update FSF postal mail address.
2005-05-14 07:58:06 +00:00
Paul Eggert
24560041a8
Include unistd-safer.h.
...
(save_cwd): Use fd_safer.
2005-04-11 20:03:04 +00:00
Jim Meyering
9d0f3eeb6c
[!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
...
so that this module works on systems without fchdir.
2005-03-09 23:21:00 +00:00
Paul Eggert
7e43a4e6c4
(save_cwd): Remove code to support the case
...
where fchdir is missing or flaky.
2005-01-20 22:17:26 +00:00
Paul Eggert
f2173447ba
save-cwd.c: Include "save-cwd.h" before other include files.
...
(O_DIRECTORY): Remove; not needed here, since "." must be
a directory. All uses removed.
(save_cwd): Use __sgi || __sun, not sun || __sun. __sun is
universal on Suns, and we also need to test for IRIX.
Revamp code to use 'if' rather than '#if'.
Avoid unnecessary comparison of cwd->desc to 0.
2004-12-03 06:25:03 +00:00
Jim Meyering
e7acb8d8dd
Include chdir-long.h rather than chdir.h.
...
(restore_cwd): Use chdir_long, not chdir.
2004-11-30 14:46:25 +00:00
Jim Meyering
f039b8f8bf
Include "chdir.h", so that if save_cwd/getcwd
...
saves a name longer than PATH_MAX, restore_cwd's chdir can use it.
2004-11-28 21:03:08 +00:00
Paul Eggert
27454c431f
Include <stdbool.h>.
...
(errno): Remove decl; we now assume C89 or better.
(save_cwd): Use bool for booleans.
(save_cwd, restore_cwd): Return -1 on failure, not 1, since we set
errno on failure.
2004-08-02 21:06:22 +00:00
Jim Meyering
76a6665c13
(save_cwd): If opening `.' read-only fails, try write-only.
2004-05-11 18:34:38 +00:00
Jim Meyering
8853d12319
(save_cwd) [HAVE_FCHDIR]: Don't fail just
...
because opening `.' failed. Resort to using xgetcwd.
2004-05-11 16:42:17 +00:00
Jim Meyering
4e150ea968
Include <stdlib.h> unconditionally.
2003-09-11 09:07:35 +00:00
Jim Meyering
9817a27dc0
Normalize naming of Sun operating systems, e.g., SunOS4 -> SunOS 4,
...
Solaris5.9 -> Solaris 9. From Paul Eggert.
2003-07-23 06:24:12 +00:00
Jim Meyering
959a2409fe
Don't emit diagnostics. Let callers do that.
...
Don't include "error.h".
(save_cwd): Don't call error. Ensure that errno is valid
when returning nonzero.
2003-07-12 16:07:30 +00:00
Jim Meyering
998e0827e4
comments
2003-03-05 07:24:22 +00:00
Jim Meyering
7820b193f6
(restore_cwd): Remove two parameters.
...
Simplify. Don't call error upon failure. Let callers do that.
(save_cwd): Mention that Irix 5.3 has the same problem as SunOS4
when auditing is enabled. But don't bother updating the #if.
2003-03-04 21:27:34 +00:00
Jim Meyering
77f6ad8381
Include "xgetcwd.h".
2003-01-10 22:48:02 +00:00
Jim Meyering
1f3a6e1eb8
(O_DIRECTORY): Define, if needed.
...
(save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
Suggestion from Ulrich Drepper.
2000-10-22 06:57:42 +00:00
Jim Meyering
51b6b653a2
back out Copyright date changes for files with no changes year
2000-08-07 15:48:18 +00:00
Jim Meyering
fde850f7ad
update copyright date
2000-07-09 07:22:43 +00:00
Jim Meyering
7d60769bea
ansideclify
1998-12-07 03:12:10 +00:00
Jim Meyering
bfbc3ce20c
Use #if, not #ifdef with HAVE_ macros
1998-03-15 11:09:10 +00:00
Jim Meyering
727298f3f5
Use PARAMS, not __P.
1997-12-21 11:22:51 +00:00
Jim Meyering
25f6a4a7c0
remove blank line at end and add copyright
...
tweak cpp indentation
1997-06-12 12:58:47 +00:00
Jim Meyering
e8b07e3796
update FSF address in copyright
1996-07-15 03:36:16 +00:00
Jim Meyering
a3fa97f5e3
.
1995-12-08 20:19:49 +00:00
Jim Meyering
7d3a280b7a
Add copyright.
1995-12-08 04:50:48 +00:00
Jim Meyering
3139de9726
.
1995-08-04 15:23:25 +00:00