On Thu, 4 Apr 2013, Niels Möller wrote:
Martin Storsjö martin@martin.st writes:
Didn't compile test it yet, but I rebased my local patches on top of your master, and it seems that the mp_bitcnt_t fallback still is missing.
Ooops, I missed that one. Looking at it again now, I wonder if a fallback is the right solution, maybe it's easier to replace all uses of mp_bitcnt_t (it's used only for some local variables, it seems) by a plain unsigned. Like in bignum-random-prime.c, which carries the comment
/* Avoid the mp_bitcnt_t type for compatibility with older GMP versions. */
Or maybe we should use unsigned long, but I think plain unsigned should be fine even on platforms where unsigned is 16 bits; we don't handle any numbers beyond 65000 bits, in particular not on 16-bit platforms.
Yes, this is probably easier.
And I do agree that long probably isn't needed (does nettle even run on a platform where the native ints are 16 bit?).
// Martin