forked from ariadne/pkgconf
parent
ba1f48e48e
commit
3afd14c49e
2
NEWS
2
NEWS
|
@ -10,6 +10,8 @@ Changes from 1.6.0 to 1.6.1:
|
|||
- Fixed a regression where having an empty PKG_CONFIG_LIBDIR
|
||||
environment variable would not eliminate the default search
|
||||
paths.
|
||||
- Use POSIX realpath(3) instead of readlink() for deduplicating the
|
||||
search path. Use _fullpath() on Windows for the same purpose.
|
||||
|
||||
Changes from 1.5.4 to 1.6.0:
|
||||
----------------------------
|
||||
|
|
|
@ -41,6 +41,10 @@ extern "C" {
|
|||
#define PKG_DIR_SEP_S '/'
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
|
||||
#endif
|
||||
|
||||
#define PKGCONF_BUFSIZE (65535)
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -92,14 +92,9 @@ pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter)
|
|||
return;
|
||||
if (S_ISLNK(st.st_mode))
|
||||
{
|
||||
char linkdest[PKGCONF_ITEM_SIZE];
|
||||
ssize_t len;
|
||||
char *linkdest = realpath(path, NULL);
|
||||
|
||||
memset(linkdest, '\0', sizeof linkdest);
|
||||
len = readlink(path, linkdest, sizeof linkdest);
|
||||
|
||||
if (len != -1 && (size_t)len < sizeof(linkdest) &&
|
||||
stat(linkdest, &st) == -1)
|
||||
if (linkdest != NULL && stat(linkdest, &st) == -1)
|
||||
return;
|
||||
}
|
||||
if (path_list_contains_entry(path, dirlist, &st))
|
||||
|
|
Loading…
Reference in New Issue