> On Nov 5, 2026, at 05:55, Peter Eisentraut <[email protected]> wrote:
> 
> On 04.11.26 03:46, Chao Li wrote:
>> 
> 
>> 4 - After applying the patch set, my local build still gets a couple of 
>> warnings:
> 
>> We can fix them by using unconstify:
>> ```
>> diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
>> index 6d37359fc96..177434ed975 100644
>> --- a/src/bin/psql/input.c
>> +++ b/src/bin/psql/input.c
>> @@ -303,7 +303,7 @@ encode_history(void)
>>                 char       *cur_ptr;
>>                 /* some platforms declare HIST_ENTRY.line as const char * */
>> -               for (cur_ptr = (char *) cur_hist->line; *cur_ptr; cur_ptr++)
>> +               for (cur_ptr = unconstify(char *, cur_hist->line); *cur_ptr; 
>> cur_ptr++)
>>                 {
>>                         if (*cur_ptr == '\n')
>>                                 *cur_ptr = NL_IN_HISTORY;
>> @@ -323,7 +323,7 @@ decode_history(void)
>>                 char       *cur_ptr;
>>                 /* some platforms declare HIST_ENTRY.line as const char * */
>> -               for (cur_ptr = (char *) cur_hist->line; *cur_ptr; cur_ptr++)
>> +               for (cur_ptr = unconstify(char *, cur_hist->line); *cur_ptr; 
>> cur_ptr++)
>>                 {
>>                         if (*cur_ptr == NL_IN_HISTORY)
>>                                 *cur_ptr = '\n';
>> ```
> 
> Ok, what platform and libreadline/libedit version is this?  (It's apparently 
> not covered on CI.)
> 

It's MacOS 26.6.2 on arm64, using Apple’s system libedit. otool -L reports 
current version 3.0.0 and compatibility version 2.0.0:
```
% otool -L src/bin/psql/psql
src/bin/psql/psql:
        /usr/local/pgsql/lib/libpq.5.dylib (compatibility version 5.0.0, 
current version 5.20.0)
        /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 
3.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1356.0.0)
```

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/






Reply via email to