Small limb-size in mini-gmp?

Niels Möller nisse at
Tue Nov 12 15:25:54 UTC 2019

tg at (Torbjörn Granlund) writes:

> (Editing the mp_limb_t declaration from within the test drivers might be
> a poor approach, though, so I'll wait until there is a defined method of
> controlling its declaration.)

Then we'd need something like

  #define MINI_GMP_LIMB_TYPE unsigned long

  typedef MINI_GMP_LIMB_TYPE mp_limb_t

in mini-gmp.h.

Is there any simpler or prettier way? One could do it in two lines less

  #ifndef mp_limb_t
  typedef unsigned long mp_limb_t

(leaving to the overriding code to define the type) but I'm not sure I
like that better.


Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list