diff options
author | Clint Adams <clint@users.sourceforge.net> | 2000-08-05 01:30:19 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2000-08-05 01:30:19 +0000 |
commit | 45ffc3b6c8e5cca800a0ed55bbf9b1bb1c362b00 (patch) | |
tree | c2d3a457cbe267ea4e9c5263ce0699570328e2f6 /Src | |
parent | 971f7c0a19eefebe90274fde29c33e3a3a04b552 (diff) | |
download | zsh-45ffc3b6c8e5cca800a0ed55bbf9b1bb1c362b00.tar.gz zsh-45ffc3b6c8e5cca800a0ed55bbf9b1bb1c362b00.tar.xz zsh-45ffc3b6c8e5cca800a0ed55bbf9b1bb1c362b00.zip |
12541: zrealpath wrapper around realpath()
Diffstat (limited to 'Src')
-rw-r--r-- | Src/compat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Src/compat.c b/Src/compat.c index 2f6628f33..27c9c740c 100644 --- a/Src/compat.c +++ b/Src/compat.c @@ -141,6 +141,19 @@ zpathmax(char *dir) } #endif +/**/ +mod_export char * +zrealpath(const char *path, char *resolved_path) +{ +#ifdef HAVE_REALPATH + return realpath(path, resolved_path); +#else /* the following block should be replaced with a realpath() equiv. */ + long pathmax; + + if ((pathmax = zpathmax(path)) > 0) + return strncpy(resolved_path, path, pathmax); +#endif +} /**/ mod_export char * |