diff options
author | Florian Enner <florian@enner.org> | 2015-01-31 19:01:34 -0500 |
---|---|---|
committer | Florian Enner <florian@enner.org> | 2015-01-31 19:01:34 -0500 |
commit | df4730ca9c093a8551b2a9ee7ba0f3098796aeb8 (patch) | |
tree | 5f3c05bf90881db4e946198d61b79ba03b2e4400 | |
parent | ec53b8cb600e818c3fffea2c8f3d20eaaa2fc743 (diff) | |
download | protobuf-df4730ca9c093a8551b2a9ee7ba0f3098796aeb8.tar.gz protobuf-df4730ca9c093a8551b2a9ee7ba0f3098796aeb8.tar.bz2 protobuf-df4730ca9c093a8551b2a9ee7ba0f3098796aeb8.zip |
fixed MSVC compile error
<stdint.h> is not part of the standard, so I've added a workaround.
-rw-r--r-- | src/google/protobuf/compiler/ruby/ruby_generator.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/ruby/ruby_generator.cc b/src/google/protobuf/compiler/ruby/ruby_generator.cc index c5687903..bb88fc16 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator.cc +++ b/src/google/protobuf/compiler/ruby/ruby_generator.cc @@ -46,6 +46,12 @@ namespace protobuf { namespace compiler { namespace ruby { +#if _MSC_VER >= 1400 // VS 2005 and above + // <stdint.h> is not part of the standard, so we need to map + // to MSVC's custom sized integer types instead. + typedef unsigned __int32 uint32_t; +#endif + // Forward decls. std::string IntToString(uint32_t value); std::string StripDotProto(const std::string& proto_file); |