From: Rudolf Polzer Date: Tue, 7 Sep 2010 17:47:41 +0000 (+0200) Subject: work around missing BN_*_negative on Crap OS X X-Git-Tag: xonotic-v0.1.0preview~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a0b5239a7c040e5694b62993ee09d3bfbc589b03;p=xonotic%2Fd0_blind_id.git work around missing BN_*_negative on Crap OS X --- diff --git a/d0_bignum-openssl.c b/d0_bignum-openssl.c index b4fc873..ef7985a 100644 --- a/d0_bignum-openssl.c +++ b/d0_bignum-openssl.c @@ -46,6 +46,14 @@ #include #include +// for stupid OpenSSL versions in Mac OS X +#ifndef BN_is_negative +#define BN_is_negative(a) ((a)->neg != 0) +#endif +#ifndef BN_set_negative +#define BN_set_negative(a,n) ((a)->neg = ((n) && !BN_is_zero(b))) +#endif + struct d0_bignum_s { BIGNUM z;