diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-04-22 20:10:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-04-22 20:10:44 -0700 |
commit | b0ebf843ce862f8448aad85e61cc1b3727745fd0 (patch) | |
tree | 47b934781729c5d2143de03eb8021521771c500f /mpi-patches/add-mp-set-intptr | |
parent | 790cbdccac0540d2af12438fc7bccef2e17bc124 (diff) | |
download | txr-b0ebf843ce862f8448aad85e61cc1b3727745fd0.tar.gz txr-b0ebf843ce862f8448aad85e61cc1b3727745fd0.tar.bz2 txr-b0ebf843ce862f8448aad85e61cc1b3727745fd0.zip |
Switch to in-tree mpi directory.
* Makefile (CFLAGS, MPI_OBJS): Refer to mpi directory without version
number.
(repatch): Target removed.
(distclean): Don't try to remove old unpacked tarball mpi directory.
* configure (mpi_version, have_quilt, have_patch): Variables removed.
(gen_config_make): Do not generate mpi_version make variable.
Do not test for quilt or patch. No longer extract MPI tarball or
try to apply patches.
* mpi-1.8.6.tar.gz: File removed.
* mpi-patches: Directory and all files under it removed.
Diffstat (limited to 'mpi-patches/add-mp-set-intptr')
-rw-r--r-- | mpi-patches/add-mp-set-intptr | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/mpi-patches/add-mp-set-intptr b/mpi-patches/add-mp-set-intptr deleted file mode 100644 index cbaa9bf4..00000000 --- a/mpi-patches/add-mp-set-intptr +++ /dev/null @@ -1,77 +0,0 @@ -Index: mpi-1.8.6/mpi.c -=================================================================== ---- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:35.248929450 -0800 -+++ mpi-1.8.6/mpi.c 2015-02-07 19:32:37.136895701 -0800 -@@ -526,6 +526,59 @@ - - /* }}} */ - -+mp_err mp_set_intptr(mp_int *mp, int_ptr_t z) -+{ -+ int_ptr_t v = z > 0 ? z : -z; -+ -+ if (sizeof z > sizeof (mp_digit)) { -+ int ix, shift; -+ const int nd = (sizeof v + sizeof (mp_digit) - 1) / sizeof (mp_digit); -+ -+ ARGCHK(mp != NULL, MP_BADARG); -+ -+ mp_zero(mp); -+ -+ if(z == 0) -+ return MP_OKAY; /* shortcut for zero */ -+ -+ s_mp_grow(mp, nd); -+ -+ USED(mp) = nd; -+ -+ for (ix = 0, shift = 0; ix < nd; ix++, shift += MP_DIGIT_BIT) -+ { -+ DIGIT(mp, ix) = (v >> shift) & MP_DIGIT_MAX; -+ } -+ } else { -+ mp_set(mp, v); -+ } -+ -+ if(z < 0) -+ SIGN(mp) = MP_NEG; -+ -+ return MP_OKAY; -+} -+ -+/* -+ * No checks here: assumes that the mp is in range! -+ */ -+mp_err mp_get_intptr(mp_int *mp, int_ptr_t *z) -+{ -+ int_ptr_t out = 0; -+ -+#if MP_DIGIT_SIZE < SIZEOF_PTR -+ int ix; -+ int nd = USED(mp); -+ for (ix = 0; ix < nd; ix++, out <<= MP_DIGIT_BIT) -+ out = DIGIT(mp, ix); -+#else -+ out = DIGIT(mp, 0); -+#endif -+ -+ *z = (SIGN(mp) == MP_NEG) ? -out : out; -+ return MP_OKAY; -+} -+ - /*------------------------------------------------------------------------*/ - /* {{{ Digit arithmetic */ - -Index: mpi-1.8.6/mpi.h -=================================================================== ---- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:35.236929664 -0800 -+++ mpi-1.8.6/mpi.h 2015-02-07 19:32:37.136895701 -0800 -@@ -94,6 +94,8 @@ - void mp_zero(mp_int *mp); - void mp_set(mp_int *mp, mp_digit d); - mp_err mp_set_int(mp_int *mp, long z); -+mp_err mp_set_intptr(mp_int *mp, int_ptr_t z); -+mp_err mp_get_intptr(mp_int *mp, int_ptr_t *z); - - /*------------------------------------------------------------------------*/ - /* Single digit arithmetic */ |