From 42e30cf3dd4973d261db1d387f4c03ff687d66a8 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Thu, 3 Sep 1998 00:30:04 +0000 Subject: [PATCH] Remove `weak_alias'. (canonicalize_file_name): Comment out. * canonicalize.c (realpath): Remove `weak_alias'. (canonicalize_file_name): Comment out. * gnomesupport.awk: Remove `canonicalize_file_name', and correct the comment for `realpath'. svn path=/trunk/; revision=376 --- support/ChangeLog | 8 ++++++++ support/canonicalize.c | 15 +++++++++++++-- support/gnomesupport.awk | 20 +++++++------------- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/support/ChangeLog b/support/ChangeLog index dd10ccd..5517674 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,11 @@ +1998-09-02 Raja R Harinath + + * canonicalize.c (realpath): Remove `weak_alias'. + (canonicalize_file_name): Comment out. + + * gnomesupport.awk: Remove `canonicalize_file_name', and correct + the comment for `realpath'. + 1998-09-02 Martin Baulig * gnomesupport.awk (canonicalize_file_name, realpath): Emit diff --git a/support/canonicalize.c b/support/canonicalize.c index 008c369..80cd7cf 100644 --- a/support/canonicalize.c +++ b/support/canonicalize.c @@ -26,7 +26,6 @@ #include #include -#include #include /* Return the canonical absolute name of file NAME. A canonical name @@ -175,11 +174,23 @@ error: free (rpath); return NULL; } -weak_alias (canonicalize, realpath) +char * +realpath (const char *name, char *resolved) +{ + if (resolved == NULL) + { + __set_errno (EINVAL); + return NULL; + } + + return canonicalize (name, resolved); +} +#if 0 char * canonicalize_file_name (const char *name) { return canonicalize (name, NULL); } +#endif diff --git a/support/gnomesupport.awk b/support/gnomesupport.awk index cf17b47..e529be5 100644 --- a/support/gnomesupport.awk +++ b/support/gnomesupport.awk @@ -185,25 +185,19 @@ END { print " char */*fmt*/, ...);"; } - if (!def["HAVE_CANONICALIZE_FILE_NAME"] || !def["HAVE_REALPATH"]) { + if (!def["HAVE_REALPATH"]) { print ""; print "/* Return the canonical absolute name of file NAME. A canonical name"; print " does not contain any `.', `..' components nor any repeated path"; - print " separators ('/') or symlinks. All path components must exist. If"; - print " RESOLVED is null, the result is malloc'd; otherwise, if the"; - print " canonical name is PATH_MAX chars or more, returns null with `errno'"; - print " set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,"; - print " returns the name in RESOLVED. If the name cannot be resolved and"; - print " RESOLVED is non-NULL, it contains the path of the first component"; + print " separators ('/') or symlinks. All path components must exist."; + print " If the canonical name is PATH_MAX chars or more, returns null with"; + print " `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX"; + print " chars, returns the name in RESOLVED. If the name cannot be resolved"; + print " and RESOLVED is non-NULL, it contains the path of the first component"; print " that cannot be resolved. If the path can be resolved, RESOLVED"; print " holds the same value as the value returned. */"; print ""; - if (!def["HAVE_CANONICALIZE_FILE_NAME"]) { - print "char *canonicalize_file_name (const char */*name*/);"; - } - if (!def["HAVE_REALPATH"]) { - print "char *realpath (char */*path*/, char /*resolved_path*/[]);"; - } + print "char *realpath (char */*path*/, char /*resolved_path*/[]);"; } print ""; -- 2.7.4