Merge pull request #210 from libtom/pr/aix-fix

IBM xlc compiler related fixes
This commit is contained in:
karel-m 2017-05-05 19:58:14 +02:00 committed by GitHub
commit b439f83018
2 changed files with 8 additions and 4 deletions

View File

@ -41,8 +41,8 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2);
#endif #endif
/* some compilers do not like "inline" */ /* some compilers do not like "inline" (or maybe "static inline"), namely: HP cc, IBM xlc */
#if defined(__HP_cc) #if defined(__HP_cc) || defined(__xlc__)
#define LTC_INLINE #define LTC_INLINE
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#define LTC_INLINE __inline #define LTC_INLINE __inline

View File

@ -17,7 +17,9 @@ static int _xts_test_accel_xts_encrypt(const unsigned char *pt, unsigned char *c
{ {
int ret; int ret;
symmetric_xts xts; symmetric_xts xts;
void *orig; int (*orig)(const unsigned char *, unsigned char *,
unsigned long , unsigned char *, symmetric_key *,
symmetric_key *);
/* AES can be under rijndael or aes... try to find it */ /* AES can be under rijndael or aes... try to find it */
if ((xts.cipher = find_cipher("aes")) == -1) { if ((xts.cipher = find_cipher("aes")) == -1) {
@ -42,7 +44,9 @@ static int _xts_test_accel_xts_decrypt(const unsigned char *ct, unsigned char *p
{ {
int ret; int ret;
symmetric_xts xts; symmetric_xts xts;
void *orig; int (*orig)(const unsigned char *, unsigned char *,
unsigned long , unsigned char *, symmetric_key *,
symmetric_key *);
/* AES can be under rijndael or aes... try to find it */ /* AES can be under rijndael or aes... try to find it */
if ((xts.cipher = find_cipher("aes")) == -1) { if ((xts.cipher = find_cipher("aes")) == -1) {