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 <config.h>
#endif
#include "save-cwd.h"
+#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#else
-# include <sys/file.h>
-#endif
-
-#include <errno.h>
+#include <unistd.h>
#include "chdir-long.h"
-#include "unistd-safer.h"
+#include "fcntl--.h"
#include "xgetcwd.h"
/* On systems without the fchdir function (WOE), pretend that open
{
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 ();