mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
changed ENDIAN_* to *_ENDIAN_ORDER
This commit is contained in:
@@ -1631,10 +1631,10 @@ void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c)
|
|||||||
|
|
||||||
/* If we know the endianness of this architecture, and we're using
|
/* If we know the endianness of this architecture, and we're using
|
||||||
32-bit fp_digits, we can optimize this */
|
32-bit fp_digits, we can optimize this */
|
||||||
#if (defined(ENDIAN_LITTLE) || defined(ENDIAN_BIG)) && !defined(FP_64BIT)
|
#if (defined(LITTLE_ENDIAN_ORDER) || defined(BIG_ENDIAN_ORDER)) && !defined(FP_64BIT)
|
||||||
/* But not for both simultaneously */
|
/* But not for both simultaneously */
|
||||||
#if defined(ENDIAN_LITTLE) && defined(ENDIAN_BIG)
|
#if defined(LITTLE_ENDIAN_ORDER) && defined(BIG_ENDIAN_ORDER)
|
||||||
#error Both ENDIAN_LITTLE and ENDIAN_BIG defined.
|
#error Both LITTLE_ENDIAN_ORDER and BIG_ENDIAN_ORDER defined.
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
unsigned char *pd = (unsigned char *)a->dp;
|
unsigned char *pd = (unsigned char *)a->dp;
|
||||||
@@ -1646,7 +1646,7 @@ void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c)
|
|||||||
}
|
}
|
||||||
a->used = (c + sizeof(fp_digit) - 1)/sizeof(fp_digit);
|
a->used = (c + sizeof(fp_digit) - 1)/sizeof(fp_digit);
|
||||||
/* read the bytes in */
|
/* read the bytes in */
|
||||||
#ifdef ENDIAN_BIG
|
#ifdef BIG_ENDIAN_ORDER
|
||||||
{
|
{
|
||||||
/* Use Duff's device to unroll the loop. */
|
/* Use Duff's device to unroll the loop. */
|
||||||
int idx = (c - 1) & ~3;
|
int idx = (c - 1) & ~3;
|
||||||
|
Reference in New Issue
Block a user