bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12741: any cross-compile fails due to new make-prime-list


From: Paul Eggert
Subject: bug#12741: any cross-compile fails due to new make-prime-list
Date: Fri, 26 Oct 2012 10:07:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

On 10/26/2012 08:37 AM, Jim Meyering wrote:
> I would like to generate that table with a portable awk script (maybe
> even Perl).  If someone can provide such a script, I would be happy
> to dump the C program.  That would solve the problem.

It'd be a pain to do it in portable awk, as it requires
arithmetic modulo (UINTMAX_MAX + 1), which Awk is not
likely to support directly.

Since there are only two or three plausible values of UINTMAX_MAX
these days, one possibility is to precompute primes.h for these
two or three values, and ship the precomputed primes.h in the
tarball, and to use the precomputed primes.h on hosts with typical
UINTMAX_MAX values.  People who are on a weird platform where
UINTMAX_MAX is an unusual value wouldn't be able to cross-compile,
but that's unlikely to ever happen and even if it does, we simply
add the unusual case to the precomputed primes.h.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]