Provide 64-bit ftruncate() and lseek() on Windows.
authorThomas Munro <tmunro@postgresql.org>
Wed, 8 Jan 2025 23:10:26 +0000 (12:10 +1300)
committerThomas Munro <tmunro@postgresql.org>
Thu, 9 Jan 2025 01:57:52 +0000 (14:57 +1300)
commit1636c5e56ed72e53127fc4cb0095422d9a0d250a
tree9f75f1f83d9f1071011af48c889c406c0e9c87d4
parent049c8cb9a239c9b7136174eb038fc7cd902b487e
Provide 64-bit ftruncate() and lseek() on Windows.

Change our ftruncate() macro to use the 64-bit variant of chsize(), and
add a new macro to redirect lseek() to _lseeki64().

Back-patch to all supported releases, in preparation for a bug fix.

Tested-by: Davinder Singh <davinder.singh@enterprisedb.com>
Discussion: http://postgr.es/m/CAKZiRmyM4YnokK6Oenw5JKwAQ3rhP0YTz2T-tiw5dAQjGRXE3Q%40mail.gmail.com
src/include/port.h
src/include/port/win32_port.h
src/pl/plperl/plperl_system.h