This is a discussion on Re: [HACKERS] contrib/pg_buffercache within the Pgsql Patches forums, part of the PostgreSQL category; --> Andrew Dunstan wrote: > It fixes the build error on Windows - haven't tried because i don't have > ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 */ ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org |
| ||||
| 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 ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend |