Fix strerror on Interix.
[gnulib.git] / lib / progreloc.c
index 6986e1e..edc3db6 100644 (file)
@@ -17,9 +17,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 /* Specification.  */
 #include "progname.h"
@@ -29,9 +27,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <sys/stat.h>
 
 /* Get declaration of _NSGetExecutablePath on MacOS X 10.2 or newer.  */
 # define FILE_SYSTEM_PREFIX_LEN(P) 0
 #endif
 
+/* The results of open() in this file are not used with fchdir,
+   therefore save some unnecessary work in fchdir.c.  */
+#undef open
+#undef close
+
 #undef set_program_name