diff options
Diffstat (limited to 'src/google/protobuf/stubs/platform_macros.h')
-rw-r--r-- | src/google/protobuf/stubs/platform_macros.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h index 30604782..1705b416 100644 --- a/src/google/protobuf/stubs/platform_macros.h +++ b/src/google/protobuf/stubs/platform_macros.h @@ -65,6 +65,14 @@ #elif defined(__ppc__) #define GOOGLE_PROTOBUF_ARCH_PPC 1 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 +#elif defined(__GNUC__) && \ + (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)) +// We fallback to the generic GCC >= 4.7 implementation in atomicops.h +# if __LP64__ +# define GOOGLE_PROTOBUF_ARCH_64_BIT 1 +# else +# define GOOGLE_PROTOBUF_ARCH_32_BIT 1 +# endif #else #error Host architecture was not detected as supported by protobuf #endif |