Commit Graph

396 Commits

Author SHA1 Message Date
Feng Xiao
725326f1ee Update verification methods' names. 2014-10-02 17:46:39 -07:00
Feng Xiao
345d49a51e Fix a bug that causes DynamicMessage.setField() to not work for repeated
enum fields.
2014-10-01 17:31:28 -07:00
xfxyjwf
6147768171 Merge pull request #37 from google/fix_links
Replace links to code.google.com/protobuf with developers.google.com/protocol-buffers
2014-10-01 16:52:35 -07:00
Feng Xiao
e428862450 Replace links to code.google.com/protobuf with developers.google.com/protocol-buffers 2014-10-01 16:26:23 -07:00
xfxyjwf
a9155b8d3c Merge pull request #32 from worr/bug/solaris-atomicops
Add support for solaris atomicops
2014-09-23 10:48:02 -07:00
William Orr
195f01719e Update CONTRIBUTORS.txt 2014-09-22 22:20:36 -07:00
William Orr
a27b329084 Update copyright notice and remove first line 2014-09-22 11:53:54 -07:00
xfxyjwf
a48c08aa9a Merge pull request #31 from worr/bug/autoconf-sched-yield
Add check for sched_yield in librt
2014-09-22 10:02:11 -07:00
William Orr
2d7786cfc3 Add support for solaris atomicops
This patch adds support for atomic operations on Solaris, on any platform.
It makes use of the atomic functions made available in Solaris' atomic.h
header.
2014-09-19 22:04:23 -07:00
William Orr
38b8494647 Add check for sched_yield in librt
In Solaris, sched_yield lives in librt, rather than libc. This patch adds a
check which will link in librt if necessary.
2014-09-19 21:54:27 -07:00
xfxyjwf
7d50120316 Merge pull request #30 from edmonds/branches/fix_generic_atomicops_memory_models
generic atomicops: promote Acquire_Store() and Release_Load() to use SEQ_CST fence
2014-09-19 12:00:58 -07:00
Robert Edmonds
cc0a047384 generic atomicops: promote Acquire_Store() and Release_Load() to use SEQ_CST fence
__atomic_store_n() cannot take a memory model argument of
__ATOMIC_ACQUIRE, and __atomic_load_n() cannot take a memory model
argument of __ATOMIC_RELEASE, per the GCC documentation:

    https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/_005f_005fatomic-Builtins.html

On Clang this generates a -Watomic-memory-ordering warning.

Promote the fences in Acquire_Store() and Release_Load() to the stronger
__ATOMIC_SEQ_CST memory model, which ought to be safe.

Note that there are no actual uses of Acquire_Store() or Release_Load()
in protobuf, though.

This follows the TSAN atomicops implementation, which also uses SEQ_CST
fences for these functions.

(Fixes #25.)
2014-09-18 20:36:42 -04:00
xfxyjwf
dce98a8d4c Merge pull request #29 from edmonds/branches/undef_GOOGLE_PROTOBUF_PLATFORM_ERROR
platform_macros.h: #undef GOOGLE_PROTOBUF_PLATFORM_ERROR once it's no longer needed
2014-09-18 17:31:23 -07:00
Robert Edmonds
0a3e36f1bf platform_macros.h: #undef GOOGLE_PROTOBUF_PLATFORM_ERROR once it's no longer needed 2014-09-18 20:24:30 -04:00
xfxyjwf
8d5f1e1efb Merge pull request #27 from edmonds/branches/fix_generic_atomicops_non_clang
Fix atomicops build failure on non-Clang
2014-09-18 17:19:19 -07:00
Robert Edmonds
7432af823a Fix atomicops build failure on non-Clang
We cannot use Clang's __has_extension macro unless we really are
compiling on Clang, which means we cannot use this expression:

    #if (defined(__clang__) && __has_extension(c_atomic)))
    // ...
    #endif

On GCC, this generates the following errors:

    In file included from ./google/protobuf/stubs/atomicops.h:59:0,
                     from google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:
    ./google/protobuf/stubs/platform_macros.h:67:41: error: missing binary operator before token "("
       (defined(__clang__) && __has_extension(c_atomic)))
                                             ^
    In file included from google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:0:
    ./google/protobuf/stubs/atomicops.h:196:40: error: missing binary operator before token "("
      (defined(__clang__) && __has_extension(c_atomic))
                                            ^

Instead, we have to protect the __has_extension expression by only
executing it when __clang__ is defined:

    #if defined(__clang__)
    # if __has_extension(c_atomic)
    // ...
    # endif
    #endif
2014-09-18 18:36:00 -04:00
xfxyjwf
5c8ab2cbb3 Merge pull request #21 from edmonds/branches/clang_generic_atomics
Expose generic atomicops on Clang
2014-09-18 13:52:31 -07:00
xfxyjwf
7b6c5d58a8 Merge pull request #20 from edmonds/branches/no_ppc
Remove GOOGLE_PROTOBUF_ARCH_PPC
2014-09-18 13:51:56 -07:00
Robert S. Edmonds
628a23ba8d Expose generic atomicops on Clang
The generic atomicops implementation is only exposed if GCC >= 4.7 is
available, but Clang, where the underlying __atomic built-ins are also
available, typically only claims to be GCC 4.2. This causes build
failures when compiling protobuf or the output of protoc's C++ code
generator on an architecture that needs the generic atomicops
implementation with Clang.

Clang has a "c_atomic" extension which can be tested for which almost
does what we want:

    C11 atomic operations

    Use __has_feature(c_atomic) or __has_extension(c_atomic) to
    determine if support for atomic types using _Atomic is enabled.
    Clang also provides a set of builtins which can be used to implement
    the <stdatomic.h> operations on _Atomic types.

I'm not sure if this guarantees that the GNU atomic builtins (the ones
with the __atomic prefix) are also available, but in practice this
should guarantee that Clang is new enough.

With this change in place, Clang generates several diagnostics when
compiling the generic atomicops implementation. These appear to be bugs
in the generic atomicops implementation and are not Clang-specific.
2014-09-13 20:59:39 -04:00
Robert S. Edmonds
d24b987c14 Remove GOOGLE_PROTOBUF_ARCH_PPC
The macro GOOGLE_PROTOBUF_ARCH_PPC is not used anywhere in the protobuf
source; there is no Power-specific atomics implementation, etc.

Funnily enough, the macro __ppc__ is not actually defined on 32-bit
Power on GCC/Linux, according to the following webpage:

    http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros#POWER

and verified on a 32-bit Debian sid 'powerpc' chroot:

    (sid_powerpc-dchroot)edmonds@partch:~$ gcc -dM -E - < /dev/null | grep -c __ppc__
    0
    (sid_powerpc-dchroot)edmonds@partch:~$ gcc -dM -E - < /dev/null | grep -c __LP64__
    0
2014-09-13 19:31:12 -04:00
Jisi Liu
edc5994525 Merge pull request #15 from google/pom_version_fix
Bump version for maven-bundle-plugin
2014-09-04 15:37:28 -07:00
Jisi Liu
ec0c9e4a03 Bump version for maven-bundle-plugin 2014-09-04 10:38:40 -07:00
Jisi Liu
9faecf7e93 Merge pull request #12 from huahang/patch-2
remove a const qualifier in a method's return type
2014-09-03 22:30:50 -07:00
huahang
c871fb9384 remove a const qualifier in a method's return type 2014-09-04 10:51:57 +08:00
Jisi Liu
1392f42d1b Merge pull request #8 from huahang/patch-1
fix a compile warning
2014-09-03 18:02:28 -07:00
huahang
27fcf9bff6 fix a compile warning
This change fixes the following compiler warning:

warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
2014-09-03 15:08:45 +08:00
xfxyjwf
6890263c89 Merge pull request #1 from dhirschfeld/vs2008-fix
Added const qualifier to iterator to enable compiling with VS2008
2014-09-02 10:39:16 -07:00
Feng Xiao
aa51f2a38a Rename README.txt to README.md 2014-08-29 17:27:24 -07:00
xfxyjwf
d36778243b Merge pull request #5 from google/fix_readme
Rename README.txt to README.md and use markdown formatting.
2014-08-29 10:40:28 -07:00
Feng Xiao
b168d1fd1d Fix the formating of bold text. 2014-08-28 14:42:44 -07:00
Feng Xiao
17007a6c47 Update README.md to markdown format. 2014-08-28 14:39:49 -07:00
Feng Xiao
bc72de8ea0 Rename README.txt to README.md 2014-08-28 14:11:28 -07:00
Jisi Liu
0068a929ed Merge pull request #4 from google/fix_readme
Add instructions on how to generate the configure script.
2014-08-28 11:32:49 -07:00
Feng Xiao
de00052be7 Add instructions on how to generate the configure script. 2014-08-28 11:18:51 -07:00
David Hirschfeld
b7ec1a95d2 Added const qualifier to iterator to enable compiling with VS2008 2014-08-27 09:10:00 +01:00
Feng Xiao
e9c00d9dd0 Rename COPYING.txt to LICENSE for opensource compliance and update links
in README.txt.
2014-08-26 16:16:00 -07:00
jieluo@google.com
a21bf2e646 merge 2.6.0 to trunk 2014-08-25 23:26:40 +00:00
jieluo@google.com
1eba9d9c74 merge tags/2.6.0 into trunk 2014-08-25 20:17:53 +00:00
jieluo@google.com
786379af47 patch Issue 130740043 to trunk for other atomicops patches: [MIPS64] Add support for MIPS64 in protobuf 2014-08-20 22:41:35 +00:00
jieluo@google.com
e61b513b1f make dist complains the file name is too long and refuse to put it to tar. Change the file to a shorter name 2014-08-14 21:51:48 +00:00
jieluo@google.com
24095cc7e5 Add deleted tests back for reflection_cpp2_test.py by addtional exception catch 2014-08-14 18:04:22 +00:00
jieluo@google.com
5dd5f0d09a change python README.txt 2014-08-13 23:26:54 +00:00
jieluo@google.com
2d10b80f45 change Makefile.am 2014-08-13 23:17:39 +00:00
jieluo@google.com
b70e586603 put python cpp tests into pyext/ 2014-08-13 21:05:19 +00:00
jieluo@google.com
7580a8929f add shared_pr.h 2014-08-12 21:28:31 +00:00
jieluo@google.com
bde4a3254a down integrate python opensource to svn 2014-08-12 21:10:30 +00:00
jieluo@google.com
d7339318a3 Change java descriptor back to private 2014-08-07 22:22:00 +00:00
jieluo@google.com
83964a9ab4 1, Add comments for include<algorithm> we added for min/max on VS2013. 2, Add #if/#endif to wrap #undef 2014-08-07 19:08:05 +00:00
jieluo@google.com
7db9c098df change java compiler to only produce one java file 2014-08-07 19:03:12 +00:00
jieluo@google.com
9efebb3294 use #undef instead of change the name of MemoryBarrier 2014-08-06 22:14:29 +00:00