summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/localconsts.h9
-rw-r--r--src/utils/base64.cpp3
2 files changed, 11 insertions, 1 deletions
diff --git a/src/localconsts.h b/src/localconsts.h
index df49f8098..4b1616db1 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -33,6 +33,12 @@
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
+#ifdef __clang__
+#define CLANG_VERSION (__clang_major__ * 10000 \
+ + __clang_minor__ * 100 \
+ + __clang_patchlevel__)
+#endif // __clang__
+
#if !defined(__GXX_EXPERIMENTAL_CXX0X__)
#undef nullptr
#define nullptr 0
@@ -55,6 +61,7 @@
#define noexcept
#endif // __clang__
#define noexcept2
+#define constexpr2
// #define A_DELETE
// #define A_DELETE_COPY
@@ -174,7 +181,7 @@
#ifdef __clang__
#define PRAGMACLANG(str) _Pragma(#str)
-#if __clang_major__ >= 6
+#if CLANG_VERSION >= 30800
#define PRAGMACLANG6(str) _Pragma(#str)
#else // __clang_major__ >= 6
#define PRAGMACLANG6(str)
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index ddf117ec4..b0828e99f 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -162,6 +162,9 @@ unsigned char *php3_base64_decode(const unsigned char *restrict const string,
return nullptr;
case 2:
k++;
+ // copy from 3. is it should be here?
+ result[k++] = 0;
+ break;
case 3:
result[k++] = 0;
break;