Il 2019-11-13 22:20 ni...@lysator.liu.se ha scritto:
t...@gmplib.org (Torbjörn Granlund) writes:

2. follow Marco's proposal allowing "char", "short", "int", "long", and
perhaps the spacey "long long" as overriding types, or

I guess that's good enough for now. But is it that difficult to do
quoting of "unsigned char"? Something like

  make check-mini-gmp CPPFLAGS='-D"MINI_GMP_LIMB_TYPE=unsigned char"'

With the patch below applied, the following line works on shell:
gmake CPPFLAGS='-DMINI_GMP_LIMB_TYPE=unsigned\ char' check-mini-gmp
And also on my Debian...

diff -r 0a7bccdcda14 Makefile.am
--- a/Makefile.am       Sat Nov 16 08:48:59 2019 +0100
+++ b/Makefile.am       Sat Nov 16 11:52:46 2019 +0100
@@ -442,7 +442,7 @@
                MINI_GMP_DIR="$$abs_srcdir/mini-gmp" \
                LDFLAGS="-L../../.libs" \
                LIBS="-lgmp -lm" \
-               CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="-I../.." check
+ CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -I../.." check

 clean-mini-gmp:
        if [ -d mini-gmp/tests ] ; then \
diff -r 0a7bccdcda14 mini-gmp/mini-gmp.h
--- a/mini-gmp/mini-gmp.h       Sat Nov 16 08:48:59 2019 +0100
+++ b/mini-gmp/mini-gmp.h       Sat Nov 16 11:52:46 2019 +0100
@@ -53,7 +53,11 @@
                              void *(**) (void *, size_t, size_t),
                              void (**) (void *, size_t));

-typedef unsigned long mp_limb_t;
+#ifndef MINI_GMP_LIMB_TYPE
+#define MINI_GMP_LIMB_TYPE unsigned long
+#endif
+
+typedef MINI_GMP_LIMB_TYPE mp_limb_t;
 typedef long mp_size_t;
 typedef unsigned long mp_bitcnt_t;




Ĝis,
m

--
http://bodrato.it/papers/
_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to