summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-08-24 08:13:23 -0400
committerGitHub <noreply@github.com>2018-08-24 08:13:23 -0400
commit1bbbfb6b7538e88f979c68aa70d6427ce2e98cc0 (patch)
treed96a2f70a7a526e09e42458593089d4429675052 /config.h
parent243673c32acee63a7b0b23aeebac9b2ccfd80e7d (diff)
downloadcryptopp-git-1bbbfb6b7538e88f979c68aa70d6427ce2e98cc0.tar.gz
Fix partial specializations for FixedSizeAllocatorWithCleanup (PR #710)
Commit afbd3e60f68f effectively treated a symptom and not the underlying problem. The problem was linkers on 32-bit systems ignore CRYPTOPP_ALIGN_DAT(16) passed down by the compiler and align to 8-bytes or less. We have to use Wei's original code in some places. It is not a bad thing, but the bit fiddling is something we would like to contain a little more by depending more on language or platform features. This commit keeps the original changes which improve partial specializations; but fixes 32-bit linker behavior by effectively reverting afbd3e60f68f and e054d36dc88d00. We also add more comments so the next person has understands why things are done they way they are.
Diffstat (limited to 'config.h')
-rw-r--r--config.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/config.h b/config.h
index 67664b2f..2d4f970f 100644
--- a/config.h
+++ b/config.h
@@ -346,13 +346,10 @@ NAMESPACE_END
// CRYPTOPP_ALIGN_DATA may not be reliable on AIX.
#ifndef CRYPTOPP_ALIGN_DATA
#if defined(_MSC_VER)
- #define CRYPTOPP_ALIGN_ATTRIBUTE 1
#define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
#elif defined(__GNUC__) || (__SUNPRO_CC >= 0x5100)
- #define CRYPTOPP_ALIGN_ATTRIBUTE 1
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
#elif defined(__xlc__) || defined(__xlC__)
- #define CRYPTOPP_ALIGN_ATTRIBUTE 1
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
#else
#define CRYPTOPP_ALIGN_DATA(x)