diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-05-18 15:01:15 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-05-19 20:25:19 -0400 |
commit | ce55ff9441753164a34f31a48572ea2f1fb38aba (patch) | |
tree | 454090707d9d8a5e0289c9e10dbcbc4933bdb30c /src/google/protobuf/compiler/objectivec/objectivec_field.cc | |
parent | 4324bf6bf2d217a478356ccc190acb21347b63b3 (diff) | |
download | protobuf-ce55ff9441753164a34f31a48572ea2f1fb38aba.tar.gz protobuf-ce55ff9441753164a34f31a48572ea2f1fb38aba.tar.bz2 protobuf-ce55ff9441753164a34f31a48572ea2f1fb38aba.zip |
Getting the ObjC generator building on Windows.
Remove the ClassList support (maybe bring it back in the future).
Trim the includes to hopefully get a working Window build.
Add some more returns after switches for compilers that warn even when all values of the enum are handled.
Use ghtonl instead of htonl.
Change the use of [u]int(8,32)_t within the ObjC generator code to [u]int(8,32) to match the rest of the compiler.
Add objective-c generator files to Visual Studio project.
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_field.cc')
-rw-r--r-- | src/google/protobuf/compiler/objectivec/objectivec_field.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_field.cc index b071ce5d..93fffe0e 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_field.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_field.cc @@ -39,10 +39,6 @@ #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/strutil.h> -#ifndef htonl -#include <netinet/in.h> -#endif - namespace google { namespace protobuf { namespace compiler { @@ -107,7 +103,7 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, string field_options = descriptor->options().SerializeAsString(); // Must convert to a standard byte order for packing length into // a cstring. - uint32_t length = htonl(field_options.length()); + uint32 length = ghtonl(field_options.length()); if (length > 0) { string bytes((const char*)&length, sizeof(length)); bytes.append(field_options); |