X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fsave-cwd.c;h=4ff600e58a85fb48567ae10a14547c6386a3e85c;hb=8de557e31178699dd6e839850056f0653cdfba89;hp=7f1b30b96ed928e25c9a36f3cd1ad15ebaadd499;hpb=222b0486b7db1b09293e05512873d633440efcb3;p=gnulib.git diff --git a/lib/save-cwd.c b/lib/save-cwd.c index 7f1b30b96..4ff600e58 100644 --- a/lib/save-cwd.c +++ b/lib/save-cwd.c @@ -25,20 +25,14 @@ #include "save-cwd.h" +#include #include #include #include - -#if HAVE_UNISTD_H -# include -#endif - -#include - -#include +#include #include "chdir-long.h" -#include "unistd-safer.h" +#include "fcntl--.h" #include "xgetcwd.h" /* On systems without the fchdir function (WOE), pretend that open @@ -78,10 +72,10 @@ save_cwd (struct saved_cwd *cwd) { cwd->name = NULL; - cwd->desc = fd_safer (open (".", O_RDONLY)); + cwd->desc = open (".", O_RDONLY); if (cwd->desc < 0) { - cwd->desc = fd_safer (open (".", O_WRONLY)); + cwd->desc = open (".", O_WRONLY); if (cwd->desc < 0) { cwd->name = xgetcwd ();