union initialization is not supported by ISO C
This commit is contained in:
parent
2404bd3c13
commit
759ed1f050
@ -34,7 +34,8 @@ int mp_export(void* rop, size_t* countp, int order, size_t size,
|
|||||||
union {
|
union {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char c[4];
|
char c[4];
|
||||||
} lint = {0x01020304};
|
} lint;
|
||||||
|
lint.i = 0x01020304;
|
||||||
|
|
||||||
endian = (lint.c[0] == 4 ? -1 : 1);
|
endian = (lint.c[0] == 4 ? -1 : 1);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,8 @@ int mp_import(mp_int* rop, size_t count, int order, size_t size,
|
|||||||
union {
|
union {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char c[4];
|
char c[4];
|
||||||
} lint = {0x01020304};
|
} lint;
|
||||||
|
lint.i = 0x01020304;
|
||||||
|
|
||||||
endian = (lint.c[0] == 4 ? -1 : 1);
|
endian = (lint.c[0] == 4 ? -1 : 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user