Branch: Tag:

1999-08-06

1999-08-06 22:13:48 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

bugfix to work better with MSVC++ (I hope)

Rev: src/modules/Gmp/mpz_glue.c:1.43
Rev: src/modules/Gmp/my_gmp.h:1.4
Rev: src/modules/Gmp/next_prime.c:1.10

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: mpz_glue.c,v 1.42 1999/06/19 20:20:47 hubbe Exp $"); + RCSID("$Id: mpz_glue.c,v 1.43 1999/08/06 22:13:46 hubbe Exp $");   #include "gmp_machine.h"      #if defined(HAVE_GMP2_GMP_H) && defined(HAVE_LIBGMP2)
31:   #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>    -  + #ifdef _MSC_VER + /* No random()... provide one for gmp +  * This should possibly be a configure test +  * /Hubbe +  */ + long random(void) + { +  return my_rand(); + } + #endif +    #undef THIS   #define THIS ((MP_INT *)(fp->current_storage))   #define OBTOMPZ(o) ((MP_INT *)(o->storage))