Provide 64-bit ftruncate() and lseek() on Windows.
authorThomas Munro
Wed, 8 Jan 2025 23:10:26 +0000 (12:10 +1300)
committerThomas Munro
Thu, 9 Jan 2025 02:00:58 +0000 (15:00 +1300)
commit026762dae39d6efcbfa99a18a15fdfeecbd5b9cc
tree183c068e7778696618b640b608e1427b74c1a22a
parent229e7793d96954739d3fb9b37e2ccf77c2803f07
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
Discussion: https://postgr.es/m/CAKZiRmyM4YnokK6Oenw5JKwAQ3rhP0YTz2T-tiw5dAQjGRXE3Q%40mail.gmail.com
src/include/port.h
src/include/port/win32_port.h
src/pl/plperl/plperl_system.h