Mail Archives: djgpp-workers/1999/05/05/17:34:04
Hi,
do you plan to support the realpath() function? Though it's not part
of POSIX, AFAIK, many Unix systems have it (e.g. Linux in
<unistd.h>, Solaris and Irix in <stdlib.h>).
I think it would be quite useful for DJGPP because of the problems
with drive letters. AFAICS, the _fixpath() function is functionally
mostly equivalent, but the underscore suggests that it's not meant
for use from normal programs!?
So, I think it should be easy to implement realpath() on top of
_fixpath(). The header of realpath() is
char *realpath(char *path, char resolved_path[]);
where path is the input path which is not modified, and
resolved_path is a buffer for the result, which is returned when
there is no error. Otherwise it returns a NULL pointer and places in
resolved_path the absolute pathname of the path component which
could not be resolved. The global variable errno is set to indicate
the error.
Frank
PS: I'm not subscribed, so please CC any answers. Thanks.
--
Frank Heckenbach, frank AT fjf DOT gnu DOT de
http://fjf.gnu.de/
PGP and GPG keys: http://fjf.gnu.de/plan
- Raw text -