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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user