postgresql/src
Tom Lane bed90759fc Fix our Windows stat() emulation to handle file sizes > 4GB.
Hack things so that our idea of "struct stat" is equivalent to Windows'
struct __stat64, allowing it to have a wide enough st_size field.

Instead of relying on native stat(), use GetFileInformationByHandle().
This avoids a number of issues with Microsoft's multiple and rather
slipshod emulations of stat().  We still need to jump through hoops
to deal with ERROR_DELETE_PENDING, though :-(

Pull the relevant support code out of dirmod.c and put it into
its own file, win32stat.c.

Still TODO: do we need to do something different with lstat(),
rather than treating it identically to stat()?

Juan José Santamaría Flecha, reviewed by Emil Iggland;
based on prior work by Michael Paquier, Sergey Zubkovsky, and others

Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905CF5099@g01jpexmbkw24
Discussion: https://postgr.es/m/15858-9572469fd3b73263@postgresql.org
2020-10-09 16:20:12 -04:00
..
backend Fix typos in logical.c and reorderbuffer.c. 2020-10-09 08:16:43 +05:30
bin Clean up after newly-added tests for pg_test_fsync and pg_test_timing. 2020-10-07 13:27:33 -04:00
common Remove logging.c from the shared library of src/common/ 2020-10-01 10:37:34 +09:00
fe_utils Standardize the printf format for st_size 2020-09-24 21:04:21 +02:00
include Fix our Windows stat() emulation to handle file sizes > 4GB. 2020-10-09 16:20:12 -04:00
interfaces Remove arbitrary line length limit for libpq service files. 2020-09-22 15:59:23 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Support for OUT parameters in procedures 2020-10-05 09:21:43 +02:00
port Fix our Windows stat() emulation to handle file sizes > 4GB. 2020-10-09 16:20:12 -04:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Avoid gratuitous inaccuracy in numeric width_bucket(). 2020-10-08 13:06:27 -04:00
timezone Ensure that distributed timezone abbreviation files are plain ASCII. 2020-07-17 11:03:55 -04:00
tools Fix our Windows stat() emulation to handle file sizes > 4GB. 2020-10-09 16:20:12 -04:00
tutorial Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Split Makefile symbol CFLAGS_VECTOR into two symbols. 2020-09-06 21:28:16 -04:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00