Modernize const handling with readline

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Modernize const handling with readline
Date: 2023-10-03 10:23:12
Message-ID: 862fc1d4-9a0c-d2b6-5451-ee3dc750bcab@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.)

Attachment Content-Type Size
0001-Modernize-const-handling-with-readline.patch text/plain 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2023-10-03 10:24:17 Re: Skip collecting decoded changes of already-aborted transactions
Previous Message Amit Kapila 2023-10-03 10:09:35 Re: [PoC] pg_upgrade: allow to upgrade publisher node