Re: gai_strerror() is not thread-safe on Windows

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gai_strerror() is not thread-safe on Windows
Date: 2024-01-26 02:55:29
Message-ID: CALDaNm05-byHHZVi+f9T+a_=mYCGRTr5qCXrY3xWezaduZoP8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 5 Dec 2023 at 00:57, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
>
> On second thoughts, I guess it would make more sense to use the exact
> messages Windows' own implementation would return instead of whatever
> we had in the past (probably cribbed from some other OS or just made
> up?). I asked CI to spit those out[1]. Updated patch attached. Will
> add to CF.

CFBot shows that the patch does not apply anymore as in [1]:

=== Applying patches on top of PostgreSQL commit ID
376c216138c75e161d39767650ea30536f23b482 ===
=== applying patch ./v2-0001-Fix-gai_strerror-thread-safety-on-Windows.patch
patching file configure
Hunk #1 succeeded at 16388 (offset 34 lines).
patching file configure.ac
Hunk #1 succeeded at 1885 (offset 7 lines).
patching file src/include/port/win32/sys/socket.h
patching file src/port/meson.build
patching file src/port/win32gai_strerror.c
can't find file to patch at input line 134
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
|index 46df01cc8d..c51296bdb6 100644
|--- a/src/tools/msvc/Mkvcbuild.pm
|+++ b/src/tools/msvc/Mkvcbuild.pm
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored

Please have a look and post an updated version.

[1] - http://cfbot.cputube.org/patch_46_4682.log

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2024-01-26 02:57:58 Re: A performance issue with Memoize
Previous Message vignesh C 2024-01-26 02:52:49 Re: Fwd: BUG #18016: REINDEX TABLE failure