version 1.6, 2001/05/04 01:06:29 |
version 1.8, 2003/09/02 03:24:50 |
|
|
/*$OpenXM: OpenXM/src/kan96xx/plugin/cmo-gmp.c,v 1.5 2000/02/01 02:38:58 noro Exp $ */ |
/*$OpenXM: OpenXM/src/kan96xx/plugin/cmo-gmp.c,v 1.7 2003/08/26 05:04:41 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
/* #include <netinet/in.h> */ |
/* #include <netinet/in.h> */ |
|
#include <limits.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
#include "extern.h" |
#include "extern.h" |
|
|
#include "kclass.h" |
#include "kclass.h" |
|
|
#include "gmp.h" |
#include "gmp.h" |
#include "gmp-impl.h" |
#include "gmp-impl.h" |
|
|
|
|
#include "file2.h" |
#include "file2.h" |
Line 166 cmoOutGMPCoeff_new(mpz_srcptr x) |
|
Line 167 cmoOutGMPCoeff_new(mpz_srcptr x) |
|
tmp[0] = htonl(CMO_ZZ); |
tmp[0] = htonl(CMO_ZZ); |
cmoOutputToBuf(CMOPUT,tmp,sizeof(cmoint)); |
cmoOutputToBuf(CMOPUT,tmp,sizeof(cmoint)); |
|
|
if (BITS_PER_CHAR != 8) { |
if (CHAR_BIT != 8) { |
fprintf(stderr,"BITS_PER_CHAR = %d\n",BITS_PER_CHAR); |
fprintf(stderr,"CHAR_BIT = %d\n",CHAR_BIT); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
|
exit(10); |
exit(10); |
} |
} |
|
|
Line 215 cmoGetGMPCoeff_new(MP_INT *x, struct cmoBuffer *cb) |
|
Line 215 cmoGetGMPCoeff_new(MP_INT *x, struct cmoBuffer *cb) |
|
mp_size_t in_bytesize; |
mp_size_t in_bytesize; |
int neg_flag; |
int neg_flag; |
|
|
if (BITS_PER_CHAR != 8) { |
if (CHAR_BIT != 8) { |
fprintf(stderr,"BITS_PER_CHAR = %d\n",BITS_PER_CHAR); |
fprintf(stderr,"CHAR_BIT = %d\n",CHAR_BIT); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
|
exit(10); |
exit(10); |
} |
} |
|
|
Line 274 cmoOutGMPCoeff_new(mpz_srcptr x) |
|
Line 273 cmoOutGMPCoeff_new(mpz_srcptr x) |
|
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
exit(10); |
exit(10); |
} |
} |
if (BITS_PER_CHAR != 8) { |
if (CHAR_BIT != 8) { |
fprintf(stderr,"BITS_PER_CHAR = %d\n",BITS_PER_CHAR); |
fprintf(stderr,"CHAR_BIT = %d\n",CHAR_BIT); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
|
exit(10); |
exit(10); |
} |
} |
|
|
Line 320 cmoGetGMPCoeff_new(MP_INT *x, struct cmoBuffer *cb) |
|
Line 318 cmoGetGMPCoeff_new(MP_INT *x, struct cmoBuffer *cb) |
|
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
exit(10); |
exit(10); |
} |
} |
if (BITS_PER_CHAR != 8) { |
if (CHAR_BIT != 8) { |
fprintf(stderr,"BITS_PER_CHAR = %d\n",BITS_PER_CHAR); |
fprintf(stderr,"CHAR_BIT = %d\n",CHAR_BIT); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"cmo-gmp.c does not work on this CPU.\n"); |
fprintf(stderr,"Read the GMP source code and rewrite cmo-gmp.c.\n"); |
|
exit(10); |
exit(10); |
} |
} |
|
|