Skip to content

Commit ba59ddb

Browse files
committed
patch 7.4.1190
Problem: On OSX the default flag for dlopen() is different. Solution: Add RTLD_LOCAL in the configure check. (sv99, closes #604)
1 parent 923e43b commit ba59ddb

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

src/auto/configure

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5991,7 +5991,9 @@ eof
59915991

59925992
fi
59935993

5994-
if ${vi_cv_dll_name_python+:} false; then :
5994+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
5995+
$as_echo_n "checking Python's dll name... " >&6; }
5996+
if ${vi_cv_dll_name_python+:} false; then :
59955997
$as_echo_n "(cached) " >&6
59965998
else
59975999

@@ -6002,7 +6004,8 @@ else
60026004
fi
60036005

60046006
fi
6005-
6007+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6008+
$as_echo "$vi_cv_dll_name_python" >&6; }
60066009

60076010
PYTHON_LIBS="${vi_cv_path_python_plibs}"
60086011
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
@@ -6320,7 +6323,9 @@ eof
63206323

63216324
fi
63226325

6323-
if ${vi_cv_dll_name_python3+:} false; then :
6326+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
6327+
$as_echo_n "checking Python3's dll name... " >&6; }
6328+
if ${vi_cv_dll_name_python3+:} false; then :
63246329
$as_echo_n "(cached) " >&6
63256330
else
63266331

@@ -6331,7 +6336,8 @@ else
63316336
fi
63326337

63336338
fi
6334-
6339+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
6340+
$as_echo "$vi_cv_dll_name_python3" >&6; }
63356341

63366342
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
63376343
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
@@ -6473,7 +6479,7 @@ else
64736479
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
64746480
{
64756481
int needed = 0;
6476-
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
6482+
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
64776483
if (pylib != 0)
64786484
{
64796485
void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
@@ -6539,7 +6545,7 @@ else
65396545
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
65406546
{
65416547
int needed = 0;
6542-
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
6548+
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
65436549
if (pylib != 0)
65446550
{
65456551
void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");

src/configure.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ eof
12191219
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
12201220
fi
12211221
])
1222-
AC_CACHE_VAL(vi_cv_dll_name_python,
1222+
AC_CACHE_CHECK(Python's dll name,vi_cv_dll_name_python,
12231223
[
12241224
if test "X$python_DLLLIBRARY" != "X"; then
12251225
vi_cv_dll_name_python="$python_DLLLIBRARY"
@@ -1428,7 +1428,7 @@ eof
14281428
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
14291429
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
14301430
])
1431-
AC_CACHE_VAL(vi_cv_dll_name_python3,
1431+
AC_CACHE_CHECK(Python3's dll name,vi_cv_dll_name_python3,
14321432
[
14331433
if test "X$python3_DLLLIBRARY" != "X"; then
14341434
vi_cv_dll_name_python3="$python3_DLLLIBRARY"
@@ -1540,7 +1540,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
15401540
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
15411541
{
15421542
int needed = 0;
1543-
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
1543+
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
15441544
if (pylib != 0)
15451545
{
15461546
void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
@@ -1586,7 +1586,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
15861586
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
15871587
{
15881588
int needed = 0;
1589-
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
1589+
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
15901590
if (pylib != 0)
15911591
{
15921592
void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ static char *(features[]) =
746746

747747
static int included_patches[] =
748748
{ /* Add new patch number below this line */
749+
/**/
750+
1190,
749751
/**/
750752
1189,
751753
/**/

0 commit comments

Comments
 (0)