diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-09-03 15:55:00 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-09-03 15:55:00 +0000 |
commit | a17dbec893b6b7b419c61e5e6f3f325537dab0b8 (patch) | |
tree | 7838da3ceaeb0c2738ee0483beb3a3dd6d0e6d50 /src | |
parent | b72fe49b9c28540c3fb3d129d0e4b49cec585fa2 (diff) | |
download | postgresql-a17dbec893b6b7b419c61e5e6f3f325537dab0b8.tar.gz postgresql-a17dbec893b6b7b419c61e5e6f3f325537dab0b8.zip |
libpgport routines need nonstandard palloc to work on Windows.
Propagate hack that's in dirmod.c to copydir.c.
Diffstat (limited to 'src')
-rw-r--r-- | src/port/copydir.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/port/copydir.c b/src/port/copydir.c index 4820917cda4..a5cd967ed70 100644 --- a/src/port/copydir.c +++ b/src/port/copydir.c @@ -11,7 +11,7 @@ * as a service. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/copydir.c,v 1.13 2005/09/02 18:55:32 tgl Exp $ + * $PostgreSQL: pgsql/src/port/copydir.c,v 1.14 2005/09/03 15:55:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -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); |