aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-04-22 02:18:09 +0000
committerBruce Momjian <bruce@momjian.us>2003-04-22 02:18:09 +0000
commitdfc6649c4d849f6252da6c119dfd92e202cb86a8 (patch)
tree58a5d0910aee13b333824698c7fbaa91ad5f3da6 /src
parent5ed27e35f35f6c354b1a7120ec3a3ce57f93e73e (diff)
downloadpostgresql-dfc6649c4d849f6252da6c119dfd92e202cb86a8.tar.gz
postgresql-dfc6649c4d849f6252da6c119dfd92e202cb86a8.zip
Add Win32 versions of unlink and rename --- loop until success.
Diffstat (limited to 'src')
-rw-r--r--src/include/c.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 8b92a98793a..833312b9d6a 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.138 2003/04/18 01:03:42 momjian Exp $
+ * $Id: c.h,v 1.139 2003/04/22 02:18:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -711,6 +711,17 @@ int fseeko(FILE *stream, off_t offset, int whence);
off_t ftello(FILE *stream);
#endif
+/*
+ * Win32 doesn't have reliable rename/unlink during concurrent access
+ */
+#ifdef WIN32
+int pgrename(const char *from, const char *to);
+int pgunlink(const char *path);
+#define rename(path) pgrename(path)
+#define unlink(from, to) pgunlink(from, to)
+#endif
+
+
/* These are for things that are one way on Unix and another on NT */
#define NULL_DEV "/dev/null"