Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1494931

Browse files
committed
Remove MinGW readdir/errno bug workaround fixed on 2003-10-10
1 parent6f03927 commit1494931

File tree

9 files changed

+0
-66
lines changed

9 files changed

+0
-66
lines changed

‎contrib/pg_archivecleanup/pg_archivecleanup.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ CleanupPriorWALFiles(void)
165165
}
166166
}
167167

168-
#ifdefWIN32
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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,6 @@ CustomizableCleanupPriorWALFiles(void)
284284
}
285285
}
286286

287-
#ifdefWIN32
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

Lines changed: 0 additions & 6 deletions
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
returndent;
19581958

1959-
#ifdefWIN32
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

Lines changed: 0 additions & 6 deletions
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-
#ifdefWIN32
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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,6 @@ FindStreamingStart(uint32 *tli)
209209
}
210210
}
211211

212-
#ifdefWIN32
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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ InitArchiveFmt_Directory(ArchiveHandle *AH)
186186
}
187187
}
188188

189-
#ifdefWIN32
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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -845,12 +845,6 @@ FindEndOfXLOG(void)
845845
}
846846
}
847847

848-
#ifdefWIN32
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-
#ifdefWIN32
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-
#ifdefWIN32
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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ pgfnames(const char *path)
6464
}
6565
}
6666

67-
#ifdefWIN32
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
#ifndefFRONTEND

‎src/port/pgcheckdir.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ pg_check_dir(const char *dir)
6464
}
6565
}
6666

67-
#ifdefWIN32
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)

[8]ページ先頭

©2009-2025 Movatter.jp