[Patches] Patch to src/Modules/mpzmodule.c

Peter Funk pf@artcom-gmbh.de
Thu, 24 Feb 2000 15:49:42 +0100 (MET)


Dear Python patcher!

Please apply the patch appended below and commit into the CVS tree.
--- argument: ---
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.
--- obligatory disclaimer: ---
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims").  To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.

I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation.  I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.
--- dry signature: ---
Regards, Peter
-- 
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen)
--- patch: ---
*** ../../Python-CVS_10_02_00-orig/dist/src/Modules/mpzmodule.c	Mon Dec 14 20:36:14 1998
--- src/Modules/mpzmodule.c	Wed Feb 23 22:52:02 2000
***************
*** 92,98 ****
--- 92,103 ----
  */
  
  #include "gmp.h"
+ 
+ #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
  
  #if __GNU_MP__ + 0 == 2
  #define GMP2