Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Only test one combination: "Visual Studio 12 + Win64 + Debug + DLL". We can
# test more combinations but AppVeyor just takes too long to finish (each
# combination takes ~15mins).
platform:
- Win64

Expand All @@ -14,6 +11,11 @@ environment:
BUILD_DLL: ON
UNICODE: ON

- language: cpp
image: Visual Studio 2017
BUILD_DLL: OFF
UNICODE: ON

- language: csharp
image: Visual Studio 2017

Expand Down
9 changes: 9 additions & 0 deletions src/google/protobuf/generated_message_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,16 @@ struct LIBPROTOBUF_EXPORT SCCInfoBase {
kRunning = 1,
kUninitialized = -1, // initial state
};
#ifndef _MSC_VER
std::atomic<int> visit_status;
#else
// MSVC doesnt make std::atomic constant initialized. This union trick
// makes it so.
union {
int visit_status_to_make_linker_init;
std::atomic<int> visit_status;
};
#endif
int num_deps;
void (*init_func)();
// This is followed by an array of num_deps
Expand Down