aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-03-21 13:47:37 -0400
committerBruce Momjian <bruce@momjian.us>2014-03-21 13:47:37 -0400
commit1494931d7375ccdc6afd34f135bc708f8954eecc (patch)
tree2e2262b09d4fb94b1f7fe4d8ebf6c21ba32bea72
parent6f03927fce038096f53ca67eeab9adb24938f8a6 (diff)
downloadpostgresql-1494931d7375ccdc6afd34f135bc708f8954eecc.tar.gz
postgresql-1494931d7375ccdc6afd34f135bc708f8954eecc.zip
Remove MinGW readdir/errno bug workaround fixed on 2003-10-10
-rw-r--r--contrib/pg_archivecleanup/pg_archivecleanup.c6
-rw-r--r--contrib/pg_standby/pg_standby.c6
-rw-r--r--src/backend/storage/file/fd.c6
-rw-r--r--src/bin/initdb/initdb.c6
-rw-r--r--src/bin/pg_basebackup/pg_receivexlog.c6
-rw-r--r--src/bin/pg_dump/pg_backup_directory.c6
-rw-r--r--src/bin/pg_resetxlog/pg_resetxlog.c18
-rw-r--r--src/common/pgfnames.c6
-rw-r--r--src/port/pgcheckdir.c6
9 files changed, 0 insertions, 66 deletions
diff --git a/contrib/pg_archivecleanup/pg_archivecleanup.c b/contrib/pg_archivecleanup/pg_archivecleanup.c
index 039829e0049..39348c6db10 100644
--- a/contrib/pg_archivecleanup/pg_archivecleanup.c
+++ b/contrib/pg_archivecleanup/pg_archivecleanup.c
@@ -165,12 +165,6 @@ CleanupPriorWALFiles(void)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
progname, archiveLocation, strerror(errno));
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index 9134d649cd6..d6b169264c3 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -284,12 +284,6 @@ CustomizableCleanupPriorWALFiles(void)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
progname, archiveLocation, strerror(errno));
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 5158cfe806f..42dbe87ca4b 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -1956,12 +1956,6 @@ ReadDir(DIR *dir, const char *dirname)
if ((dent = readdir(dir)) != NULL)
return dent;
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
ereport(ERROR,
(errcode_for_file_access(),
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index ce08494f492..b1dd1fe52fd 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -564,12 +564,6 @@ walkdir(char *path, void (*action) (char *fname, bool isdir))
(*action) (subpath, false);
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
{
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
index 1eda4b6b002..406610a8625 100644
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ b/src/bin/pg_basebackup/pg_receivexlog.c
@@ -209,12 +209,6 @@ FindStreamingStart(uint32 *tli)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
{
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
diff --git a/src/bin/pg_dump/pg_backup_directory.c b/src/bin/pg_dump/pg_backup_directory.c
index b441ceaa46b..0fae53b3468 100644
--- a/src/bin/pg_dump/pg_backup_directory.c
+++ b/src/bin/pg_dump/pg_backup_directory.c
@@ -186,12 +186,6 @@ InitArchiveFmt_Directory(ArchiveHandle *AH)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
exit_horribly(modulename, "could not read directory \"%s\": %s\n",
ctx->directory, strerror(errno));
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c
index af2cec7e932..b5d480e7b80 100644
--- a/src/bin/pg_resetxlog/pg_resetxlog.c
+++ b/src/bin/pg_resetxlog/pg_resetxlog.c
@@ -845,12 +845,6 @@ FindEndOfXLOG(void)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
{
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
@@ -908,12 +902,6 @@ KillExistingXLOG(void)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
{
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
@@ -966,12 +954,6 @@ KillExistingArchiveStatus(void)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
{
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
diff --git a/src/common/pgfnames.c b/src/common/pgfnames.c
index 51a848a1fdb..016da325142 100644
--- a/src/common/pgfnames.c
+++ b/src/common/pgfnames.c
@@ -64,12 +64,6 @@ pgfnames(const char *path)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno)
{
#ifndef FRONTEND
diff --git a/src/port/pgcheckdir.c b/src/port/pgcheckdir.c
index 502d4f377d9..07f250e9d4a 100644
--- a/src/port/pgcheckdir.c
+++ b/src/port/pgcheckdir.c
@@ -64,12 +64,6 @@ pg_check_dir(const char *dir)
}
}
-#ifdef WIN32
- /* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- errno = 0;
-#endif
-
if (errno || closedir(chkdir))
result = -1; /* some kind of I/O error? */