Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-09 Thread Magnus Hagander
2010/3/9 Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp: Magnus Hagander mag...@hagander.net wrote: The existing mechanism works (as demonstrated by the fact that the contrib modules work on Windows). Did we use non-standard tools except msvc in the build framework for core code?

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-08 Thread Magnus Hagander
2010/3/8 Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp: Tom Lane t...@sss.pgh.pa.us wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: I'd like to propose to define PGALWAYSEXPORT macro:     #ifdef WIN32     #define PGALWAYSEXPORT  __declspec (dllexport)     #endif and

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-08 Thread Takahiro Itagaki
Magnus Hagander mag...@hagander.net wrote: The existing mechanism works (as demonstrated by the fact that the contrib modules work on Windows). Did we use non-standard tools except msvc in the build framework for core code? And what should I do for an external project? Yes, we use

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-07 Thread Takahiro Itagaki
Kevin Flanagan kevi...@linkprior.com wrote: 1. you have to define the symbol BUILDING_DLL in your code before including postgres.h No, BUILDING_DLL does not work. We use PGDLLIMPORT both exported global variables and PG_MODULE_MAGIC/PG_FUNCTION_INFO_V1 for now, but actually we should always

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-07 Thread Tom Lane
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: I'd like to propose to define PGALWAYSEXPORT macro: #ifdef WIN32 #define PGALWAYSEXPORT __declspec (dllexport) #endif and modify PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 to use it instead of PGDLLEXPORT. This seems like

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-07 Thread Takahiro Itagaki
Tom Lane t...@sss.pgh.pa.us wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: I'd like to propose to define PGALWAYSEXPORT macro: #ifdef WIN32 #define PGALWAYSEXPORT __declspec (dllexport) #endif and modify PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 to use it

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 4:02 AM, Craig Ringer cr...@postnewspapers.com.au wrote: Kevin Flanagan wrote: the compiler complained about various missing include files, starting with ‘libintl.h’. Having read the post at http://archives.postgresql.org/pgsql-general/2009-03/msg00332.php I created

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Dave Page wrote: On Fri, Mar 5, 2010 at 4:02 AM, Craig Ringer cr...@postnewspapers.com.au wrote: Kevin Flanagan wrote: the compiler complained about various missing include files, starting with ‘libintl.h’. Having read the post at

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 9:05 AM, Craig Ringer cr...@postnewspapers.com.au wrote: How do _you_ go about building server extensions for Pg? Where do you get the headers for gettext etc? Same place I get the binaries - gnuwin32 mostly. I'm increasingly thinking the win32 package _should_ be

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Dave Page wrote: On Fri, Mar 5, 2010 at 9:05 AM, Craig Ringer cr...@postnewspapers.com.au wrote: How do _you_ go about building server extensions for Pg? Where do you get the headers for gettext etc? Same place I get the binaries - gnuwin32 mostly. I'm increasingly thinking the win32

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 9:31 AM, Craig Ringer cr...@postnewspapers.com.au wrote: Why _not_ distribute gettext headers, though? Sources I can understand for size reasons, but the headers are small and fuss free, and you need the _right_ _versions_ to build against the Pg backend. No reason,

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Dave Page wrote: On Fri, Mar 5, 2010 at 9:31 AM, Craig Ringer cr...@postnewspapers.com.au wrote: Why _not_ distribute gettext headers, though? Sources I can understand for size reasons, but the headers are small and fuss free, and you need the _right_ _versions_ to build against the Pg

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Kevin Flanagan
Ringer [mailto:cr...@postnewspapers.com.au] Sent: 05 March 2010 04:02 To: Kevin Flanagan Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks? Kevin Flanagan wrote: the compiler complained about various missing include files, starting

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Kevin Flanagan wrote: Ok, re building with the win32 configuration ... that sounds like just the thing I should know about. All I've done is downloaded and installed the 1-click installer for Windows from http://www.enterprisedb.com/products/pgdownload.do#windows ... so while I'm sure it

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 9:50 AM, Craig Ringer cr...@postnewspapers.com.au wrote: Dave Page wrote: On Fri, Mar 5, 2010 at 9:31 AM, Craig Ringer cr...@postnewspapers.com.au wrote: Why _not_ distribute gettext headers, though? Sources I can understand for size reasons, but the headers are small

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Kevin Flanagan
To: Kevin Flanagan Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks? Kevin Flanagan wrote: Ok, re building with the win32 configuration ... that sounds like just the thing I should know about. All I've done is downloaded

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-04 Thread Craig Ringer
Kevin Flanagan wrote: the compiler complained about various missing include files, starting with ‘libintl.h’. Having read the post at http://archives.postgresql.org/pgsql-general/2009-03/msg00332.php I created an empty libint.h in an include dir NFI why Pg for win32 doesn't bundle a copy of