diff options
author | Tom Lane | 2005-09-03 15:55:00 +0000 |
---|---|---|
committer | Tom Lane | 2005-09-03 15:55:00 +0000 |
commit | ad314efdc2e8dcb8318203398e7a3c653099651c (patch) | |
tree | 6bf81df05fcb1b464f3929defcb22e16b62f3484 | |
parent | c326b90700f45862c385acf4680d6b316bdf80d2 (diff) |
libpgport routines need nonstandard palloc to work on Windows.
Propagate hack that's in dirmod.c to copydir.c.
-rw-r--r-- | src/port/copydir.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/port/copydir.c b/src/port/copydir.c index cc54be216b..7e38de9fe6 100644 --- a/src/port/copydir.c +++ b/src/port/copydir.c @@ -24,6 +24,17 @@ #include "storage/fd.h" +/* + * On Windows, call non-macro versions of palloc; we can't reference + * CurrentMemoryContext in this file because of DLLIMPORT conflict. + */ +#if defined(WIN32) || defined(__CYGWIN__) +#undef palloc +#undef pstrdup +#define palloc(sz) pgport_palloc(sz) +#define pstrdup(str) pgport_pstrdup(str) +#endif + static void copy_file(char *fromfile, char *tofile); |