Insonsitencies with usage of _WIN32_WINNT #24367
Labels
branch: master
Merge to master branch
branch: 3.2
Merge to openssl-3.2
branch: 3.3
Merge to openssl-3.3
help wanted
triaged: bug
The issue/pr is/fixes a bug
Openssl has some logic in e_os.h to define the macro
_WIN32_WINNT
if not set by externally by the compiler, and then takes care of includingwindows.h
.openssl/include/internal/e_os.h
Lines 86 to 101 in 87314d2
Supposedly this file should be the only one to be used internally by openssl to include windows headers, but in various places windows.h is included directly on top of the file, for example
openssl/crypto/threads_win.c
Lines 10 to 15 in 87314d2
In other cases, depending on other internal headers included beforehand, either
windows.h
is manually included first, or it's included throughe_os.h
due to chain dependencies, in this casee_os.h
is included bytime-h
openssl/include/internal/thread_arch.h
Lines 12 to 18 in 87314d2
These inconsistencies could lead to some files being possibly built with
_WIN32_WINNT
defined as0x501
(if e_os is inclded first and it's not changed externally), while others being built with whatever the current sdk sets as default.The text was updated successfully, but these errors were encountered: