JJohn Thackercmake: Fix Windows static build
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
jtckdint: Replace ISC license text with SPDX License Identifier Follow our conventions | 1 年前 | |
Fix lots of spellings | 2 年前 | |
Use explicit test for Clang with compiler attributes Clang likes to pretend to be other compilers but does not implement the full range of pragmas other compilers have. Make Clang always use __attribute__, it should be better supported than the alternatives, for example with clang-cl. Do not use __GNUC__ to select Clang, it does not work with clang-cl. Test explicitly for __clang__ instead. Fixes #19385. | 2 年前 | |
Add a #define for REPLACEMENT CHARACTER and use it. Add UNICODE_REPLACEMENT_CHARACTER as a #define for the Unicode REPLACEMENT CHARACTER code point (0x00FFFD), and use that instead of 0xfffd/0xFFFD/0x00FFFD in cases where that value refers to REPLACEMENT CHARACTER. | 3 年前 | |
Fix usage of an invalid patchlevel macro | 2 年前 | |
lemon: Suppress MSVC warning via pragma, not in CMake MSVC requires a very specific ordering of compiler warning flags, and CMake doesn't comply with it, which means that if you change the level of a warning and then try to disable it via CMake, it doesn't actually get disabled. https://gitlab.kitware.com/cmake/cmake/-/issues/18736 Disabling it via a pragma when compiling through ws_diag_control.h does suppress the warning. Follow up to 7993b6836c09f20e7c117672582399bb327a8711 | 1 年前 | |
Add return for commandline_early_options() to allow cleaner "exit" Replace exit() calls in commandline_early_options() with return value so that applications to end abruptly | 1 年前 | |
Rename the Lua log domain The name "WSLua" looks kind of weird. Use just "Lua" instead. | 3 年前 | |
Windows: Make use of SSIZE_T Windows defines SSIZE_T, so typedef ssize_t to it. | 3 年前 | |
cmake: Fix Windows static build BUILD_SHARED_LIBS is a CMake variable. Due to how MSVC exports and imports symbols from DLLs*, we still need to appropriately define symbols so that __declspec(dllexport) and __declspec(dllimport) are used properly, and also so that they're *not* used when building statically, to avoid MSVC and LINK warnings LNK4217 and LNK4286, and errors C2734, LNK2019, and LNK1120. Do this by defining the compile-time definition ENABLE_STATIC (not to be confused with the previous CMake variable ENABLE_STATIC) whenever BUILD_SHARED_LIBS is set to OFF, and also defining ENABLE_STATIC specifically for the static version of wsutil and dumpcap / writecap that use it. Also, eliminate some non-fatal warnings that occurred before by defining WSUTIL_EXPORT to just be extern in the all static case. Fixup 67bb36a181f9e643533bbfc96f52207edb47de0c * - Data and functions are not directly exported, there's indirection through an address table, but the appearance of direct export can be obtained via syntactic sugar, See https://learn.microsoft.com/en-us/cpp/build/importing-data-using-declspec-dllimport https://learn.microsoft.com/en-us/cpp/c-language/rules-and-limitations-for-dllimport-dllexport https://gcc.gnu.org/onlinedocs/gcc/Microsoft-Windows-Function-Attributes.html | 1 年前 |