From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>, Christoph Berg <myon(at)debian(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pl/perl extension fails on Windows |
Date: | 2017-08-10 14:36:11 |
Message-ID: | 12588.1502375771@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Aug 10, 2017 at 8:30 AM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:
>> So, the question is should we allow the preprocessor option
>> '_USE_32BIT_TIME_T' to be defined implicitly or not in postgresql
>> provided we are using Visual C compiler version > 8.0. I think this
>> should make plperl compatible with perl binaries.
> We've got this code in MSBuildProject.pm and VCBuildProject.pm:
> # We have to use this flag on 32 bit targets because the 32bit perls
> # are built with it and sometimes crash if we don't.
> my $use_32bit_time_t =
> $self->{platform} eq 'Win32' ? '_USE_32BIT_TIME_T;' : '';
> Based on the discussion upthread, I think we now know that this was
> not really the right approach.
Yeah ... however, if that's there, then there's something wrong with
Ashutosh's explanation, because that means we *are* building with
_USE_32BIT_TIME_T in 32-bit builds. It's just getting there in a
roundabout way. (Or, alternatively, this code is somehow not doing
anything at all.)
> The trouble with that is that _USE_32BIT_TIME_T also affects how
> PostgreSQL code compiles.
Really? We try to avoid touching "time_t" at all in most of the code.
I bet that we could drop the above-cited code, and compile only plperl
with _USE_32BIT_TIME_T, taken (if present) from the Perl flags, and
it'd be fine. At least, that's my first instinct for what to try.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-08-10 14:56:53 | Re: reload-through-the-top-parent switch the partition table |
Previous Message | Chris Travers | 2017-08-10 14:26:52 | Re: Funny WAL corruption issue |