Commit 51533e1b authored by pliard@chromium.org's avatar pliard@chromium.org

third_party/protobuf: update to upstream r412.

1) Got an upstream diff 411:412 from svn
2) Applied
3) Modified protobuf.gyp to make it platform independent thanks to the new
   guards added in atomicops_internals_x86_gcc.cc and
   atomicops_internals_x86_msvc.cc.
   Note that the previous change adding atomicops added a significant
   complexity to protobuf.gyp to handle platform-specific source files. Because
   it was using target_arch only, it did not even work properly. Indeed
   protobuf_lite needs to deal with the host architecture when it is built to
   be used by protoc.


Review URL: http://codereview.chromium.org/9706016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126922 0039d316-1c4b-4281-b951-d872f2087c98
parent 541dcd5e
......@@ -3,7 +3,7 @@ Short Name: protobuf
URL: http://protobuf.googlecode.com/svn/trunk
License File: COPYING.txt
Version: unknown
Revision: r411
Revision: r412
Security Critical: yes
Local files (not taken from upstream):
......
......@@ -41,6 +41,13 @@
'toolsets': ['host', 'target'],
'sources': [
'src/google/protobuf/stubs/atomicops.h',
'src/google/protobuf/stubs/atomicops_internals_arm_gcc.h',
'src/google/protobuf/stubs/atomicops_internals_mips_gcc.h',
'src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc',
'src/google/protobuf/stubs/atomicops_internals_x86_gcc.h',
'src/google/protobuf/stubs/atomicops_internals_x86_macosx.h',
'src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc',
'src/google/protobuf/stubs/atomicops_internals_x86_msvc.h',
'src/google/protobuf/stubs/common.h',
'src/google/protobuf/stubs/once.h',
'src/google/protobuf/stubs/platform_macros.h',
......@@ -72,36 +79,6 @@
'src/google/protobuf/io/zero_copy_stream_impl_lite.cc',
'<(config_h_dir)/config.h',
],
'conditions': [
['OS == "win"', {
'sources+': [
'src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc',
'src/google/protobuf/stubs/atomicops_internals_x86_msvc.h',
],
}],
['OS == "mac"', {
'sources+': [
'src/google/protobuf/stubs/atomicops_internals_x86_macosx.h',
],
}],
['"<(target_arch)" == "arm"', {
'sources+': [
'src/google/protobuf/stubs/atomicops_internals_arm_gcc.h',
],
}],
['"<(target_arch)" == "mips"', {
'sources+': [
'src/google/protobuf/stubs/atomicops_internals_mips_gcc.h',
],
}],
['"<(target_arch)" == "ia32" or "<(target_arch)" == "x64"', {
'sources+': [
'src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc',
'src/google/protobuf/stubs/atomicops_internals_x86_gcc.h',
],
}],
],
'include_dirs': [
'<(config_h_dir)',
'src',
......
......@@ -33,7 +33,7 @@
#include <cstring>
#include "atomicops.h"
#include <google/protobuf/stubs/atomicops.h>
// This file only makes sense with atomicops_internals_x86_gcc.h -- it
// depends on structs that are defined in that file. If atomicops.h
......
......@@ -33,6 +33,8 @@
#include <google/protobuf/stubs/atomicops.h>
#ifdef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_X86_MSVC_H_
#include <windows.h>
namespace google {
......@@ -103,4 +105,5 @@ Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
} // namespace protobuf
} // namespace google
#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_X86_MSVC_H_
#endif // GOOGLE_PROTOBUF_NO_THREADSAFETY
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment