diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-05-16 06:14:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-05-16 06:14:36 +0000 |
commit | f7501ae6f14a1b27a4f98bdaf4f2aad929cf68b7 (patch) | |
tree | 7795c494c2ccc1028fe51d074b33dd2afab0efd4 /stdlib/canonicalize.c | |
parent | 4e960bbf4ef07f7ef2d9888ddd7419dc4c8cfbf9 (diff) | |
download | glibc-f7501ae6f14a1b27a4f98bdaf4f2aad929cf68b7.zip glibc-f7501ae6f14a1b27a4f98bdaf4f2aad929cf68b7.tar.gz glibc-f7501ae6f14a1b27a4f98bdaf4f2aad929cf68b7.tar.bz2 |
Update.
* stdlib/canonicalize.c (canonicalize): Rename to __realpath and
don't define static. Remove old __realpath function. TC1 of
POSIX 2001 will allow the second parameter to be NULL.
* stdlib/test-canon.c: Comment out test for NULL as second
parameter of realpath.
* time/offtime.c (__offtime): Set errno if overflow is detected.
Diffstat (limited to 'stdlib/canonicalize.c')
-rw-r--r-- | stdlib/canonicalize.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c index 2098d77..c859288 100644 --- a/stdlib/canonicalize.c +++ b/stdlib/canonicalize.c @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file. - Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,8 +37,8 @@ that cannot be resolved. If the path can be resolved, RESOLVED holds the same value as the value returned. */ -static char * -canonicalize (const char *name, char *resolved) +char * +__realpath (const char *name, char *resolved) { char *rpath, *dest, *extra_buf = NULL; const char *start, *end, *rpath_limit; @@ -204,25 +204,12 @@ error: free (rpath); return NULL; } - - -char * -__realpath (const char *name, char *resolved) -{ - if (resolved == NULL) - { - __set_errno (EINVAL); - return NULL; - } - - return canonicalize (name, resolved); -} weak_alias (__realpath, realpath) char * __canonicalize_file_name (const char *name) { - return canonicalize (name, NULL); + return __realpath (name, NULL); } weak_alias (__canonicalize_file_name, canonicalize_file_name) |