public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: newlib@sourceware.org
Subject: [PATCH] math.h: Use reserved names for function parameters
Date: Fri, 25 Jun 2021 18:19:58 +0100	[thread overview]
Message-ID: <YNYQPtzMBqJtiP3t@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

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.



[-- Attachment #2: newlib-math-patch.txt --]
[-- Type: text/plain, Size: 831 bytes --]

commit ed36860c6d98925f645c96e122e9e603b5963d17
Author: Jonathan Wakely <jwakely@redhat.com>
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);

             reply	other threads:[~2021-06-25 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 17:19 Jonathan Wakely [this message]
2021-06-25 20:49 ` Jeff Johnston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNYQPtzMBqJtiP3t@redhat.com \
    --to=jwakely@redhat.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).