diff options
| author | Bruce Momjian <bruce@momjian.us> | 2004-08-08 06:44:36 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2004-08-08 06:44:36 +0000 |
| commit | 7ee3c351522694dc6f8f0d6578394bdf5dec0b59 (patch) | |
| tree | ca89b755bf06e58f99c44a2dee918b6c4bc23038 /src/include | |
| parent | 881ea47d248069a9597c292ca76891a67b1a6d6f (diff) | |
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.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/port.h | 3 | ||||
| -rw-r--r-- | src/include/utils/palloc.h | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/include/port.h b/src/include/port.h index c2bcea78bfb..e7ffdce362e 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/port.h,v 1.49 2004/08/08 01:43:33 momjian Exp $ + * $PostgreSQL: pgsql/src/include/port.h,v 1.50 2004/08/08 06:44:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -151,6 +151,7 @@ extern int pgsymlink(const char *oldpath, const char *newpath); #define rename(from, to) pgrename(from, to) #define unlink(path) pgunlink(path) #define symlink(oldpath, newpath) pgsymlink(oldpath, newpath) + #endif extern bool rmtree(char *path, bool rmtopdir); diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h index b0a6760f5ed..8dfa98bf978 100644 --- a/src/include/utils/palloc.h +++ b/src/include/utils/palloc.h @@ -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 */ |
