diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-08-24 08:13:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 08:13:23 -0400 |
commit | 1bbbfb6b7538e88f979c68aa70d6427ce2e98cc0 (patch) | |
tree | d96a2f70a7a526e09e42458593089d4429675052 /config.h | |
parent | 243673c32acee63a7b0b23aeebac9b2ccfd80e7d (diff) | |
download | cryptopp-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.h | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -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)
|