Branch: Tag:

1998-07-11

1998-07-11 16:08:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now with support for gmp2 (I hope).

Rev: src/modules/Gmp/mpz_glue.c:1.35
Rev: src/modules/Gmp/next_prime.c:1.7

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: mpz_glue.c,v 1.34 1998/04/29 23:11:10 grubba Exp $"); + RCSID("$Id: mpz_glue.c,v 1.35 1998/07/11 16:08:05 grubba Exp $");   #include "gmp_machine.h"    - #if !defined(HAVE_LIBGMP) - #undef HAVE_GMP_H - #endif + #if defined(HAVE_GMP2_GMP_H) && defined(HAVE_LIBGMP2) + #define USE_GMP2 + #else /* !HAVE_GMP2_GMP_H || !HAVE_LIBGMP2 */ + #if defined(HAVE_GMP_H) && defined(HAVE_LIBGMP) + #define USE_GMP + #endif /* HAVE_GMP_H && HAVE_LIBGMP */ + #endif /* HAVE_GMP2_GMP_H && HAVE_LIBGMP2 */    - #ifdef HAVE_GMP_H + #if defined(USE_GMP) || defined(USE_GMP2)      #include "interpret.h"   #include "svalue.h"
27:   #include "opcodes.h"   #include "module_support.h"    + #ifdef USE_GMP2 + #include <gmp2/gmp.h> + #else /* !USE_GMP2 */   #include <gmp.h> -  + #endif /* USE_GMP2 */ +    #include "my_gmp.h"      #include <limits.h>
878:      void pike_module_exit(void)   { - #ifdef HAVE_GMP_H + #if defined(USE_GMP) || defined(USE_GMP2)    free_program(mpzmod_program);   #endif   }      void pike_module_init(void)   { - #ifdef HAVE_GMP_H + #if defined(USE_GMP) || defined(USE_GMP2)    start_new_program();    add_storage(sizeof(MP_INT));