From: Bruno Haible Date: Sat, 12 Jul 2025 11:54:00 +0000 (+0200) Subject: next-prime: Revert to original behaviour in GNU gettext. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea71051f3737fb5ad6d08b5c29211a70ceb50195;p=thirdparty%2Fgnulib.git next-prime: Revert to original behaviour in GNU gettext. Reported by Rocket Aaron at . * lib/next-prime.c (next_prime): In GNU gettext, don't skip small primes. --- diff --git a/ChangeLog b/ChangeLog index ebc4ef2a64..20229b3fd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-07-12 Bruno Haible + + next-prime: Revert to original behaviour in GNU gettext. + Reported by Rocket Aaron at + . + * lib/next-prime.c (next_prime): In GNU gettext, don't skip small + primes. + 2025-07-12 Bruno Haible obstack-printf: Fix memory overrun on glibc systems. diff --git a/lib/next-prime.c b/lib/next-prime.c index 52cebc48d1..58630db9b0 100644 --- a/lib/next-prime.c +++ b/lib/next-prime.c @@ -42,9 +42,11 @@ is_prime (size_t candidate) size_t _GL_ATTRIBUTE_CONST next_prime (size_t candidate) { +#if !defined IN_LIBGETTEXTLIB /* Skip small primes. */ if (candidate < 10) candidate = 10; +#endif /* Make it definitely odd. */ candidate |= 1;