| View previous topic :: View next topic |
| Author |
Message |
asphodeli
Joined: 29 Jun 2008 Posts: 20 Location: Singapore
|
Posted: Thu Mar 26, 2009 12:17 pm Post subject: [MinPSPW] realpath() not implemented? |
|
|
Hi,
Seems that realpath() has been implemented since rev 1121, but I am unable to use this, as compiling my program returns | Code: | | error: 'realpath' was not declared in this scope |
Include files:
| Code: | #include "stdio.h"
#include <unistd.h>
#include <limits.h>
#include <stdlib.h> |
Am I missing an include file somewhere? |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Mon Mar 30, 2009 9:46 pm Post subject: |
|
|
| what does this function do anyway |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Mon Mar 30, 2009 10:09 pm Post subject: |
|
|
Googled:
| Quote: |
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. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Mon Mar 30, 2009 10:11 pm Post subject: |
|
|
| ok so basically it means /home/hello/..//what and changes it to /home/what |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Mon Mar 30, 2009 10:50 pm Post subject: |
|
|
No, I think the absolute path name would be complete from ms0:/ _________________ If not actually, then potentially. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Mon Mar 30, 2009 11:45 pm Post subject: |
|
|
| oh ok so if i did that on computer it would take me to computer:// on ubuntu and C:/ on windows well thanks |
|
| Back to top |
|
 |
|