make GMPless version compile.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1696 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2006-09-28 16:15:54 +00:00
parent 23757e5563
commit 47a621d236
3 changed files with 18 additions and 9 deletions

View File

@ -10,8 +10,12 @@
* *
* File: absmi.c *
* comments: Portable abstract machine interpreter *
* Last rev: $Date: 2006-09-20 20:03:51 $,$Author: vsc $ *
* Last rev: $Date: 2006-09-28 16:15:54 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.204 2006/09/20 20:03:51 vsc
* improve indexing on floats
* fix sending large lists to DB
*
* Revision 1.203 2006/08/07 18:51:44 vsc
* fix garbage collector not to try to garbage collect when we ask for large
* chunks of stack in a single go.
@ -8305,9 +8309,7 @@ Yap_absmi(int inp)
if (IsExtensionFunctor(f0)) {
switch ((CELL)f0) {
case (CELL)FunctorLongInt:
#ifdef USE_GMP
case (CELL)FunctorBigInt:
#endif
PREG = NEXTOP(PREG, xF);
GONext();
default:

View File

@ -10,7 +10,7 @@
* File: TermExt.h *
* mods: *
* comments: Extensions to standard terms for YAP *
* version: $Id: TermExt.h,v 1.11 2006-08-23 12:12:14 vsc Exp $ *
* version: $Id: TermExt.h,v 1.12 2006-09-28 16:15:54 vsc Exp $ *
*************************************************************************/
#ifdef USE_SYSTEM_MALLOC
@ -267,9 +267,11 @@ IsLongIntTerm (Term t)
#else
typedef UInt mp_limb_t;
typedef struct {
UInt _size, _mp_alloc;
void *_mp_d;
int _mp_size, _mp_alloc;
mp_limb_t *_mp_d;
} MP_INT;
#endif
@ -501,9 +503,11 @@ unify_extension (Functor f, CELL d0, CELL * pt0, CELL d1)
return (d0 == d1);
case long_int_e:
return (pt0[1] == RepAppl (d1)[1]);
#ifdef USE_GMP
case big_int_e:
#ifdef USE_GMP
return (mpz_cmp (Yap_BigIntOfTerm (d0), Yap_BigIntOfTerm (d1)) == 0);
#else
return d0 == d1;
#endif /* USE_GMP */
case double_e:
{

View File

@ -1,10 +1,13 @@
:- multifile user:file_search_path/2.
:- add_to_path('.').
:- use_module(library(swi)).
:- yap_flag(unknown,error).
library_directory('yap_extras').
:- include('chr_swi_bootstrap.pl').