pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: williamedwinallen@live.com, pgsql-bugs@lists.postgresql.org, Magnus Hagander <magnus@hagander.net>
Subject: Re: BUG #15858: could not stat file - over 4GB
Date: Fri, 23 Aug 2019 17:49:20 -0400
Message-ID: <19504.1566596960@sss.pgh.pa.us> (raw)
In-Reply-To: <CAC+AXB2VAQ+ZTxXKStyijEac6rJOa0HvSEOikfF4+Pm5Q_3dvg@mail.gmail.com>
References: <15858-9572469fd3b73263@postgresql.org>
	<20190619012604.GC2135@paquier.xyz>
	<CAC+AXB0j9pN4z5XxMbn6+kcE_QM+CErjfYp-vVz2rU4suU7u=g@mail.gmail.com>
	<16138.1560966010@sss.pgh.pa.us>
	<17044.1560967356@sss.pgh.pa.us>
	<CAC+AXB2Fu5oJm7pmS1Pg3Gf_XyxSfun1DA7dPf+yZFQ3p5vV3g@mail.gmail.com>
	<20190626022236.GE1714@paquier.xyz>
	<CAC+AXB2VAQ+ZTxXKStyijEac6rJOa0HvSEOikfF4+Pm5Q_3dvg@mail.gmail.com>

=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santamaria@gmail.com> writes:
> On Wed, Jun 26, 2019 at 4:23 AM Michael Paquier <michael@paquier.xyz> wrote:
>> It seems to me that you don't need the configure changes.

> The changes in configuration are meant for gcc compilations in Windows
> (Cygwin and Mingw).

Directly editing the configure script is Not Done ... or at least,
such changes wouldn't survive the next correctly-done configure
update.  You have to edit configure.in (or one of the sub-files in
config/) and then regenerate configure using autoconf.

It seems likely that we *don't* need or want this for Cygwin;
that should be providing a reasonable stat() emulation already.
So probably you just want to add "AC_LIBOBJ(win32_stat)" to
the stanza beginning

	# Win32 (really MinGW) support
	if test "$PORTNAME" = "win32"; then
	  AC_CHECK_FUNCS(_configthreadlocale)
	  AC_REPLACE_FUNCS(gettimeofday)
	  AC_LIBOBJ(dirmod)


I'd also recommend that stat() fill all the fields in struct stat,
even if you don't have anything better to put there than zeroes.
Otherwise you're just opening things up for random misbehavior.

I'm not in a position to comment on the details of the conversion from
GetFileAttributesEx results to struct stat, but in general this
seems like a reasonable way to proceed.

			regards, tom lane





view thread (45+ messages)  latest in thread

Message-ID: <19504.1566596960@sss.pgh.pa.us>
Permalink:  ../19504.1566596960@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19504.1566596960@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, juanjo.santamaria@gmail.com, michael@paquier.xyz, magnus@hagander.net
  Subject: Re: BUG #15858: could not stat file - over 4GB
  In-Reply-To: <19504.1566596960@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox