| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Use C library functions instead of Abs() for int64 |
| Date: | 2022-10-10 07:07:08 |
| Message-ID: | E1ohmsW-001iFm-8W@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Naylor | 2022-10-10 08:15:00 | pgsql: Remove unnecessary semicolons after goto labels |
| Previous Message | Peter Eisentraut | 2022-10-10 06:23:23 | pgsql: Update list of acknowledgments in release notes |