1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/windows/utils
Jacob Nevins c8b66101ee Thread-local support for more Windows toolchains.
Use of thread-local storage on Windows (introduced recently in
69e8d471d1) could cause a -Wattributes warning in mingw-w64 builds,
since that toolchain doesn't understand __declspec(thread).

Define a portability macro THREADLOCAL, which should resolve to
something appropriate for at least:
 - MSVC, which understands the Microsoft syntax __declspec(thread);
 - GCC (e.g., mingw-w64) which understands the GNU syntax __thread
   (GCC only implements __declspec() to the extent of understanding the
   arguments 'dllexport' and 'dllimport');
 - Clang, which supports both syntaxes.

(It's possible there's some more obscure Windows toolchain which will
now hit the #error as a result of this change.)

I haven't attempted to try to detect and use the C11 syntax
'thread_local'. And this is all still Windows-only, since that's all we
need for now and it avoids opening the can of worms that is TLS on other
platforms.

(I considered delegating all this to cmake, but as well as being fiddly,
it seems even the latest versions of cmake don't know about thread-local
storage for C, as opposed to C++ (cxx_thread_local).)
2022-09-02 16:11:05 +01:00
..
agent_mutex_name.c Windows Pageant: make atomic client/server decision. 2022-01-03 12:21:39 +00:00
agent_named_pipe_name.c Move agent_named_pipe_name into its own source file. 2022-01-03 12:12:05 +00:00
arm_arch_queries.c Implement AES-GCM using the @openssh.com protocol IDs. 2022-08-16 20:33:58 +01:00
aux_match_opt.c Windows Pageant and PuTTYgen: spiff up option parsing. 2022-01-15 18:27:19 +00:00
centre_window.c Windows: utility function to centre a window. 2022-04-25 14:10:16 +01:00
cryptoapi.c Merge connshare socket naming fix from 'pre-0.75'. 2021-05-02 08:19:28 +01:00
defaults.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
dll_hijacking_protection.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
dputs.c Windows dputs: use WriteFile to avoid stdio buffering. 2021-09-30 19:00:11 +01:00
escape_registry_key.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
filename.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
fontspec.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
get_system_dir.c Factor out Windows utility function get_system_dir(). 2021-05-08 17:18:17 +01:00
get_username.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
getdlgitemtext_alloc.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
interprocess_mutex.c Windows Pageant: turn 'has_security' into a global function. 2022-03-12 21:05:07 +00:00
is_console_handle.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
load_system32_dll.c Factor out Windows utility function get_system_dir(). 2021-05-08 17:18:17 +01:00
ltime.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
make_spr_sw_abort_winerror.c Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
makedlgitemborderless.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
message_box.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
minefield.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
open_for_write_would_lose_data.c Remove hard dependency on GetFileAttributesEx. 2022-03-12 18:51:21 +00:00
pgp_fingerprints_msgbox.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
platform_get_x_display.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
registry.c windows/storage.c: factor out low-level Registry access. 2022-04-24 08:38:27 +01:00
request_file.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
screenshot.c Windows tools: assorted '-demo' options. 2022-04-02 17:23:34 +01:00
security.c Formatting: standardise on "func(\n", not "func\n(". 2022-08-03 20:48:46 +01:00
shinydialogbox.c Thread-local support for more Windows toolchains. 2022-09-02 16:11:05 +01:00
split_into_argv.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
strtoumax.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
version.c Make init_winver() idempotent. 2022-03-12 18:51:21 +00:00
win_strerror.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00