diff --git a/sys/src/libmp/mkfile b/sys/src/libmp/mkfile index 886e3729f..3c12457bd 100644 --- a/sys/src/libmp/mkfile +++ b/sys/src/libmp/mkfile @@ -26,12 +26,12 @@ installall:V: for(objtype in $CPUS) mk $MKFLAGS install everything:V: - rm -f */*.[012456789kvx] + rm -f */*.[$OS] for(objtype in 386)@{ echo $objtype mk $MKFLAGS install } - rm -f */*.[012456789kvx] + rm -f */*.[$OS] test.$O: test.c /$objtype/include/u.h /sys/include/mp.h port/dat.h $CC -Iport test.c @@ -46,9 +46,9 @@ $O.bigtest: bigtest.$O /$objtype/lib/libmp.a $LD -o $O.bigtest bigtest.$O allout: + objtype=arm; mk; mk 5.test 5.bigtest + objtype=amd64; mk; mk 6.test 6.bigtest objtype=386; mk; mk 8.test 8.bigtest - objtype=power; mk; mk q.test q.bigtest - objtype=mips; mk; mk v.test v.bigtest cleanout: - rm -f [qv8].* *.[qv8] + rm -f [568].* *.[568] diff --git a/sys/src/libmp/port/mpmodop.c b/sys/src/libmp/port/mpmodop.c index 8bc7cbb5a..331f1cc76 100644 --- a/sys/src/libmp/port/mpmodop.c +++ b/sys/src/libmp/port/mpmodop.c @@ -1,5 +1,4 @@ -#include -#include +#include "os.h" #include /* operands need to have m->top+1 digits of space and satisfy 0 ≤ a ≤ m-1 */ diff --git a/sys/src/libmp/test.c b/sys/src/libmp/test.c index 5b81bf9f2..47033a5dd 100644 --- a/sys/src/libmp/test.c +++ b/sys/src/libmp/test.c @@ -5,26 +5,11 @@ int loops = 1; -long randomreg; - -void -srand(long seed) -{ - randomreg = seed; -} - -long -lrand(void) -{ - randomreg = randomreg*104381 + 81761; - return randomreg; -} - void prng(uchar *p, int n) { while(n-- > 0) - *p++ = lrand(); + *p++ = rand(); } void