-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from saraedum/abi101
Restore compatibility with 10.1 ABI
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From a82712d220fc2df963c9a5463c77dd6d92ad7577 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Julian=20R=C3=BCth?= <[email protected]> | ||
Date: Tue, 2 Jan 2024 23:43:30 -0600 | ||
Subject: [PATCH] Restore symbol from 10.1 | ||
|
||
Fixes #3785. | ||
|
||
the write_console symbol has changed from 10.1 to 10.2. Here we restore | ||
the symbol as introduced in 10.1. | ||
--- | ||
include/fmt/format-inl.h | 5 +++++ | ||
include/fmt/format.h | 1 + | ||
2 files changed, 6 insertions(+) | ||
|
||
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h | ||
index e9a4ca45..daeae5b1 100644 | ||
--- a/include/fmt/format-inl.h | ||
+++ b/include/fmt/format-inl.h | ||
@@ -1434,6 +1434,7 @@ FMT_FUNC auto vformat(string_view fmt, format_args args) -> std::string { | ||
namespace detail { | ||
#if !defined(_WIN32) || defined(FMT_WINDOWS_NO_WCHAR) | ||
FMT_FUNC auto write_console(int, string_view) -> bool { return false; } | ||
+FMT_FUNC auto write_console(std::FILE* f, string_view text) -> bool { return false; } | ||
#else | ||
using dword = conditional_t<sizeof(long) == 4, unsigned long, unsigned>; | ||
extern "C" __declspec(dllimport) int __stdcall WriteConsoleW( // | ||
@@ -1444,6 +1445,10 @@ FMT_FUNC bool write_console(int fd, string_view text) { | ||
return WriteConsoleW(reinterpret_cast<void*>(_get_osfhandle(fd)), u16.c_str(), | ||
static_cast<dword>(u16.size()), nullptr, nullptr) != 0; | ||
} | ||
+ | ||
+FMT_FUNC auto write_console(std::FILE* f, string_view text) -> bool { | ||
+ return write_console(_fileno(f), text); | ||
+} | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
diff --git a/include/fmt/format.h b/include/fmt/format.h | ||
index 97f0e1fb..7637c8a0 100644 | ||
--- a/include/fmt/format.h | ||
+++ b/include/fmt/format.h | ||
@@ -999,6 +999,7 @@ struct is_contiguous<basic_memory_buffer<T, SIZE, Allocator>> : std::true_type { | ||
FMT_END_EXPORT | ||
namespace detail { | ||
FMT_API auto write_console(int fd, string_view text) -> bool; | ||
+FMT_API auto write_console(std::FILE* f, string_view text) -> bool; | ||
FMT_API void print(std::FILE*, string_view); | ||
} // namespace detail | ||
|
||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f16e1df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! This is the friendly automated conda-forge-webservice.
I updated the Github team because of this commit.
Go to https://github.com/orgs/conda-forge/invitation see your invitation.
You should get push access to this feedstock and CI services.
Your package won't be available for installation locally until it is built
and synced to the anaconda.org CDN (takes 1-2 hours after the build finishes).
Feel free to join the community Element channel.
NOTE: Please make sure to not push to the repository directly.
Use branches in your fork for any changes and send a PR.
More details on this are here.