Re: [Mingw-w64-public] [PATCH] headers: Make getopt.h react to _BSD_SOURCE after being included once first

2023-12-20 Thread Martin Storsjö
On Wed, 20 Dec 2023, Jacek Caban wrote: On 20.12.2023 14:32, Martin Storsjö wrote: > For definitions like _BSD_SOURCE, the most failsafe solution > generally is to define them before including any header, to avoid > this kind of issue. However, allowing getopt.h to react to > being reincluded w

Re: [Mingw-w64-public] [PATCH] headers: Make getopt.h react to _BSD_SOURCE after being included once first

2023-12-20 Thread Jacek Caban
On 20.12.2023 14:32, Martin Storsjö wrote: For definitions like _BSD_SOURCE, the most failsafe solution generally is to define them before including any header, to avoid this kind of issue. However, allowing getopt.h to react to being reincluded with _BSD_SOURCE defined, is quite straightforward.

[Mingw-w64-public] [PATCH] headers: Make getopt.h react to _BSD_SOURCE after being included once first

2023-12-20 Thread Martin Storsjö
getopt.h is transitively included by unistd.h, which means that users who include unistd.h (also potentially unintentionally as a transitive dependency) won't be able to get "optreset" declared, if they do e.g. this: #include #define _BSD_SOURCE #include This recently broke building

Re: [Mingw-w64-public] [PATCH v3 02/22] winpthreads: Move likely/unlikely to misc.h, noop under MSVC

2023-12-20 Thread Antonin Décimo
> I pushed this patchset now, with this change squashed in. Thanks a lot! Sorry for that mistake, I extracted the patchset from a larger branch, and that fix happened on a later commit. On to more hacking! -- Antonin ___ Mingw-w64-public mailing list M

Re: [Mingw-w64-public] [PATCH v3 02/22] winpthreads: Move likely/unlikely to misc.h, noop under MSVC

2023-12-20 Thread Martin Storsjö
On Tue, 19 Dec 2023, Martin Storsjö wrote: On Tue, 19 Dec 2023, Martin Storsjö wrote: On Thu, 14 Dec 2023, Antonin Décimo wrote: Signed-off-by: Antonin Décimo --- mingw-w64-libraries/winpthreads/src/misc.h | 8 mingw-w64-libraries/winpthreads/src/mutex.c| 3 --- mingw-w64-lib