Re: Fix fseek() detection of unseekable files on WIN32
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2023-04-11T05:43:25Z
Lists: pgsql-hackers
Attachments
- v4-0001-fix-fseek-detection-of-unseekable-files-for-WIN32.patch (text/x-diff) patch v4-0001
On Mon, Mar 20, 2023 at 07:06:22AM +0900, Michael Paquier wrote: > Not sure about this one. I have considered it and dirmod.c includes > also bits for cygwin, while being aimed for higher-level routines like > rename(), unlink() or symlink(). This patch is only for WIN32, and > aimed for common parts in win32*.c code, so a separate file seemed a > bit cleaner to me at the end. After going through the installation of a Windows setup with meson and ninja under VS, I have checked that this is working correctly by myself, so I am going to apply that. One of the tests I have done involved feeding a dump of the regression data through a pipe to pg_restore, and the whole was able to work fine, while head broke when using a pipe. Digressing a bit, while I don't forget.. Spoiler 1: I don't think that recommending ActivePerl in the documentation is a good idea these days. They do not provide anymore a standalone installer that deploys the binaries you can use, and they've made it really difficult to even access a "perl" command as it has become necessary to use an extra command "state activate --default" to link with a project registered in their stuff, meaning a connection to their project. Once this command is launched, the terminal links to a cached state in AppData. This is very unfriendly. In comparison, relying on StrawberryPerl and Chocolatey feels like a breeze.. Spoiler 2: mingw.org seems to be dead, and we have two links in the docs referring to it. -- Michael
Commits
-
Fix detection of unseekable files for fseek() and ftello() with MSVC
- 34105eea62e1 14.8 landed
- 5c32549460fc 15.3 landed
- a923e21631a2 16.0 landed