Emit declarations if required.
authorMartin Baulig <martin@home-of-linux.org>
Wed, 2 Sep 1998 08:00:09 +0000 (08:00 +0000)
committerMartin Baulig <martin@src.gnome.org>
Wed, 2 Sep 1998 08:00:09 +0000 (08:00 +0000)
1998-09-02  Martin Baulig  <martin@home-of-linux.org>

* gnomesupport.awk (canonicalize_file_name, realpath): Emit
declarations if required.

* canonicalize.c (canonicalize_file_name, realpath): New file.
Imported from GLibC 2.0.7.

* libc-symbols.h: New file. Imported from GLibC 2.0.7.

svn path=/trunk/; revision=373

support/ChangeLog
support/gnomesupport.awk

index 599ee6a..dd10ccd 100644 (file)
@@ -1,3 +1,13 @@
+1998-09-02  Martin Baulig  <martin@home-of-linux.org>
+
+       * gnomesupport.awk (canonicalize_file_name, realpath): Emit
+       declarations if required.
+
+       * canonicalize.c (canonicalize_file_name, realpath): New file.
+       Imported from GLibC 2.0.7.
+
+       * libc-symbols.h: New file. Imported from GLibC 2.0.7.
+
 1998-08-24  Martin Baulig  <martin@home-of-linux.org>
 
        * gnomesupport.awk: Emit declarations for `setreuid', `setregid'
index b6f3162..cf17b47 100644 (file)
@@ -185,6 +185,27 @@ END {
     print "              char */*fmt*/, ...);";
   }
 
+  if (!def["HAVE_CANONICALIZE_FILE_NAME"] || !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 "   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 "";
   print "#ifdef __cplusplus";
   print "}";