diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-12-02 22:37:15 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-12-02 22:37:15 +0100 |
commit | af8d610292dd0aa91670f69332fd690d9bf0fe1c (patch) | |
tree | d2d8b5350caec560db5c0944b8ef5bcdffd1dcc8 /gen-psqr.c | |
parent | fa8ecba96c1fd78d534ecaa860c0cdb828424108 (diff) | |
download | gmp-af8d610292dd0aa91670f69332fd690d9bf0fe1c.tar.gz |
* gen-psqr.c (HAVE_CONST, const): New macros.
Diffstat (limited to 'gen-psqr.c')
-rw-r--r-- | gen-psqr.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gen-psqr.c b/gen-psqr.c index b5d1f00c6..179ad33c7 100644 --- a/gen-psqr.c +++ b/gen-psqr.c @@ -65,6 +65,27 @@ MA 02111-1307, USA. */ */ + +/* Normally we aren't using const in gen*.c programs, so as not to have to + bother figuring out if it works, but using it with f_cmp_divisor and + f_cmp_fraction avoids warnings from the qsort calls. */ + +/* Same tests as gmp.h. */ +#if defined (__STDC__) \ + || defined (__cplusplus) \ + || defined (_AIX) \ + || defined (__DECC) \ + || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ + || defined (_MSC_VER) \ + || defined (_WIN32) +#define HAVE_CONST 1 +#endif + +#if ! HAVE_CONST +#define const +#endif + + mpz_t *sq_res_0x100; /* table of limbs */ int nsq_res_0x100; /* elements in sq_res_0x100 array */ int sq_res_0x100_num; /* squares in sq_res_0x100 */ |