summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@src.gnome.org>1998-09-03 00:30:04 +0000
committerRaja R Harinath <harinath@src.gnome.org>1998-09-03 00:30:04 +0000
commit42e30cf3dd4973d261db1d387f4c03ff687d66a8 (patch)
tree376086217b4a8b4e6e86c88551169182d69bdefa
parenta67717c33a8c860e0b68376c155e2d96bff87580 (diff)
downloadgnome-common-42e30cf3dd4973d261db1d387f4c03ff687d66a8.tar.gz
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
-rw-r--r--support/ChangeLog8
-rw-r--r--support/canonicalize.c15
-rw-r--r--support/gnomesupport.awk20
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 <harinath@cs.umn.edu>
+
+ * 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 <martin@home-of-linux.org>
* 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 <sys/stat.h>
#include <errno.h>
-#include <libc-symbols.h>
#include <argp-namefrob.h>
/* 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 "";