]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
add openconnect__win32_setenv function to compat.c
authorDaniel Lenski <dlenski@gmail.com>
Fri, 22 Jan 2021 02:01:42 +0000 (18:01 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Sat, 23 Jan 2021 00:48:55 +0000 (16:48 -0800)
commite5770db55a1aa331e5ef4ce68809e9b8653b5524
tree4c5d5b0c36998115742c97f355010dca7b23d909
parent3e237a75859f1499baa0a7c3ed9428aecc6decb3
add openconnect__win32_setenv function to compat.c

Based on:

* POSIX-compatible `setenv` implementation for Windows: https://stackoverflow.com/a/23616164
* Enabling Windows "secure API" getenv_s and _putenv_s functions in MinGW:
  * Using -DMINGW_HAS_SECURE_API: https://stackoverflow.com/a/51977723
  * By manually defining their prototypes: https://stackoverflow.com/a/51977723
  * Apparently, only newer versions of MinGW follow the MINGW_HAS_SECURE_API flag, and
    autodetecting them is quite hard.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
compat.c
openconnect-internal.h