1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00

Merge Gnulib save-cwd.c changes

* lib/save-cwd.c: Propagate changes from Gnulib sibling.
This doesn’t affect behavior.
This commit is contained in:
Paul Eggert 2026-01-19 10:53:33 -08:00
parent 5eb9800c42
commit 128bfa6d44

View file

@ -5,7 +5,7 @@
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@ -45,10 +45,10 @@
the getcwd-lgpl module, but to be truly robust, use the getcwd module.
Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin,
SCO Xenix. Also, SunOS 4 and Irix 5.3 provide the function, yet it
doesn't work for partitions on which auditing is enabled. If
you're still using an obsolete system with these problems, please
send email to the maintainer of this code. */
SCO Xenix. Also, SunOS 4 provides the function, yet it doesn't work
for partitions on which auditing is enabled. If you're still using
an obsolete system with these problems, please send email to the
maintainer of this code. */
#if !defined HAVE_FCHDIR && !defined fchdir
# define fchdir(fd) (-1)
@ -57,10 +57,11 @@
int
save_cwd (struct saved_cwd *cwd)
{
cwd->desc = open (".", O_SEARCH | O_CLOEXEC);
/* The 'name' member is present only to minimize differences from
gnulib. Initialize it to zero, if only to simplify debugging. */
cwd->name = 0;
gnulib. Initialize it to NULL, if only to simplify debugging. */
cwd->name = NULL;
cwd->desc = open (".", O_SEARCH | O_CLOEXEC);
return 0;
}