# HG changeset patch # User Tassilo Philipp # Date 1573661743 -3600 # Node ID 85c80b0c021cb7feb87a6852e1a3eff3904f3d7a # Parent 993550558ac5e7a383b0436631f0f64bab7fdbfc - Darwin/macos fix for dlGetLibraryPath() to correctly fail on bogus handles - Changelog updated - readme tweak diff -r 993550558ac5 -r 85c80b0c021c ChangeLog --- a/ChangeLog Wed Nov 13 16:13:07 2019 +0100 +++ b/ChangeLog Wed Nov 13 17:15:43 2019 +0100 @@ -9,7 +9,10 @@ o added UTF-8 support for pathnames on windows o reliability/stability fix for dlGetLibraryPath() on glibc based platforms (avoiding internal use of glibc's bad impl of dlinfo() which doesn't do any error checking at all) + o Darwin/macos fix for dlGetLibraryPath() to correctly fail on bogus handles (did return + paths to random libraries under some circumstances, instead of returning an error) o support for dlGetLibraryPath() on glibc platforms with glibc vesions <= 2.3.3 + o dlGetLibraryPath() now accepts NULL as argument to return path to executable doc: o more detail in support matrix for bi-endian platforms tests: diff -r 993550558ac5 -r 85c80b0c021c README --- a/README Wed Nov 13 16:13:07 2019 +0100 +++ b/README Wed Nov 13 17:15:43 2019 +0100 @@ -115,6 +115,6 @@ $ make docs -Please refer to http://www.dyncall.org, dyncall(3), dyncallback(3), the dyncall -manual and platform-specific READMEs under doc/ for more information. +Please refer to http://www.dyncall.org, dyncall(3), dyncallback(3), dynload(3), +the dyncall manual and platform-specific READMEs under doc/ for more information. diff -r 993550558ac5 -r 85c80b0c021c dynload/dynload_unix.c --- a/dynload/dynload_unix.c Wed Nov 13 16:13:07 2019 +0100 +++ b/dynload/dynload_unix.c Wed Nov 13 17:15:43 2019 +0100 @@ -145,7 +145,7 @@ /* compare handle pointers' high bits (in low 2 bits some flags might */ /* be stored - should be safe b/c address needs alignment, anyways) */ - if(((intptr_t)pLib ^ (intptr_t)lib) < 4) { + if(((uintptr_t)pLib ^ (uintptr_t)lib) < 4) { l = dl_strlen_strcpy(sOut, libPath, bufSize); break; }