[m-rev.] diff: fix an XXX with trace count files on Windows
Julien Fischer
jfischer at opturion.com
Sun Oct 22 21:52:43 AEDT 2023
On Sun, 22 Oct 2023, Zoltan Somogyi wrote:
> On 2023-10-22 20:57 +11:00 AEDT, "Julien Fischer" <jfischer at opturion.com> wrote:
>> + #if defined(MR_WIN32) && !defined(MR_CYGWIN)
>> + fp = _wfopen(MR_utf8_to_wide(name), L"w");
>
> I looked up _wfopen, and saw a mention of a "secure version".
> But the link
>
> https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-s-wfopen-s?view=msvc-170
>
> while including lots of detail, does not tell me what extra security _wfopen_s
> adds to _wfopen. Do you know?
The major difference appears to be that the _s version accepts some
additional options in the mode string. Microsoft added a lot of these
"secure" functions (ending with "_s"). Sometimes they make sense, e.g.
strerror_s, strcopy_s, at other times they don't really add much.
Julien.
More information about the reviews
mailing list