pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Modernize const handling with readline
Date: Thu, 05 Oct 2023 06:57:25 +0000
Message-ID: <E1qoIIW-0007Ml-6a@gemulon.postgresql.org> (raw)

Modernize const handling with readline

The comment

    /* On some platforms, readline is declared as readline(char *) */

is obsolete.  The casting away of const can be removed.

The const in the readline() prototype was added in GNU readline 4.2,
released in 2001.  BSD libedit has also had const in the prototype
since at least 2001.

(The commit that introduced this comment (187e865174) talked about
FreeBSD 4.8, which didn't have readline compatibility in libedit yet,
so it must have been talking about GNU readline in the base system.
This checks out, but already FreeBSD 5 had an updated GNU readline
with const.)

Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/862fc1d4-9a0c-d2b6-5451-ee3dc750bcab%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8666cf65ea6926b6d8c781ae03891435131911cd

Modified Files
--------------
src/bin/psql/input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



Message-ID: <E1qoIIW-0007Ml-6a@gemulon.postgresql.org>
Permalink:  ../E1qoIIW-0007Ml-6a@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qoIIW-0007Ml-6a@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Modernize const handling with readline
  In-Reply-To: <E1qoIIW-0007Ml-6a@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