From: Martin Baulig Date: Wed, 12 May 1999 20:20:24 +0000 (+0000) Subject: Use `set_errno' instead of `__set_errno' and define `set_errno' here. X-Git-Tag: GNOME_COMMON_1_2_1~142 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=531ee24d48ce1e0cb23791b5b1da63a8f09814d6;p=platform%2Fupstream%2Fgnome-common.git Use `set_errno' instead of `__set_errno' and define `set_errno' here. 1999-05-12 Martin Baulig * canonicalize.c: Use `set_errno' instead of `__set_errno' and define `set_errno' here. svn path=/trunk/; revision=808 --- diff --git a/support/ChangeLog b/support/ChangeLog index 15b0d48..b18c029 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,8 @@ +1999-05-12 Martin Baulig + + * canonicalize.c: Use `set_errno' instead of `__set_errno' and + define `set_errno' here. + 1999-03-27 Raja R Harinath * Makefile.am (supportexecincludedir): Rename from diff --git a/support/canonicalize.c b/support/canonicalize.c index c624857..a04a0ec 100644 --- a/support/canonicalize.c +++ b/support/canonicalize.c @@ -39,6 +39,12 @@ 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; }