]> granicus.if.org Git - postgresql/commitdiff
Move undef of rename/unlink so system declarations are unmodified.
authorBruce Momjian <bruce@momjian.us>
Fri, 10 Sep 2004 09:53:08 +0000 (09:53 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 10 Sep 2004 09:53:08 +0000 (09:53 +0000)
src/port/dirmod.c

index 89d2d39a26b5b0dd70c5783e074dc7272dcbd94b..f2913b9f91538d8416f505c9bbbac606c54ac21b 100644 (file)
@@ -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.24 2004/09/10 02:49:37 momjian Exp $
+ *       $PostgreSQL: pgsql/src/port/dirmod.c,v 1.25 2004/09/10 09:53:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres_fe.h"
 #endif
 
+/* Don't modify declarations in system headers */
+#if defined(WIN32) || defined(__CYGWIN__)
+#undef rename
+#undef unlink
+#endif
+
 #include <unistd.h>
 #include <dirent.h>
 #include <sys/stat.h>
@@ -33,9 +39,6 @@
 
 #include "miscadmin.h"
 
-#undef rename
-#undef unlink
-
 #ifndef __CYGWIN__
 #include <winioctl.h>
 #else