mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
bpo-46670: Fix #ifdef in sha3module.c (GH-31180)
* Test if HAVE_ALIGNED_REQUIRED is defined, not its value. * Define explicitly NOT_PYTHON macro to 0. Fix "gcc -Wundef" warnings.
This commit is contained in:
parent
7d8b69e1d1
commit
f20ca766fe
1 changed files with 3 additions and 1 deletions
|
|
@ -57,6 +57,8 @@
|
||||||
typedef uint64_t UINT64;
|
typedef uint64_t UINT64;
|
||||||
typedef unsigned char UINT8;
|
typedef unsigned char UINT8;
|
||||||
#endif
|
#endif
|
||||||
|
// kcp/KeccakP-1600-opt64.c doesn't need to define UINT8
|
||||||
|
#define NOT_PYTHON 0
|
||||||
|
|
||||||
/* replacement for brg_endian.h */
|
/* replacement for brg_endian.h */
|
||||||
#define IS_LITTLE_ENDIAN 1234
|
#define IS_LITTLE_ENDIAN 1234
|
||||||
|
|
@ -69,7 +71,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Prevent bus errors on platforms requiring aligned accesses such ARM. */
|
/* Prevent bus errors on platforms requiring aligned accesses such ARM. */
|
||||||
#if HAVE_ALIGNED_REQUIRED && !defined(NO_MISALIGNED_ACCESSES)
|
#if defined(HAVE_ALIGNED_REQUIRED) && !defined(NO_MISALIGNED_ACCESSES)
|
||||||
#define NO_MISALIGNED_ACCESSES
|
#define NO_MISALIGNED_ACCESSES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue