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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/port/dirmod.c b/src/port/dirmod.c
index 792c3f21b6..087116c42c 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.52 2008/04/10 16:58:51 mha Exp $
+ * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.53 2008/04/11 23:53:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -449,13 +449,15 @@ report_and_fail:
}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
+
+#undef stat
+
/*
* The stat() function in win32 is not guaranteed to update the st_size
* field when run. So we define our own version that uses the Win32 API
* to update this field.
*/
-#undef stat
int
pgwin32_safestat(const char *path, struct stat *buf)
{
@@ -480,4 +482,5 @@ pgwin32_safestat(const char *path, struct stat *buf)
return 0;
}
+
#endif