| Commit message (Collapse) | Author | Age |
|\
| |
| | |
Disable thread local storage for OSX < 10.7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For Clang's thread safety analysis (-Wthread-safety) to pass without warnings,
we need to annotate WrappedMutex to indicate that Lock() acquires the lock and
Unlock() releases it. This CL adds the annotations and guards them with an
ifdef to make sure they're a no-op on compilers other than Clang.
This is a cherry-pick of a change I already made to the Google-internal
codebase.
|
| |
| |
| |
| |
| |
| |
| | |
references (#4633)
* rewrite int128 long divison to avoid stackoverflow hit
Protobuf was showing Stackoverflow hits in the code base, primarily code written to calculate long division. This code was copied from a stackoverflow post, which means it would be licensed under CC BY-SA 3.0. Due to this license, IBM Legal did not want to include this OSS in our products and advised us to re-write this particular piece of code to avoid the license restriction. We have re-written the code for our own distribution, and are willing to merge it into the main code base for others who want to avoid the stackoverflow license issues to benefit as well.
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Integrated internal changes from Google
|
|\ \ \
| | | |
| | | | |
Fix spelling error of __GNUC_MINOR__
|
|\ \ \ \
| | | | |
| | | | | |
Support using MSVC intrinsics in Log2FloorNonZero
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We no longer need this, now that we have finished the switch to C++11
and are using std::unique_ptr.
|
| | | |\ \
| |_|_|/ /
|/| | | | |
|
| | | | | |
|
| |/ / /
|/| | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
Add support for libc++ on Windows.
|
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Chrome is running into two issues with the use of this macro
in open-source protobuf (https://crbug.com/809157):
1. GOOGLE_FALLTHROUGH_INTENDED is defined to nothing on __APPLE__
platforms, which blocks us from enabling -Wimplicit-fallthrough
on Mac and iOS. (We use a hermetic self-built modern clang,
so whatever Xcode bug that exclusion might be for doesn't apply
to us.)
2. It's in a public header file, and it's included in a public header file.
When clang suggests adding [[clang::fallthrough]], it checks if it knows of
a macro expanding to that and if so, suggests inserting that. Since lots of
chrome code includes protobuf headers, it often suggests inserting
GOOGLE_FALLTHROUGH_INTENDED (from protobuf) instead of the correct
FALLTHROUGH (from chrome's base).
Since the fallthrough doens't do anyting useful, just remove it.
Long ago, this might have had perf impact, but d64a2d9941c36a7bc added a
parsing fast path that calls this switch as slow fallback, so it should
be off the hot path nowadays.
No intended behavior change.
This is the public version of internal change 184824132.
|
| | |
| | |
| | |
| | |
| | |
| | | |
These statements pulled a bunch of symbols from the std namespace into
the global namespace. This commit removes all of them except for
std::string, which is a bit trickier to remove.
|
|/ /
| |
| |
| |
| | |
This disables a couple of workarounds which are only necessary with
MSVC's standard library and cause problems with libc++.
|
|\ \
| | |
| | | |
Add more tests to time_test
|
| | |
| | |
| | | |
Better test coverage for datetime validation.
|
|/ /
| |
| |
| | |
Found with PVS-Studio static analyser, see
https://www.viva64.com/en/b/0550/
|
|\ \ |
|
|\ \ \ |
|
| |/ / |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This fixes issue #1775.
|
|\ \ \
| | | |
| | | | |
fix undefined behavior in C++03
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This is necessary for avoiding a strange compiler error that we have
already run into with older versions of Clang on NaCl.
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Unlike GetEnvironmentVariableW,
GetCurrentDirectoryW doesn't set
ERROR_INSUFFICIENT_BUFFER.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the test cannot find a temp directory by
checking environment variables, it will fall back
to using the current working directory as the temp
directory root.
This is what the test used to do as of commit
https://github.com/google/protobuf/commit/6de51caed52d798815954646b230c5aef3e4d2fc
and what was then changed by commit
https://github.com/google/protobuf/pull/3978/commits/792d098769d8e000d8d474c8ffd201d2eabc2134
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixes https://github.com/google/protobuf/issues/3951
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do not use "googletest.h", apprently that leads to
linking errors on Windows which I couldn't figure
out how to solve, and decided to just go with
plain gTest instead.
See https://github.com/google/protobuf/issues/3951
|
|\| | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Removed the redefination in the atomicword_compat.h. Now Atomic32 will
alwyas be intptr_t in 32bit platforms, the bridge is no longer needed.
- Change NaCl 64bit to use intptr_t instead of int32 for Atomic32,
otherwise AtmoicWord APIs will miss the definations.
After this change, the AtmoicWord will always be either Atomic32 or
Atmoic64 depending on the platforms.
|
|/ / |
|
|\ \
| | |
| | | |
fix implicit fallthrough in gcc 7
|
| | | |
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
fixes #3700
|
|\ \ |
|
| | | |
|