summaryrefslogtreecommitdiff
path: root/src/port/dirmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/dirmod.c')
-rw-r--r--src/port/dirmod.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/port/dirmod.c b/src/port/dirmod.c
index e1f7527b33d..beec1272ce8 100644
--- a/src/port/dirmod.c
+++ b/src/port/dirmod.c
@@ -10,7 +10,7 @@
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.47 2007/01/19 16:42:24 alvherre Exp $
+ * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.48 2007/07/12 23:28:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -103,6 +103,7 @@ fe_repalloc(void *pointer, Size size)
}
return res;
}
+
#endif /* FRONTEND */
@@ -169,8 +170,14 @@ pgunlink(const char *path)
return 0;
}
+/* We undefined these above; now redefine for possible use below */
+#define rename(from, to) pgrename(from, to)
+#define unlink(path) pgunlink(path)
+
+#endif /* defined(WIN32) || defined(__CYGWIN__) */
+
-#ifdef WIN32 /* Cygwin has its own symlinks */
+#if defined(WIN32) && !defined(__CYGWIN__) /* Cygwin has its own symlinks */
/*
* pgsymlink support:
@@ -276,14 +283,8 @@ pgsymlink(const char *oldpath, const char *newpath)
return 0;
}
-#endif /* WIN32 */
-#endif /* defined(WIN32) || defined(__CYGWIN__) */
-
-/* We undefined this above, so we redefine it */
-#if defined(WIN32) || defined(__CYGWIN__)
-#define unlink(path) pgunlink(path)
-#endif
+#endif /* defined(WIN32) && !defined(__CYGWIN__) */
/*