]> git.ipfire.org Git - thirdparty/libarchive.git/commit
win32: shim wopen, and make both open/wopen use _s "secure" variant 2684/head
authorDustin Howett <duhowett@microsoft.com>
Fri, 15 Oct 2021 22:47:53 +0000 (17:47 -0500)
committerDustin L. Howett <dustin@howett.net>
Thu, 26 Jun 2025 17:56:33 +0000 (10:56 -0700)
commit50d44b4202b16451dfe7c9748933a7e693cf11d9
tree50e31940e8c97591f27278c8646bd253837ddc75
parentffde04f27231cabb91cebcbd7eca08d0f5088dc8
win32: shim wopen, and make both open/wopen use _s "secure" variant

The new `__la_wopen` wrapper is a copy of `__la_open` that
expects--rather than converts--a wcs parameter.

The `sopen` variants are offered as "more secure" variants of `open` and
`wopen`; I cannot vouch for their security, but some build systems are
strict about the use of "banned insecure APIs".

I've confirmed that `_wsopen_s` and `_open_s` are present in the Windows
Vista SDK.

I did not confirm that they are available in the Windows XP Platform
SDK, in part because in e61afbd463d1 (2016!) Tim says:

> I'd like to completely remove support for WinXP and earlier.
libarchive/archive_windows.c
libarchive/archive_windows.h
tar/bsdtar_windows.h
tar/write.c