aboutsummaryrefslogtreecommitdiff
path: root/libbutl/sha1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/sha1.cxx')
-rw-r--r--libbutl/sha1.cxx34
1 files changed, 6 insertions, 28 deletions
diff --git a/libbutl/sha1.cxx b/libbutl/sha1.cxx
index 6a5e9db..e546922 100644
--- a/libbutl/sha1.cxx
+++ b/libbutl/sha1.cxx
@@ -1,9 +1,7 @@
// file : libbutl/sha1.cxx -*- C++ -*-
// license : MIT; see accompanying LICENSE file
-#ifndef __cpp_modules_ts
-#include <libbutl/sha1.mxx>
-#endif
+#include <libbutl/sha1.hxx>
// C interface for sha1c.
//
@@ -42,29 +40,9 @@ extern "C"
#define SHA1_Final(x, y) sha1_result((y), (char(&)[20])(x))
#include <cassert>
+#include <istream>
-#ifndef __cpp_lib_modules_ts
-#include <string>
-#include <cstddef>
-#include <cstdint>
-#endif
-
-// Other includes.
-
-#ifdef __cpp_modules_ts
-module butl.sha1;
-
-// Only imports additional to interface.
-#ifdef __clang__
-#ifdef __cpp_lib_modules_ts
-import std.core;
-#endif
-#endif
-
-import butl.fdstream;
-#else
-#include <libbutl/fdstream.mxx>
-#endif
+#include <libbutl/bufstreambuf.hxx>
using namespace std;
@@ -91,12 +69,12 @@ namespace butl
}
void sha1::
- append (ifdstream& is)
+ append (istream& is)
{
- fdbuf* buf (dynamic_cast<fdbuf*> (is.rdbuf ()));
+ bufstreambuf* buf (dynamic_cast<bufstreambuf*> (is.rdbuf ()));
assert (buf != nullptr);
- while (is.peek () != ifdstream::traits_type::eof () && is.good ())
+ while (is.peek () != istream::traits_type::eof () && is.good ())
{
size_t n (buf->egptr () - buf->gptr ());
append (buf->gptr (), n);