Re: contrib/pg_buffercache - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: contrib/pg_buffercache
Date
Msg-id 4238D398.1080708@paradise.net.nz
Whole thread Raw
In response to Re: contrib/pg_buffercache  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: contrib/pg_buffercache
List pgsql-hackers
Andrew Dunstan wrote:
> It fixes the build error on Windows - haven't tried because i don't have
> time, but I know it won't work on Cygwin, because WIN32 isn't (usually)
> defined on Cygwin - see previous almost endless discussions.
>

Yes - I recall that discussion a while ago.

This patch should sort the issue.

One question, should I be using defined(__MINGW32__) as opposed to
defined(WIN32)? I figured I didn't as in this case it is not necessary
to distinguish between native and cygwin.

regards

Mark




*** pg_buffercache_pages.h.orig    Thu Mar 17 10:12:20 2005
--- pg_buffercache_pages.h    Thu Mar 17 13:44:45 2005
***************
*** 15,18 ****
--- 15,24 ----

  extern Datum pg_buffercache_pages(PG_FUNCTION_ARGS);

+ /* A little hackery for Windows and Cygwin */
+ #if defined (WIN32) || defined (__CYGWIN__)
+ extern DLLIMPORT BufferDesc            *BufferDescriptors;
+ extern DLLIMPORT volatile uint32    InterruptHoldoffCount;
+ #endif
+
  #endif  /* PG_BUFFERCACHE_PAGES_H */


pgsql-hackers by date:

Previous
From: Satoshi Nagayasu
Date:
Subject: Re: read-only database
Next
From: Andrew Dunstan
Date:
Subject: Re: contrib/pg_buffercache