Re: Remove support for old realpath() API - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove support for old realpath() API
Date
Msg-id 491004.1723473348@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove support for old realpath() API  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Remove support for old realpath() API
List pgsql-hackers
I wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
>> Tom had tested this on and found that it does actually work on AIX 7.1 
>> and 7.3 but the documentation is wrong.

> I too have a distinct recollection of having tested this (using the
> gcc compile farm machines), but I cannot find anything saying so in
> the mailing list archives.  I can go check it again, I guess.

I can confirm that the attached program works on cfarm111 (AIX 7.1)
and cfarm119 (AIX 7.3), though "man realpath" denies it on both
systems.

I also found leftover test files demonstrating that I checked this
same point on Apr 26 2024, so I'm not sure why that didn't turn up
in a mail list search.

            regards, tom lane

#include <stdio.h>
#include <stdlib.h>

int
main(int argc, char **argv)
{
    char *pth = realpath(argv[1], NULL);

    if (pth)
    {
        printf("successfully resolved \"%s\" as \"%s\"\n",
               argv[1], pth);
        free(pth);
    }
    else
        perror("realpath");
    return 0;
}

pgsql-hackers by date:

Previous
From: Yogesh Sharma
Date:
Subject: Injection Points remaining stats
Next
From: Sami Imseih
Date:
Subject: Re: Restart pg_usleep when interrupted