1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00

version: add Unicode:on/off to libssh2_build_options()

Also: fail the build if `UNICODE` is set without `_UNICODE` or vice
versa.

Closes #2316
This commit is contained in:
Viktor Szakats
2026-07-15 12:43:15 +02:00
parent 49abb5e568
commit 645dade3b3
2 changed files with 16 additions and 0 deletions

View File

@@ -51,6 +51,13 @@
#ifdef _WIN32
#if defined(UNICODE) && !defined(_UNICODE)
# error "UNICODE is defined but _UNICODE is not defined"
#endif
#if defined(_UNICODE) && !defined(UNICODE)
# error "_UNICODE is defined but UNICODE is not defined"
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif

View File

@@ -179,6 +179,15 @@ static const char *ssh2_build_options =
#ifdef SSH2_AGENT_BACKEND_UNIX
"agent:" SSH2_AGENT_BACKEND_UNIX
" "
#endif
#ifdef _WIN32
"Unicode:"
#if defined(UNICODE) && defined(_UNICODE)
"on"
#else
"off"
#endif
" "
#endif
"clear-memory:"
#ifndef LIBSSH2_NO_CLEAR_MEMORY