Skip to content

Commit a17dbec

Browse files
committed
libpgport routines need nonstandard palloc to work on Windows.
Propagate hack that's in dirmod.c to copydir.c.
1 parent b72fe49 commit a17dbec

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/port/copydir.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* as a service.
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/port/copydir.c,v 1.13 2005/09/02 18:55:32 tgl Exp $
14+
* $PostgreSQL: pgsql/src/port/copydir.c,v 1.14 2005/09/03 15:55:00 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -24,6 +24,17 @@
2424

2525
#include "storage/fd.h"
2626

27+
/*
28+
* On Windows, call non-macro versions of palloc; we can't reference
29+
* CurrentMemoryContext in this file because of DLLIMPORT conflict.
30+
*/
31+
#if defined(WIN32) || defined(__CYGWIN__)
32+
#undef palloc
33+
#undef pstrdup
34+
#define palloc(sz) pgport_palloc(sz)
35+
#define pstrdup(str) pgport_pstrdup(str)
36+
#endif
37+
2738

2839
static void copy_file(char *fromfile, char *tofile);
2940

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy