Re: pl/perl extension fails on Windows

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Christoph Berg <myon@debian.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-08-14T13:42:46Z
Lists: pgsql-hackers
Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> writes:
> On Thu, Aug 10, 2017 at 9:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Got it.  So in short, it seems like the attached patch ought to fix it
>> for MSVC builds.  (We'd also need to teach PGAC_CHECK_PERL_EMBED_CCFLAGS
>> to let _USE_32BIT_TIME_T through on Windows, but let's confirm the theory
>> first.)

> We built the sources with this patch and were able to create the plperl
> extension on Windows 32bit and 64bit.

Excellent, thanks for testing.  I'll finish up the configure-script part
and push this shortly.

			regards, tom lane


Commits

  1. MSVC: Test whether 32-bit Perl needs -D_USE_32BIT_TIME_T.

  2. Further tweaks to compiler flags for PL/Perl on Windows.

  3. Absorb -D_USE_32BIT_TIME_T switch from Perl, if relevant.

  4. PL/Perl portability fix: absorb relevant -D switches from Perl.

  5. PL/Perl portability fix: avoid including XSUB.h in plperl.c.