]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gcd: Improve comments regarding GCD_WORD_T.
authorBruno Haible <bruno@clisp.org>
Mon, 23 Jun 2025 02:16:16 +0000 (04:16 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 23 Jun 2025 02:16:16 +0000 (04:16 +0200)
Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00243.html>.

* lib/gcd.h (GCD_WORD_T): Improve comments.

ChangeLog
lib/gcd.h

index 7b5ded386ad563b3e570fe5f7ccccccdd6a3c0b9..10e7f399c6b8683e7995cbe99dbb0503f2301fa8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2025-06-22  Bruno Haible  <bruno@clisp.org>
 
+       gcd: Improve comments regarding GCD_WORD_T.
+       Reported by Paul Eggert in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00243.html>.
+       * lib/gcd.h (GCD_WORD_T): Improve comments.
+
        gcd: Allow customizing the parameter and result type.
        * lib/gcd.h (GCD_WORD_T): New type.
        (gcd): Use GCD_WORD_T instead of 'unsigned long'.
index 24b8ad54bf94378f8a671c75388caff900dfd410..ee05b39d2128c91fdd8d95afc702e40ee35f8efd 100644 (file)
--- a/lib/gcd.h
+++ b/lib/gcd.h
 
 /* Before including this file, you may define:
      GCD_WORD_T         The parameter type and result type of the gcd function.
+                        It should be an unsigned integer type that is either
+                        a built-in type or defined in <stdef.h> or <stdint.h>.
+
+   The definition of GCD_WORD_T needs to be the same across the entire
+   application.  Therefore it is best placed in <config.h>.
  */
 
 #ifdef GCD_WORD_T