Re: [Patches] Patch to src/Modules/mpzmodule.c
Hi! I wrote:
This patch allows building the Python 'mpzmodule' under SuSE Linux without having to install the source package of the GMP-libary. The gmp-mparam.h seems to be an internal header file. The patch shouldn't hurt any other platforms. in src/Modules/mpzmodule.c + #if defined __GLIBC__ && __GLIBC__ >= 2 /*aid building on Linux distributions*/ + #define BITS_PER_MP_LIMB mp_bits_per_limb + #else #include "gmp-mparam.h" + #endif
Andrew replies:
This seems like the wrong fix, tying GMP to the version of glibc! (They haven't rolled GMP into glibc, have they?) If GMP 2.0 exposes an mp_bits_per_limb constant, then the correct patch may just be changing BITS_PER_MP_LIMB to mp_bits_per_limb, inside an #ifdef GMP2 if necessary.
Guido van Rossum wrote:
Darn. I just checked it in. Well, if something better comes up, I'll check that in. I personally don't care much about this module (have never bothered to download gmp even so I can't even compile it).
I will investigate the source code of earlier versions of GMP in more detail later. May be Andrew is right, that my patch will hurt people, that happen to use a recent version GLIBC together with in ancient version of GMP. However also I believe this is rather unlikely, it shouldn't break. Sorry for the confusion I've caused. Regards, Peter -- Peter Funk, Oldenburger Str.86, 27777 Ganderkesee, Tel: 04222 9502 70, Fax: -60
participants (1)
-
pf@artcom-gmbh.de