#include <errno.h>
#include <stddef.h>
+#include "areadlink.h"
#include "file-set.h"
#include "filenamecat.h"
#include "hash-triple.h"
+#include "pathmax.h"
#include "xalloc.h"
#include "xgetcwd.h"
-#ifndef __set_errno
-# define __set_errno(Val) errno = (Val)
-#endif
-
-#include "pathmax.h"
-#include "areadlink.h"
-
#if !(HAVE_CANONICALIZE_FILE_NAME || GNULIB_CANONICALIZE_LGPL)
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any `.', `..' components nor any repeated file name
if (name == NULL)
{
- __set_errno (EINVAL);
+ errno = EINVAL;
return NULL;
}
if (name[0] == '\0')
{
- __set_errno (ENOENT);
+ errno = ENOENT;
return NULL;
}
if (name == NULL)
{
- __set_errno (EINVAL);
+ errno = EINVAL;
return NULL;
}
if (name[0] == '\0')
{
- __set_errno (ENOENT);
+ errno = ENOENT;
return NULL;
}
the same symlink,NAME pair twice does indicate a loop. */
if (seen_triple (&ht, name, &st))
{
- __set_errno (ELOOP);
if (can_mode == CAN_MISSING)
continue;
- else
- goto error;
+ errno = ELOOP;
+ goto error;
}
buf = areadlink_with_size (rname, st.st_size);
{
if (can_mode == CAN_MISSING && errno != ENOMEM)
continue;
- else
- goto error;
+ goto error;
}
n = strlen (buf);