Re: Fix fseek() detection of unseekable files on WIN32
От | Juan José Santamaría Flecha |
---|---|
Тема | Re: Fix fseek() detection of unseekable files on WIN32 |
Дата | |
Msg-id | CAC+AXB0042dK+xWTZqsmm47fB+tRcCOp-M37R31+Budv-gqefA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Fix fseek() detection of unseekable files on WIN32 (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: Fix fseek() detection of unseekable files on WIN32
|
Список | pgsql-hackers |
On Sun, Mar 19, 2023 at 12:45 PM Michael Paquier <michael@paquier.xyz> wrote:
In short, I was thinking among the lines of something like the
attached, where I have invented a pgwin32_get_file_type() that acts as
a wrapper of GetFileType() in a new file called win32common.c, with
all the error handling we would use between fstat(), fseeko() and
ftello() centralized in a single code path.
The refactoring with win32common.c had better be separated into its
own patch, at the end, if using an approach like that.
My approach was trying to make something minimal so it could be backpatchable. This looks fine for HEAD, but are you planning on something similar for the other branches?
Doesn't pgwin32_get_file_type() fit in dirmod.c? Might be a question of personal taste, I don't really have strong feelings against win32common.c.
Regards,
Juan José Santamaría Flecha
В списке pgsql-hackers по дате отправления: