summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
authorjuj <jujjyl@gmail.com>2016-06-21 21:34:39 +0100
committerAlon Zakai <alonzakai@gmail.com>2016-06-21 13:34:39 -0700
commit52821472b93e551375b8df43cc1b8a7bfc18e8f5 (patch)
tree4d20c79c5a84f52148b32e9e890fffb9e9765d6f /src/support
parent509319ac42a18b5a120ae9e45daac624affc07e1 (diff)
downloadbinaryen-52821472b93e551375b8df43cc1b8a7bfc18e8f5.tar.gz
binaryen-52821472b93e551375b8df43cc1b8a7bfc18e8f5.tar.bz2
binaryen-52821472b93e551375b8df43cc1b8a7bfc18e8f5.zip
Build fixes/workarounds to support Visual Studio 2013 build, which has trouble with some new C++11 constructs. (#581)
Diffstat (limited to 'src/support')
-rw-r--r--src/support/archive.cpp2
-rw-r--r--src/support/archive.h4
-rw-r--r--src/support/file.cpp1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/support/archive.cpp b/src/support/archive.cpp
index 126f4e2ce..487a77376 100644
--- a/src/support/archive.cpp
+++ b/src/support/archive.cpp
@@ -60,7 +60,7 @@ uint32_t ArchiveMemberHeader::getSize() const {
return static_cast<uint32_t>(sizeInt);
}
-Archive::Archive(Buffer& b, bool& error) : data(b) {
+Archive::Archive(Buffer& b, bool& error) : data(b), symbolTable({nullptr, 0}), stringTable({nullptr, 0}) {
error = false;
if (data.size() < strlen(magic) ||
memcmp(data.data(), magic, strlen(magic))) {
diff --git a/src/support/archive.h b/src/support/archive.h
index 40fea2529..95af1ac94 100644
--- a/src/support/archive.h
+++ b/src/support/archive.h
@@ -97,8 +97,8 @@ class Archive {
private:
void setFirstRegular(const Child& c) { firstRegularData = c.data; }
Buffer& data;
- SubBuffer symbolTable = {nullptr, 0};
- SubBuffer stringTable = {nullptr, 0};
+ SubBuffer symbolTable;
+ SubBuffer stringTable;
const uint8_t* firstRegularData;
};
diff --git a/src/support/file.cpp b/src/support/file.cpp
index 59880e862..296fd6dbe 100644
--- a/src/support/file.cpp
+++ b/src/support/file.cpp
@@ -17,6 +17,7 @@
#include "support/file.h"
#include <cstdlib>
+#include <cstdint>
#include <limits>
template <typename T>