[PATCH] math.h: Use reserved names for function parameters

Jonathan Wakely <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Similar to 4c49accf8997da21be19be0396b2a88f33b9f949 and
615cf4bdce0de86e57bdc27e008a35dd713e483f this avoids the use of
non-reserved names as function parameters. For this function the
parameter names do actually provide useful information, because
without the names it's not clear which parameter is the numerator and
which the denominator.  So rather than just remove the names, this
prefixes them with double-underscores.
newlib-math-patch.txt (text/plain, 831 B)
commit ed36860c6d98925f645c96e122e9e603b5963d17
Author: Jonathan Wakely <[email protected]>
Date:   Fri Jun 25 18:15:25 2021 +0100

    math.h: Use reserved names for function parameters

diff --git a/newlib/libc/include/inttypes.h b/newlib/libc/include/inttypes.h
index 570ed0481..417ff224c 100644
--- a/newlib/libc/include/inttypes.h
+++ b/newlib/libc/include/inttypes.h
@@ -321,7 +321,7 @@ extern "C" {
 #endif
 
 extern intmax_t  imaxabs(intmax_t);
-extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denomer);
+extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denomer);
 extern intmax_t  strtoimax(const char *__restrict, char **__restrict, int);
 extern intmax_t  _strtoimax_r(struct _reent *, const char *__restrict, char **__restrict, int);
 extern uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.