From: Bruce Momjian Date: Sun, 29 Aug 2004 02:58:50 +0000 (+0000) Subject: Several Cygwin fixes pointed out by Reini Urban. X-Git-Tag: REL8_0_0BETA2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0476bbbc9be45358c6e8e5449555adf4d7fe33d3;p=postgresql Several Cygwin fixes pointed out by Reini Urban. --- diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index 28e9d26a2f..5cf364fa10 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.47 2004/08/08 06:44:32 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.48 2004/08/29 02:58:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -631,7 +631,7 @@ MemoryContextStrdup(MemoryContext context, const char *string) } -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) /* * Memory support routines for libpgport on Win32 * @@ -649,6 +649,7 @@ pgport_palloc(Size sz) return palloc(sz); } + char * pgport_pstrdup(const char *str) { diff --git a/src/port/dirmod.c b/src/port/dirmod.c index 1c9ad19c0c..ba01a3d7fe 100644 --- a/src/port/dirmod.c +++ b/src/port/dirmod.c @@ -10,7 +10,7 @@ * Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.19 2004/08/29 01:44:02 momjian Exp $ + * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.20 2004/08/29 02:58:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,18 +31,27 @@ #if defined(WIN32) || defined(__CYGWIN__) - #include "miscadmin.h" -#include #undef rename #undef unlink +#ifdef __WIN32__ +#include +#else +/* __CYGWIN__ */ +#include +#include +#endif + #ifndef FRONTEND /* * Call non-macro versions of palloc, can't reference CurrentMemoryContext * because of DLLIMPORT. */ +#undef palloc +#undef pstrdup +#undef pfree #define palloc(sz) pgport_palloc(sz) #define pstrdup(str) pgport_pstrdup(str) #define pfree(pointer) pgport_pfree(pointer)