How to find how where a link is pointing

I understand how to open a file and check to see if it is a soft link or a
regular file.
But I would like to know the filename of the file that the link points to.
How can
I get that programatically? I don’t see anything like that in the stat
structure.

Jerry Kirk

I think you can do this with readlink()

Previously, Jerry Kirk wrote in qdn.public.qnxrtp.os:

I understand how to open a file and check to see if it is a soft link or a
regular file.
But I would like to know the filename of the file that the link points to.
How can
I get that programatically? I don’t see anything like that in the stat
structure.

Jerry Kirk
\