From fbedacfc8caa1ec8f14e664a881cb0a93c8f8712 Mon Sep 17 00:00:00 2001 From: Jérémie Koenig Date: Fri, 26 Mar 2010 19:08:53 +0100 Subject: Hurd compat fixes. Mostly dealing with absent PATH_MAX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Koenig Signed-off-by: Denys Vlasenko --- libbb/xreadlink.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libbb/xreadlink.c') diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c index 8d232f16b..faa0e1646 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 -- cgit v1.2.3