pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
git-crypt: Avoid std::ios_base::sync_with_stdio(false) on NetBSD
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Thu Feb 25 16:13:52 2021 +0100
Changeset: 2277b1a47960a918f02b5b49dfc559d79022b6a1
Modified Files:
git-crypt/distinfo
Added Files:
git-crypt/patches/patch-util.cpp
Log Message:
git-crypt: Avoid std::ios_base::sync_with_stdio(false) on NetBSD
Without this patch, at least by debugging the `smudge()` function, all the
std::cin.read() ended up in reading 0 bytes (no read) and then failing to
`git-crypt unlock'.
XXX: I still have no idea why that happened and any possible comment regarding
XXX: that is more than welcomed!
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2277b1a47960a918f02b5b49dfc559d79022b6a1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
git-crypt/distinfo | 1 +
git-crypt/patches/patch-util.cpp | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diffs:
diff --git a/git-crypt/distinfo b/git-crypt/distinfo
index de239157a6..75dfc2fe92 100644
--- a/git-crypt/distinfo
+++ b/git-crypt/distinfo
@@ -4,3 +4,4 @@ SHA1 (git-crypt-0.6.0.tar.gz) = c7b8e2fd7c2c379e3fb6cec171eb053fd938364f
RMD160 (git-crypt-0.6.0.tar.gz) = 131bdfca984dc5c3f0445f58d683b8df88d2c83b
SHA512 (git-crypt-0.6.0.tar.gz) = e72c57a8e3168fcdb68cde352a6ab0e397675916dfa1e4266a852e21bcbda313f9c9a58a7d6a827f33fe549f09afbb8008509a6bf1859d6804cf36ffab5c758d
Size (git-crypt-0.6.0.tar.gz) = 57275 bytes
+SHA1 (patch-util.cpp) = ed9dee74f7e8d50f72670542323013d0a2d44464
diff --git a/git-crypt/patches/patch-util.cpp b/git-crypt/patches/patch-util.cpp
new file mode 100644
index 0000000000..7aed657b35
--- /dev/null
+++ b/git-crypt/patches/patch-util.cpp
@@ -0,0 +1,19 @@
+$NetBSD$
+
+Keep the C++ streams synchronized to the standard C streams on NetBSD otherwise
+it is not possible to read via std::cin.
+
+XXX: Why?
+
+--- util.cpp.orig 2017-11-26 18:24:03.000000000 +0000
++++ util.cpp
+@@ -141,7 +141,9 @@ static void init_std_streams_platform ()
+ void init_std_streams ()
+ {
+ // The following two lines are essential for achieving good performance:
++#ifndef __NetBSD__
+ std::ios_base::sync_with_stdio(false);
++#endif
+ std::cin.tie(0);
+
+ std::cin.exceptions(std::ios_base::badbit);
Home |
Main Index |
Thread Index |
Old Index