Commit Graph

384 Commits

Author SHA1 Message Date
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
jieluo@google.com
8d6f04ad8d Cygwin doesn't work well if we try to capture stderr and stdout at the same time. Comment one test tempraly for Cygwin. Need to figure out why and add the test back for Cygwin. 2014-08-06 20:49:30 +00:00
jieluo@google.com
ce58c88019 Remove AM_PROG_AR.
With AM_PROG_AR may report "error: possibly underfined macro: AM_PROG_AR" (mingw, autoreconf-2.68).
Without AM_PROG_AR may report warning "archiver requires 'AM_PROG_AR' in 'configure.ac'" (cygwin, automake-1.12).
They do not affect the tests and install
2014-08-05 21:22:07 +00:00
jieluo@google.com
abe61de6e6 make changes to pass Cygwin 2014-08-05 20:18:53 +00:00
jieluo@google.com
91e32ac64d add #ifdef _MSC_VER 2014-08-01 22:17:11 +00:00
jieluo@google.com
81d833d07d add one file for VC 2013 2014-07-31 00:39:32 +00:00
jieluo@google.com
7ee0f3edc7 change some files to pass MSVC 2013 2014-07-31 00:24:48 +00:00
jieluo@google.com
b7aebe4099 Change MemoryBarrier() to MemoryBarrierInternal(). Resolve name conflict in mingw gcc 4.8.1 2014-07-30 01:23:12 +00:00
jieluo@google.com
db9f7dd1ac 1, Remove unkown field support in jave TextFormat
2, Verifies the EnumValueDscriptor for DynamicMessage.Builder#setField
2014-07-25 23:07:02 +00:00
jieluo@google.com
9eda53a6f1 Increase the allocated_size_ should be after allocation. Otherwise there might have segmentation fault if allocation throws an exception. 2014-07-24 17:31:41 +00:00
jieluo@google.com
e6726e2150 use decimal constants to avoid casting error with visual c /W4
"unary minus operator applied to unsigned type, result still unsigned"
2014-07-23 23:37:26 +00:00
jieluo@google.com
76b8a769ab add LazyFieldLite.java 2014-07-19 00:43:46 +00:00
jieluo@google.com
3b547d3526 Add iostream in message.cc. Remove unused in coded_stream_unittest.cc 2014-07-18 23:19:21 +00:00