Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e2e1a0c

Browse files
committed
Move undef of rename/unlink so system declarations are unmodified.
1 parent 3036b84 commit e2e1a0c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/port/dirmod.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.24 2004/09/10 02:49:37 momjian Exp $
13+
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.25 2004/09/10 09:53:08 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -21,6 +21,12 @@
2121
#include "postgres_fe.h"
2222
#endif
2323

24+
/* Don't modify declarations in system headers */
25+
#if defined(WIN32) || defined(__CYGWIN__)
26+
#undef rename
27+
#undef unlink
28+
#endif
29+
2430
#include <unistd.h>
2531
#include <dirent.h>
2632
#include <sys/stat.h>
@@ -33,9 +39,6 @@
3339

3440
#include "miscadmin.h"
3541

36-
#undef rename
37-
#undef unlink
38-
3942
#ifndef __CYGWIN__
4043
#include <winioctl.h>
4144
#else

0 commit comments

Comments
 (0)