On 14/01/2024 15:20, Takashi Yano via Cygwin-apps wrote:
Thanks for reviewing.
No problem!
On Sat, 13 Jan 2024 16:06:45 +0000
Jon Turney wrote:
On 07/01/2024 10:42, Takashi Yano via Cygwin-apps wrote:
#ifdef _WIN32
-#define FOPEN(f, s, m) fopen_s(&f, s, m)
+#define SVT_FOPEN(f, s, m) fopen_s(&f, s, m)
#else
-#define FOPEN(f, s, m) f = fopen(s, m)
+#define SVT_FOPEN(f, s, m) f = fopen(s, m)
This provokes my curiosity. Is there some reason for renaming this macro?
(In general, feel free to provide commentary at the start of the patch
file on why it's doing what it's doing :))
This is because FOPEN macro conflicts with the same name macro in
cygwin's /usr/include/sys/_default_fcntl.h.
I'll add comment. Thanks!
Hmm... go ahead.
How interesting. It seems like that might be also fixed by defining an
appropriate feature test macro e.g. _XOPEN_SOURCE, which turns off those
definitions in that header?