mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Merge branch 'bug8587_v3' into maint-0.2.4
This commit is contained in:
commit
a1178cdbcf
5
changes/bug8587
Normal file
5
changes/bug8587
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (build):
|
||||
- Build Tor correctly on 32-bit platforms where the compiler can build
|
||||
but not run code using the "uint128_t" construction. Fixes bug 8587;
|
||||
bugfix on 0.2.4.8-alpha.
|
||||
|
36
configure.ac
36
configure.ac
@ -663,14 +663,18 @@ if test x$enable_curve25519 != xno; then
|
||||
[AC_LANG_PROGRAM([dnl
|
||||
#include <stdint.h>
|
||||
typedef unsigned uint128_t __attribute__((mode(TI)));
|
||||
], [dnl
|
||||
uint64_t a = ((uint64_t)2000000000) * 1000000000;
|
||||
uint64_t b = ((uint64_t)1234567890) << 24;
|
||||
int func(uint64_t a, uint64_t b) {
|
||||
uint128_t c = ((uint128_t)a) * b;
|
||||
return ((uint64_t)(c>>96)) == 522859 &&
|
||||
((uint64_t)(c>>64))&0xffffffffL == 3604448702L &&
|
||||
((uint64_t)(c>>32))&0xffffffffL == 2351960064L &&
|
||||
((uint64_t)(c))&0xffffffffL == 0;
|
||||
int ok = ((uint64_t)(c>>96)) == 522859 &&
|
||||
(((uint64_t)(c>>64))&0xffffffffL) == 3604448702L &&
|
||||
(((uint64_t)(c>>32))&0xffffffffL) == 2351960064L &&
|
||||
(((uint64_t)(c))&0xffffffffL) == 0;
|
||||
return ok;
|
||||
}
|
||||
], [dnl
|
||||
int ok = func( ((uint64_t)2000000000) * 1000000000,
|
||||
((uint64_t)1234567890) << 24);
|
||||
return !ok;
|
||||
])],
|
||||
[tor_cv_can_use_curve25519_donna_c64=yes],
|
||||
[tor_cv_can_use_curve25519_donna_c64=no],
|
||||
@ -678,14 +682,18 @@ if test x$enable_curve25519 != xno; then
|
||||
[AC_LANG_PROGRAM([dnl
|
||||
#include <stdint.h>
|
||||
typedef unsigned uint128_t __attribute__((mode(TI)));
|
||||
], [dnl
|
||||
uint64_t a = ((uint64_t)2000000000) * 1000000000;
|
||||
uint64_t b = ((uint64_t)1234567890) << 24;
|
||||
int func(uint64_t a, uint64_t b) {
|
||||
uint128_t c = ((uint128_t)a) * b;
|
||||
return ((uint64_t)(c>>96)) == 522859 &&
|
||||
((uint64_t)(c>>64))&0xffffffffL == 3604448702L &&
|
||||
((uint64_t)(c>>32))&0xffffffffL == 2351960064L &&
|
||||
((uint64_t)(c))&0xffffffffL == 0;
|
||||
int ok = ((uint64_t)(c>>96)) == 522859 &&
|
||||
(((uint64_t)(c>>64))&0xffffffffL) == 3604448702L &&
|
||||
(((uint64_t)(c>>32))&0xffffffffL) == 2351960064L &&
|
||||
(((uint64_t)(c))&0xffffffffL) == 0;
|
||||
return ok;
|
||||
}
|
||||
], [dnl
|
||||
int ok = func( ((uint64_t)2000000000) * 1000000000,
|
||||
((uint64_t)1234567890) << 24);
|
||||
return !ok;
|
||||
])],
|
||||
[tor_cv_can_use_curve25519_donna_c64=cross],
|
||||
[tor_cv_can_use_curve25519_donna_c64=no])])])
|
||||
|
Loading…
Reference in New Issue
Block a user