File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,6 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2);
9191 #define ENDIAN_LITTLE
9292 #define ENDIAN_64BITWORD
9393 #define LTC_FAST
94- #if defined(_ILP32 ) || defined(__ILP32__ )
95- #define ENDIAN_64BITWORD_X32
96- #endif
9794#endif
9895
9996/* detect PPC32 */
@@ -178,6 +175,11 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2);
178175 #define LTC_FAST
179176#endif
180177
178+ /* Detect ILP32, commonly known as x32 on Linux and also possible on AIX */
179+ #if defined(_ILP32 ) || defined(__ILP32__ )
180+ #define ENDIAN_64BITWORD_ILP32
181+ #endif
182+
181183/* endianness fallback */
182184#if !defined(ENDIAN_BIG ) && !defined(ENDIAN_LITTLE )
183185 #if defined(_BYTE_ORDER ) && _BYTE_ORDER == _BIG_ENDIAN || \
Original file line number Diff line number Diff line change 1212
1313#define LTC_PAD_MASK (0xF000U)
1414
15- /* only real 64bit, not x32 */
16- #if defined(ENDIAN_64BITWORD ) && !defined(ENDIAN_64BITWORD_X32 )
15+ /* only real 64bit, not ILP32 */
16+ #if defined(ENDIAN_64BITWORD ) && !defined(ENDIAN_64BITWORD_ILP32 )
1717 #define CONSTPTR (n ) CONST64(n)
1818#else
1919 #define CONSTPTR (n ) n ## uL
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ int multi_test(void)
1515
1616/* HASH testing */
1717 len = sizeof (buf [0 ]);
18- #if defined(ENDIAN_32BITWORD ) || defined(_WIN32 ) || defined(ENDIAN_64BITWORD_X32 )
18+ #if defined(ENDIAN_32BITWORD ) || defined(_WIN32 ) || defined(ENDIAN_64BITWORD_ILP32 )
1919 len2 = 0x80000000UL ;
2020#else
2121 /* Check against the max. input limit of SHA-1 as of RFC8017 */
You can’t perform that action at this time.
0 commit comments