]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Make it explicit that WIndows build requires UNICODE support
authorSelva Nair <selva.nair@gmail.com>
Sat, 22 May 2021 03:32:30 +0000 (23:32 -0400)
committerGert Doering <gert@greenie.muc.de>
Tue, 25 May 2021 20:20:03 +0000 (22:20 +0200)
commit455d0997931f968ed8c42812106c44941c4ca69b
tree7f26bc750c1c67c8b938671317ef48d17683b569
parentb7701fc5ce3a2d49bca890859541bb4b8dff0aec
Make it explicit that WIndows build requires UNICODE support

The interactive service code implicitly treats TCHAR == WCHAR in
several places with the assumption that we build only with UNICODE
defined. Make this explicit and remove some redundant code.

Also replace openvpn_sntprintf(), _tprintf() and similar with
explicit wide string functions. This adds some definiteness as
to which stdio functions are used, and helps the next commit that
makes those calls C-standard compliant.

Also, replace direct swprintf calls with openvpn_swprintf.

Note: we need UNICODE defined mainly because of the use of
TEXT("..") throughout the code. If those are replaced by L"..",
we could build with just -municode as done for OpenVPN
core.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20210522033232.20548-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22437.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnserv/common.c
src/openvpnserv/interactive.c
src/openvpnserv/service.c
src/openvpnserv/service.h
src/openvpnserv/validate.c