summaryrefslogtreecommitdiff
path: root/src/bin/pg_resetxlog/pg_resetxlog.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-02-17 03:45:17 +0000
committerBruce Momjian <bruce@momjian.us>2004-02-17 03:45:17 +0000
commit1f17316a3d472156ec8086c1760a7097c671eaa2 (patch)
tree5a5764f7391735a7f1e4b1cdd01d691e4662d57d /src/bin/pg_resetxlog/pg_resetxlog.c
parentec6feaaed4f9fd8fe71e6de888cb1dd72b0872c8 (diff)
Here is an updated version of the win32 readdir patch.
1) Now puts in exactly the same change as the current-cvs mingw code does. (see http://cvs.sourceforge.net/viewcvs.py/mingw/runtime/mingwex/dirent.c?r1= 1.3&r2=1.4, second part of the patch). 2) Updates both xlog.c and slru.c in backend/access/transam/ 3) Also updates pg_resetxlog, which also uses readdir() and checks the errno value after the loop. Magnus Hagander
Diffstat (limited to 'src/bin/pg_resetxlog/pg_resetxlog.c')
-rw-r--r--src/bin/pg_resetxlog/pg_resetxlog.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c
index 9049aed099d..d97948185fe 100644
--- a/src/bin/pg_resetxlog/pg_resetxlog.c
+++ b/src/bin/pg_resetxlog/pg_resetxlog.c
@@ -23,7 +23,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.15 2004/02/11 22:55:25 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.16 2004/02/17 03:45:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -611,6 +611,12 @@ KillExistingXLOG(void)
}
errno = 0;
}
+#ifdef WIN32
+ /* This fix is in mingw cvs (runtime/mingwex/dirent.c rev 1.4), but
+ not in released version */
+ if (GetLastError() == ERROR_NO_MORE_FILES)
+ errno = 0;
+#endif
if (errno)
{