Re: BUG #15858: could not stat file - over 4GB

Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>

From: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Emil Iggland <emil@iggland.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-02-29T11:36:05Z
Lists: pgsql-bugs, pgsql-hackers

Attachments

On Sat, Feb 29, 2020 at 9:40 AM Juan José Santamaría Flecha <
juanjo.santamaria@gmail.com> wrote:

> On Sat, Feb 29, 2020 at 12:44 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>>
>> The cfbot thinks this doesn't compile on Windows [1].  Looks like perhaps
>> a missing-#include problem?
>
>
> The define logic for _WIN32_WINNT includes testing of _MSC_VER, and is not
> a proper choice for MSVC 2013 as the cfbot is showing.
>

The cfbot is not happy yet. I will backtrack a bit on the cruft cleanup.

Please find attached a new version addressing this issue.

Regards,

Juan José Santamaría Flecha

>
>>
>

Commits

  1. Minor cleanup for win32stat.c.

  2. plperl.h should #undef fstat along with stat and lstat.

  3. Fix our Windows stat() emulation to handle file sizes > 4GB.