diff options
author | Mystery Man <unknown@mandriva.org> | 2003-03-15 15:26:37 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-03-15 15:26:37 +0000 |
commit | 6f745bb1829160c3da8034b00ea4725faf7f4340 (patch) | |
tree | a6222c0684337a5283590c2b74bb538261086d18 /mdk-stage1/dietlibc/libshell/realpath.c | |
parent | bad9352db6617835f12292f262952def1207dcb1 (diff) | |
download | drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar.gz drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar.bz2 drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar.xz drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.zip |
This commit was manufactured by cvs2svn to create tag 'V9_1_25mdk'.V9_1_25mdk
Diffstat (limited to 'mdk-stage1/dietlibc/libshell/realpath.c')
-rw-r--r-- | mdk-stage1/dietlibc/libshell/realpath.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/mdk-stage1/dietlibc/libshell/realpath.c b/mdk-stage1/dietlibc/libshell/realpath.c deleted file mode 100644 index 1377018e5..000000000 --- a/mdk-stage1/dietlibc/libshell/realpath.c +++ /dev/null @@ -1,31 +0,0 @@ -#include <limits.h> -#include <stdlib.h> -#include <errno.h> -#include <fcntl.h> -#include <string.h> -#include "dietfeatures.h" - -char *realpath(const char *path, char *resolved_path) { - int fd=open(".",O_RDONLY); - char *tmp=""; - if (chdir(path)) { -#ifdef WANT_THREAD_SAFE - if (*__errno_location()==ENOTDIR) -#else - if (errno==ENOTDIR) -#endif - { - if ((tmp=strrchr(path,'/'))) { - memmove(resolved_path,path,tmp-path); - resolved_path[tmp-path]=0; - if (chdir(resolved_path)) { resolved_path=0; goto abort; } - } - } - } - if (!getcwd(resolved_path,PATH_MAX)) { resolved_path=0; goto abort; } - strcat(resolved_path,tmp); -abort: - fchdir(fd); - close(fd); - return resolved_path; -} |