diff options
Diffstat (limited to 'src/ltc/headers/tomcrypt_cfg.h')
-rw-r--r-- | src/ltc/headers/tomcrypt_cfg.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ltc/headers/tomcrypt_cfg.h b/src/ltc/headers/tomcrypt_cfg.h index 994a084b..2a024aa4 100644 --- a/src/ltc/headers/tomcrypt_cfg.h +++ b/src/ltc/headers/tomcrypt_cfg.h @@ -3,7 +3,7 @@ /* This is the build config file. * - * With this you can setup what to inlcude/exclude automatically during any build. Just comment + * With this you can setup what to include/exclude automatically during any build. Just comment * out the line that #define's the word for the thing you want to remove. phew! */ @@ -91,6 +91,11 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2); #define ENDIAN_LITTLE #define ENDIAN_64BITWORD #define LTC_FAST + #if defined(__SSE4_1__) + #if __SSE4_1__ == 1 + #define LTC_AMD64_SSE4_1 + #endif + #endif #endif /* detect PPC32 */ @@ -295,6 +300,15 @@ typedef unsigned long ltc_mp_digit; #define LTC_ALIGN(n) #endif +/* Define `LTC_NO_NULL_TERMINATION_CHECK` in the user code + * before including `tomcrypt.h` to disable this functionality. + */ +#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(LTC_NO_NULL_TERMINATION_CHECK) +# define LTC_NULL_TERMINATED __attribute__((sentinel)) +#else +# define LTC_NULL_TERMINATED +#endif + #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405) # define LTC_DEPRECATED(s) __attribute__((deprecated("replaced by " #s))) # define PRIVATE_LTC_DEPRECATED_PRAGMA(s) _Pragma(#s) |