The fallback replacement of realpath(3) (from
8e918ccc) uses readlink(3)
under the assumption that we’re only interested about symlinks, but
that’s no longer the case: we’re using it for normalization purposes as
well. Let’s just remove it. If it turns out that there still are
non-Windows systems that don’t have realpath(3) and that we care about
we’ll figure out something else.
resolved = buffer;
}
#else
- // Yes, there are such systems. This replacement relies on the fact that when
- // we call x_realpath we only care about symlinks.
- {
- ssize_t len = readlink(path.c_str(), buffer, buffer_size - 1);
- if (len != -1) {
- buffer[len] = 0;
- resolved = buffer;
- }
- }
+# error No realpath function available
#endif
return resolved ? resolved : (return_empty_on_error ? "" : path);