mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Remove MinGW readdir/errno bug workaround fixed on 2003-10-10
This commit is contained in:
parent
6f03927fce
commit
1494931d73
@ -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)
|
if (errno)
|
||||||
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
|
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
|
||||||
progname, archiveLocation, strerror(errno));
|
progname, archiveLocation, strerror(errno));
|
||||||
|
@ -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)
|
if (errno)
|
||||||
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
|
fprintf(stderr, "%s: could not read archive location \"%s\": %s\n",
|
||||||
progname, archiveLocation, strerror(errno));
|
progname, archiveLocation, strerror(errno));
|
||||||
|
@ -1956,12 +1956,6 @@ ReadDir(DIR *dir, const char *dirname)
|
|||||||
if ((dent = readdir(dir)) != NULL)
|
if ((dent = readdir(dir)) != NULL)
|
||||||
return dent;
|
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)
|
if (errno)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode_for_file_access(),
|
(errcode_for_file_access(),
|
||||||
|
@ -564,12 +564,6 @@ walkdir(char *path, void (*action) (char *fname, bool isdir))
|
|||||||
(*action) (subpath, false);
|
(*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)
|
if (errno)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
||||||
|
@ -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)
|
if (errno)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
||||||
|
@ -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)
|
if (errno)
|
||||||
exit_horribly(modulename, "could not read directory \"%s\": %s\n",
|
exit_horribly(modulename, "could not read directory \"%s\": %s\n",
|
||||||
ctx->directory, strerror(errno));
|
ctx->directory, strerror(errno));
|
||||||
|
@ -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)
|
if (errno)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
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)
|
if (errno)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
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)
|
if (errno)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
|
||||||
|
@ -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)
|
if (errno)
|
||||||
{
|
{
|
||||||
#ifndef FRONTEND
|
#ifndef FRONTEND
|
||||||
|
@ -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))
|
if (errno || closedir(chkdir))
|
||||||
result = -1; /* some kind of I/O error? */
|
result = -1; /* some kind of I/O error? */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user