Обсуждение: Re: [HACKERS] contrib/pg_buffercache

Поиск
Список
Период
Сортировка

Re: [HACKERS] contrib/pg_buffercache

От
Mark Kirkwood
Дата:
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 */


Re: [HACKERS] contrib/pg_buffercache

От
Andrew Dunstan
Дата:

Mark Kirkwood wrote:

> 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.
>
>

You figured correctly.

cheers

andrew