1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

; Support SQLite3 extensions on macOS

* src/sqlite.c (Fsqlite_load_extension): Support *.dylib
extensions.  (Bug#63653)
This commit is contained in:
Eli Zaretskii 2023-05-23 17:53:07 +03:00
parent 5aadb87d6f
commit 765edc204d

View File

@ -730,10 +730,12 @@ Only modules on Emacs' list of allowed modules can be loaded. */)
bool do_allow = false;
for (const char **allow = allowlist; *allow; allow++)
{
if (strlen (*allow) < strlen (name)
&& !strncmp (*allow, name, strlen (*allow))
&& (!strcmp (name + strlen (*allow), ".so")
|| !strcasecmp (name + strlen (*allow), ".dll")))
ptrdiff_t allow_len = strlen (*allow);
if (allow_len < strlen (name)
&& !strncmp (*allow, name, allow_len)
&& (!strcmp (name + allow_len, ".so")
||!strcmp (name + allow_len, ".dylib")
|| !strcasecmp (name + allow_len, ".dll")))
{
do_allow = true;
break;