summaryrefslogtreecommitdiff
path: root/libbb/xreadlink.c
diff options
context:
space:
mode:
authorJérémie Koenig2010-03-26 19:08:53 +0100
committerDenys Vlasenko2010-03-26 19:08:53 +0100
commitfbedacfc8caa1ec8f14e664a881cb0a93c8f8712 (patch)
tree6c08780bbaad6320149930bdbcfbee5a2eed9f5d /libbb/xreadlink.c
parent35fdb1bc9cb82fa5630c2d40ae49110ecd7c88ea (diff)
downloadbusybox-fbedacfc8caa1ec8f14e664a881cb0a93c8f8712.zip
busybox-fbedacfc8caa1ec8f14e664a881cb0a93c8f8712.tar.gz
Hurd compat fixes. Mostly dealing with absent PATH_MAX
Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/xreadlink.c')
-rw-r--r--libbb/xreadlink.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c
index 8d232f1..faa0e16 100644
--- a/libbb/xreadlink.c
+++ b/libbb/xreadlink.c
@@ -100,18 +100,16 @@ char* FAST_FUNC xmalloc_readlink_or_warn(const char *path)
return buf;
}
-/* UNUSED */
-#if 0
char* FAST_FUNC xmalloc_realpath(const char *path)
{
#if defined(__GLIBC__) && !defined(__UCLIBC__)
/* glibc provides a non-standard extension */
+ /* new: POSIX.1-2008 specifies this behavior as well */
return realpath(path, NULL);
#else
char buf[PATH_MAX+1];
- /* on error returns NULL (xstrdup(NULL) ==NULL) */
+ /* on error returns NULL (xstrdup(NULL) == NULL) */
return xstrdup(realpath(path, buf));
#endif
}
-#endif