[MinPSPW] realpath() not implemented?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
asphodeli
Posts: 20
Joined: Sun Jun 29, 2008 2:44 pm
Location: Singapore

[MinPSPW] realpath() not implemented?

Post by asphodeli »

Hi,

Seems that realpath() has been implemented since rev 1121, but I am unable to use this, as compiling my program returns

Code: Select all

error: 'realpath' was not declared in this scope
Include files:

Code: Select all

#include "stdio.h"
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
Am I missing an include file somewhere?
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

what does this function do anyway
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Googled:
realpath() expands all symbolic links and resolves references to ’/./’, ’/../’ and extra ’/’ characters in the null terminated string named by path and stores the canonicalized absolute pathname in the buffer of size PATH_MAX named by resolved_path. The resulting path will have no symbolic link, ’/./’ or ’/../’ components.
If not actually, then potentially.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

ok so basically it means /home/hello/..//what and changes it to /home/what
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

No, I think the absolute path name would be complete from ms0:/
If not actually, then potentially.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

oh ok so if i did that on computer it would take me to computer:// on ubuntu and C:/ on windows well thanks
Post Reply