From: Bruno Haible Date: Mon, 23 Jun 2025 02:16:16 +0000 (+0200) Subject: gcd: Improve comments regarding GCD_WORD_T. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bebd43ffa529f940adf27db19f99d155751d2dce;p=thirdparty%2Fgnulib.git gcd: Improve comments regarding GCD_WORD_T. Reported by Paul Eggert in . * lib/gcd.h (GCD_WORD_T): Improve comments. --- diff --git a/ChangeLog b/ChangeLog index 7b5ded386a..10e7f399c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2025-06-22 Bruno Haible + gcd: Improve comments regarding GCD_WORD_T. + Reported by Paul Eggert in + . + * 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'. diff --git a/lib/gcd.h b/lib/gcd.h index 24b8ad54bf..ee05b39d21 100644 --- a/lib/gcd.h +++ b/lib/gcd.h @@ -20,6 +20,11 @@ /* 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 or . + + The definition of GCD_WORD_T needs to be the same across the entire + application. Therefore it is best placed in . */ #ifdef GCD_WORD_T