Skip to content

Commit

Permalink
patch 7.4.1190
Browse files Browse the repository at this point in the history
Problem:    On OSX the default flag for dlopen() is different.
Solution:   Add RTLD_LOCAL in the configure check. (sv99, closes #604)
  • Loading branch information
brammool committed Jan 28, 2016
1 parent 923e43b commit ba59ddb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
18 changes: 12 additions & 6 deletions src/auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -5991,7 +5991,9 @@ eof

fi

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

Expand All @@ -6002,7 +6004,8 @@ else
fi

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
$as_echo "$vi_cv_dll_name_python" >&6; }

PYTHON_LIBS="${vi_cv_path_python_plibs}"
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Expand Down Expand Up @@ -6320,7 +6323,9 @@ eof

fi

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

Expand All @@ -6331,7 +6336,8 @@ else
fi

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
$as_echo "$vi_cv_dll_name_python3" >&6; }

PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
Expand Down Expand Up @@ -6473,7 +6479,7 @@ else
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
if (pylib != 0)
{
void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Expand Down Expand Up @@ -6539,7 +6545,7 @@ else
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
if (pylib != 0)
{
void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
Expand Down
8 changes: 4 additions & 4 deletions src/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ eof
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
fi
])
AC_CACHE_VAL(vi_cv_dll_name_python,
AC_CACHE_CHECK(Python's dll name,vi_cv_dll_name_python,
[
if test "X$python_DLLLIBRARY" != "X"; then
vi_cv_dll_name_python="$python_DLLLIBRARY"
Expand Down Expand Up @@ -1428,7 +1428,7 @@ eof
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
])
AC_CACHE_VAL(vi_cv_dll_name_python3,
AC_CACHE_CHECK(Python3's dll name,vi_cv_dll_name_python3,
[
if test "X$python3_DLLLIBRARY" != "X"; then
vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Expand Down Expand Up @@ -1540,7 +1540,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
if (pylib != 0)
{
void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Expand Down Expand Up @@ -1586,7 +1586,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
{
int needed = 0;
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
if (pylib != 0)
{
void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1190,
/**/
1189,
/**/
Expand Down

0 comments on commit ba59ddb

Please sign in to comment.