Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1494931

Browse files
committed
Remove MinGW readdir/errno bug workaround fixed on 2003-10-10
1 parent 6f03927 commit 1494931

File tree

9 files changed

+0
-66
lines changed

9 files changed

+0
-66
lines changed

contrib/pg_archivecleanup/pg_archivecleanup.c

-6
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ CleanupPriorWALFiles(void)
165165
}
166166
}
167167

168-
#ifdef WIN32
169-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
170-
if (GetLastError() == ERROR_NO_MORE_FILES)
171-
errno = 0;
172-
#endif
173-
174168
if (errno)
175169
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
176170
progname, archiveLocation, strerror(errno));

contrib/pg_standby/pg_standby.c

-6
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,6 @@ CustomizableCleanupPriorWALFiles(void)
284284
}
285285
}
286286

287-
#ifdef WIN32
288-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
289-
if (GetLastError() == ERROR_NO_MORE_FILES)
290-
errno = 0;
291-
#endif
292-
293287
if (errno)
294288
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
295289
progname, archiveLocation, strerror(errno));

src/backend/storage/file/fd.c

-6
Original file line numberDiff line numberDiff line change
@@ -1956,12 +1956,6 @@ ReadDir(DIR *dir, const char *dirname)
19561956
if ((dent = readdir(dir)) != NULL)
19571957
return dent;
19581958

1959-
#ifdef WIN32
1960-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
1961-
if (GetLastError() == ERROR_NO_MORE_FILES)
1962-
errno = 0;
1963-
#endif
1964-
19651959
if (errno)
19661960
ereport(ERROR,
19671961
(errcode_for_file_access(),

src/bin/initdb/initdb.c

-6
Original file line numberDiff line numberDiff line change
@@ -564,12 +564,6 @@ walkdir(char *path, void (*action) (char *fname, bool isdir))
564564
(*action) (subpath, false);
565565
}
566566

567-
#ifdef WIN32
568-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
569-
if (GetLastError() == ERROR_NO_MORE_FILES)
570-
errno = 0;
571-
#endif
572-
573567
if (errno)
574568
{
575569
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),

src/bin/pg_basebackup/pg_receivexlog.c

-6
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,6 @@ FindStreamingStart(uint32 *tli)
209209
}
210210
}
211211

212-
#ifdef WIN32
213-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
214-
if (GetLastError() == ERROR_NO_MORE_FILES)
215-
errno = 0;
216-
#endif
217-
218212
if (errno)
219213
{
220214
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),

src/bin/pg_dump/pg_backup_directory.c

-6
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ InitArchiveFmt_Directory(ArchiveHandle *AH)
186186
}
187187
}
188188

189-
#ifdef WIN32
190-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
191-
if (GetLastError() == ERROR_NO_MORE_FILES)
192-
errno = 0;
193-
#endif
194-
195189
if (errno)
196190
exit_horribly(modulename, "could not read directory \"%s\": %s\n",
197191
ctx->directory, strerror(errno));

src/bin/pg_resetxlog/pg_resetxlog.c

-18
Original file line numberDiff line numberDiff line change
@@ -845,12 +845,6 @@ FindEndOfXLOG(void)
845845
}
846846
}
847847

848-
#ifdef WIN32
849-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
850-
if (GetLastError() == ERROR_NO_MORE_FILES)
851-
errno = 0;
852-
#endif
853-
854848
if (errno)
855849
{
856850
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
@@ -908,12 +902,6 @@ KillExistingXLOG(void)
908902
}
909903
}
910904

911-
#ifdef WIN32
912-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
913-
if (GetLastError() == ERROR_NO_MORE_FILES)
914-
errno = 0;
915-
#endif
916-
917905
if (errno)
918906
{
919907
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
@@ -966,12 +954,6 @@ KillExistingArchiveStatus(void)
966954
}
967955
}
968956

969-
#ifdef WIN32
970-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
971-
if (GetLastError() == ERROR_NO_MORE_FILES)
972-
errno = 0;
973-
#endif
974-
975957
if (errno)
976958
{
977959
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),

src/common/pgfnames.c

-6
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ pgfnames(const char *path)
6464
}
6565
}
6666

67-
#ifdef WIN32
68-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
69-
if (GetLastError() == ERROR_NO_MORE_FILES)
70-
errno = 0;
71-
#endif
72-
7367
if (errno)
7468
{
7569
#ifndef FRONTEND

src/port/pgcheckdir.c

-6
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ pg_check_dir(const char *dir)
6464
}
6565
}
6666

67-
#ifdef WIN32
68-
/* Bug in old Mingw dirent.c; fixed in mingw-runtime-3.2, 2003-10-10 */
69-
if (GetLastError() == ERROR_NO_MORE_FILES)
70-
errno = 0;
71-
#endif
72-
7367
if (errno || closedir(chkdir))
7468
result = -1; /* some kind of I/O error? */
7569

0 commit comments

Comments
 (0)