1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Allow libpgport to call memory allocation routines even though

CurrentMemoryContext is DLLIMPORT on Win32.  Work around that by
creating stubs in the backend for palloc/pstrdup.

Also fix pg_dumpall to do proper quoting on Win32.
This commit is contained in:
Bruce Momjian
2004-08-08 06:44:36 +00:00
parent 881ea47d24
commit 7ee3c35152
5 changed files with 72 additions and 6 deletions

View File

@ -21,7 +21,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/palloc.h,v 1.27 2003/11/29 22:41:15 pgsql Exp $
* $PostgreSQL: pgsql/src/include/utils/palloc.h,v 1.28 2004/08/08 06:44:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -80,4 +80,9 @@ extern char *MemoryContextStrdup(MemoryContext context, const char *string);
#define pstrdup(str) MemoryContextStrdup(CurrentMemoryContext, (str))
/* Used for Win32 */
void *pgport_palloc(Size sz);
char *pgport_pstrdup(const char *str);
void pgport_pfree(void *pointer);
#endif /* PALLOC_H */