aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Carmelo Amoroso <carmelo.amoroso@st.com>2010-09-16 12:22:34 +0200
committerGravatar Carmelo Amoroso <carmelo.amoroso@st.com>2010-09-16 12:22:34 +0200
commit26606098c2eb57d288b2e0edca471c71d0d7fa51 (patch)
tree8a1ba1d68fd10cbba7a12c70ca9618ac50a33854 /include
parenta9e2521be8c96d2b22339253a0a335e0063b66e5 (diff)
downloaduClibc-26606098c2eb57d288b2e0edca471c71d0d7fa51.tar.gz
uClibc-26606098c2eb57d288b2e0edca471c71d0d7fa51.tar.bz2
libc: Add canonicalize_file_name function
Add canonicalize_file_name function and its related tests. Required by elfutils and coreutils (readlink). Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 155b8f1ea..ce92ccd28 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -655,22 +655,21 @@ extern int system (__const char *__command) __wur;
__END_NAMESPACE_STD
-#if 0 /* def __USE_GNU */
+#ifdef __USE_GNU
/* Return a malloc'd string containing the canonical absolute name of the
existing named file. */
extern char *canonicalize_file_name (__const char *__name)
__THROW __nonnull ((1)) __wur;
#endif
-/* Return the canonical absolute name of file NAME. If RESOLVED is
- null, the result is malloc'd; otherwise, if the canonical name is
- PATH_MAX chars or more, returns null with `errno' set to
- ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
- returns the name in RESOLVED. */
+/* Return the canonical absolute name of file NAME. If the
+ canonical name is PATH_MAX chars or more, returns null
+ with `errno' set to ENAMETOOLONG; if the name fits in
+ fewer than PATH_MAX chars, returns the name in RESOLVED. */
/* we choose to handle __resolved==NULL as crash :) */
extern char *realpath (__const char *__restrict __name,
char *__restrict __resolved) __THROW __wur;
-
+libc_hidden_proto(realpath)
/* Shorthand for type of comparison functions. */
#ifndef __COMPAR_FN_T