Use `set_errno' instead of `__set_errno' and define `set_errno' here.
authorMartin Baulig <martin@home-of-linux.org>
Wed, 12 May 1999 20:20:24 +0000 (20:20 +0000)
committerMartin Baulig <martin@src.gnome.org>
Wed, 12 May 1999 20:20:24 +0000 (20:20 +0000)
1999-05-12  Martin Baulig  <martin@home-of-linux.org>

* canonicalize.c: Use `set_errno' instead of `__set_errno' and
define `set_errno' here.

svn path=/trunk/; revision=808

support/ChangeLog
support/canonicalize.c

index 15b0d48..b18c029 100644 (file)
@@ -1,3 +1,8 @@
+1999-05-12  Martin Baulig  <martin@home-of-linux.org>
+
+       * canonicalize.c: Use `set_errno' instead of `__set_errno' and
+       define `set_errno' here.
+
 1999-03-27  Raja R Harinath  <harinath@cs.umn.edu>
 
        * Makefile.am (supportexecincludedir): Rename from
index c624857..a04a0ec 100644 (file)
    that cannot be resolved.  If the path can be resolved, RESOLVED
    holds the same value as the value returned.  */
 
+#ifdef _LIBC
+#define set_errno(e) __set_errno(e)
+#else
+#define set_errno(e) errno = (e)
+#endif
+
 static char *
 canonicalize (const char *name, char *resolved)
 {
@@ -100,7 +106,7 @@ canonicalize (const char *name, char *resolved)
            {
              if (resolved)
                {
-                 __set_errno (ENAMETOOLONG);
+                 set_errno (ENAMETOOLONG);
                  goto error;
                }
              new_size = rpath_limit - rpath;
@@ -127,7 +133,7 @@ canonicalize (const char *name, char *resolved)
 
              if (++num_links > MAXSYMLINKS)
                {
-                 __set_errno (ELOOP);
+                 set_errno (ELOOP);
                  goto error;
                }
 
@@ -141,7 +147,7 @@ canonicalize (const char *name, char *resolved)
 
              if ((long int) (n + strlen (end)) >= path_max)
                {
-                 __set_errno (ENAMETOOLONG);
+                 set_errno (ENAMETOOLONG);
                  goto error;
                }
 
@@ -180,7 +186,7 @@ realpath (const char *name, char *resolved)
 {
   if (resolved == NULL)
     {
-      __set_errno (EINVAL);
+      set_errno (EINVAL);
       return NULL;
     }