[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
next-prime: Revert to original behaviour in GNU gettext
From: |
Bruno Haible |
Subject: |
next-prime: Revert to original behaviour in GNU gettext |
Date: |
Sat, 12 Jul 2025 14:11:25 +0200 |
When I created the module 'next-prime' two months ago, to unify code
from Gnulib and from GNU gettext, it had the side effect of changing
the size of small .mo files. This is undesired; therefore this patch
reverts to the original definition of next_prime within GNU gettext.
2025-07-12 Bruno Haible <bruno@clisp.org>
next-prime: Revert to original behaviour in GNU gettext.
Reported by Rocket Aaron <i@rocka.me> at
<https://savannah.gnu.org/bugs/?67305>.
* lib/next-prime.c (next_prime): In GNU gettext, don't skip small
primes.
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;
- next-prime: Revert to original behaviour in GNU gettext,
Bruno Haible <=