From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use C library functions instead of Abs() for int64
Date: Mon, 10 Oct 2022 07:07:08 +0000
Message-ID: <E1ohmsW-001iFm-8W@gemulon.postgresql.org> (raw)
Use C library functions instead of Abs() for int64
Instead of Abs() for int64, use the C standard functions labs() or
llabs() as appropriate. Define a small wrapper around them that
matches our definition of int64. (labs() is C90, llabs() is C99.)
Reviewed-by: Zhang Mingli <zmlpostgres@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/357cfefb09115292cfb98d504199e6df8201c957
Modified Files
--------------
contrib/btree_gist/btree_cash.c | 2 +-
contrib/btree_gist/btree_int8.c | 2 +-
src/backend/utils/adt/datetime.c | 8 ++++----
src/backend/utils/adt/dbsize.c | 2 +-
src/include/c.h | 9 +++++++++
5 files changed, 16 insertions(+), 7 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Use C library functions instead of Abs() for int64
In-Reply-To: <E1ohmsW-001iFm-8W@gemulon.postgresql.org>
References: <E1ohmsW-001iFm-8W@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox