summaryrefslogtreecommitdiff
path: root/src/support/file.h
diff options
context:
space:
mode:
authorJF Bastien <github@jfbastien.com>2016-03-31 15:12:04 -0700
committerJF Bastien <github@jfbastien.com>2016-03-31 15:12:04 -0700
commitd0ae4a2d778a92be712d3f510f94273bb3e394da (patch)
treef4b93a76d16bb5d824197f6d77fa549ddaf9ce70 /src/support/file.h
parent57bd72bee0153ad41c9e4f9441cd2cf19ab89d81 (diff)
parent286b5bebd2c2f9bfe66b84b9b258c63afaac89f1 (diff)
downloadbinaryen-d0ae4a2d778a92be712d3f510f94273bb3e394da.tar.gz
binaryen-d0ae4a2d778a92be712d3f510f94273bb3e394da.tar.bz2
binaryen-d0ae4a2d778a92be712d3f510f94273bb3e394da.zip
Merge pull request #303 from WebAssembly/binary-files-for-windows
Set the binary bit on files we need to open in binary mode
Diffstat (limited to 'src/support/file.h')
-rw-r--r--src/support/file.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/support/file.h b/src/support/file.h
index 47f7ececb..8d92b5ab4 100644
--- a/src/support/file.h
+++ b/src/support/file.h
@@ -29,15 +29,15 @@
namespace wasm {
template <typename T>
-T read_file(const std::string &filename, bool debug);
+T read_file(const std::string &filename, bool binary, bool debug);
// Declare the valid explicit specializations.
-extern template std::string read_file<>(const std::string &, bool);
-extern template std::vector<char> read_file<>(const std::string &, bool);
+extern template std::string read_file<>(const std::string &, bool, bool);
+extern template std::vector<char> read_file<>(const std::string &, bool, bool);
class Output {
public:
// An empty filename will open stdout instead.
- Output(const std::string &filename, bool debug);
+ Output(const std::string &filename, bool binary, bool debug);
~Output() = default;
template <typename T>
std::ostream &operator<<(const T &v) {