]> Savannah Git Hosting - gnulib.git/commitdiff
savewd: don’t depend on fcntl-safer
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Nov 2024 21:22:32 +0000 (13:22 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Nov 2024 21:49:37 +0000 (13:49 -0800)
* lib/savewd.c: Don’t include fcntl-safer.
[GNULIB_FCNTL_SAFER]: Include fcntl--.h.
(savewd_save): Use open, not open_safer.
* modules/savewd (Depends-on): Remove fcntl-safer.

ChangeLog
lib/savewd.c
modules/savewd

index 30c45659cd083292891aa65d99717bd418400e5b..1e62e9acbf082a96f93fac94f4c5b7ccefd01833 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-11-06  Paul Eggert  <eggert@cs.ucla.edu>
 
+       savewd: don’t depend on fcntl-safer
+       * lib/savewd.c: Don’t include fcntl-safer.
+       [GNULIB_FCNTL_SAFER]: Include fcntl--.h.
+       (savewd_save): Use open, not open_safer.
+       * modules/savewd (Depends-on): Remove fcntl-safer.
+
        savedir: don’t depend on dirent-safer
        * lib/savedir.c: Include dirent.h, not dirent--.h.
        * modules/savedir (Depends-on): Depend on dirent, not dirent-safer.
index 216f416f0ecef26c707f317c730d78f1fc14ff27..dee8524abeabeafdd3a7c7d0c74994e85845a96b 100644 (file)
 
 #include "assure.h"
 #include "attribute.h"
-#include "fcntl-safer.h"
 #include "filename.h"
 
+#if GNULIB_FCNTL_SAFER
+# include "fcntl--.h"
+#endif
+
 #if defined _WIN32 && !defined __CYGWIN__
 # define fork() (assure (false), -1)
 #endif
@@ -51,7 +54,7 @@ savewd_save (struct savewd *wd)
     case INITIAL_STATE:
       /* Save the working directory, or prepare to fall back if possible.  */
       {
-        int fd = open_safer (".", O_SEARCH);
+        int fd = open (".", O_SEARCH);
         if (0 <= fd)
           {
             wd->state = FD_STATE;
index a0ea64fe6ef01fb08fe5954ffb81bea8503dbf9e..225a4c1a429327bae1ca577de80f021b92cb704b 100644 (file)
@@ -13,7 +13,6 @@ chdir
 errno
 extern-inline
 fchdir
-fcntl-safer
 fcntl-h
 filename
 raise