diff options
author | marcus <marcus@FreeBSD.org> | 2003-11-28 03:40:08 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2003-11-28 03:40:08 +0800 |
commit | 1140b887c26f861cb4cff41bce11743f9682aadb (patch) | |
tree | c8fc9790b13c2eaca3f47c8b9157305649c6770d /lang/librep/files | |
parent | 2d3cb2fc882528bbe6d808f74c21c6ecf0207781 (diff) | |
download | freebsd-ports-gnome-1140b887c26f861cb4cff41bce11743f9682aadb.tar.gz freebsd-ports-gnome-1140b887c26f861cb4cff41bce11743f9682aadb.tar.zst freebsd-ports-gnome-1140b887c26f861cb4cff41bce11743f9682aadb.zip |
This patch is still needed for -STABLE and older versions of 5.x.
Approved by: portmgr (implicit)
Diffstat (limited to 'lang/librep/files')
-rw-r--r-- | lang/librep/files/stable-patch-src_numbers.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lang/librep/files/stable-patch-src_numbers.c b/lang/librep/files/stable-patch-src_numbers.c new file mode 100644 index 000000000000..189ad75de6ae --- /dev/null +++ b/lang/librep/files/stable-patch-src_numbers.c @@ -0,0 +1,22 @@ +--- src/numbers.c.orig Sat May 31 17:50:08 2003 ++++ src/numbers.c Sat May 31 18:15:24 2003 +@@ -2696,13 +2696,14 @@ + #ifdef HAVE_GMP + else + { +- rep_number_q *q; ++ double x, y; ++ rep_number_z *z; + +- q = make_number (rep_NUMBER_RATIONAL); +- mpq_init (q->q); +- mpq_set_d (q->q, rep_get_float (arg)); ++ rationalize (arg, &x, &y); ++ z = make_number (rep_NUMBER_BIGNUM); ++ mpz_init_set_d (z->z, (x / y)); + +- return maybe_demote (rep_VAL (q)); ++ return maybe_demote (rep_VAL (z)); + } + #else + else |