X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsave-cwd.c;h=4ff600e58a85fb48567ae10a14547c6386a3e85c;hb=8de557e31178699dd6e839850056f0653cdfba89;hp=4dcf0d5396ee09f553c570d440790868548ea6fc;hpb=8b03458ebe93a6e1c86c3a468aa3f2eee01e3c4c;p=gnulib.git diff --git a/lib/save-cwd.c b/lib/save-cwd.c index 4dcf0d539..4ff600e58 100644 --- a/lib/save-cwd.c +++ b/lib/save-cwd.c @@ -15,34 +15,24 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Jim Meyering. */ -#if HAVE_CONFIG_H -# include "config.h" +#ifdef HAVE_CONFIG_H +# include #endif #include "save-cwd.h" +#include #include #include #include - -#if HAVE_UNISTD_H -# include -#endif - -#if HAVE_FCNTL_H -# include -#else -# include -#endif - -#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 @@ -82,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 ();