Skip to content

Instantly share code, notes, and snippets.

@splhack
Created October 16, 2015 07:08
Show Gist options
  • Select an option

  • Save splhack/10dab30444c1c7e5ef73 to your computer and use it in GitHub Desktop.

Select an option

Save splhack/10dab30444c1c7e5ef73 to your computer and use it in GitHub Desktop.
diff --git a/src/if_lua.c b/src/if_lua.c
index 167e865..df032b5 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -402,7 +402,8 @@ lua_link_init(char *libname, int verbose)
int
lua_enabled(int verbose)
{
- return lua_link_init(DYNAMIC_LUA_DLL, verbose) == OK;
+ char *dll = *p_luadll ? (char *)p_luadll : DYNAMIC_LUA_DLL;
+ return lua_link_init(dll, verbose) == OK;
}
#endif /* DYNAMIC_LUA */
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 287ab1a..0b547cd 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -635,8 +635,9 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose)
int
mzscheme_enabled(int verbose)
{
- return mzscheme_runtime_link_init(
- DYNAMIC_MZSCH_DLL, DYNAMIC_MZGC_DLL, verbose) == OK;
+ char *schdll = *p_mzschdll ? (char *)p_mzschdll : DYNAMIC_MZSCH_DLL;
+ char *gcdll = *p_mzgcdll ? (char *)p_mzgcdll : DYNAMIC_MZGC_DLL;
+ return mzscheme_runtime_link_init(schdll, gcdll, verbose) == OK;
}
static void
diff --git a/src/if_perl.xs b/src/if_perl.xs
index 685c0ba..6836c6f 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -611,7 +611,8 @@ perl_runtime_link_init(char *libname, int verbose)
perl_enabled(verbose)
int verbose;
{
- return perl_runtime_link_init(DYNAMIC_PERL_DLL, verbose) == OK;
+ char *dll = *p_perldll ? (char *)p_perldll : DYNAMIC_PERL_DLL;
+ return perl_runtime_link_init(dll, verbose) == OK;
}
#endif /* DYNAMIC_PERL */
diff --git a/src/if_python.c b/src/if_python.c
index 2ef0dfc..e5062aa 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -732,7 +732,8 @@ python_runtime_link_init(char *libname, int verbose)
int
python_enabled(int verbose)
{
- return python_runtime_link_init(DYNAMIC_PYTHON_DLL, verbose) == OK;
+ char *dll = *p_pydll ? (char *)p_pydll : DYNAMIC_PYTHON_DLL;
+ return python_runtime_link_init(dll, verbose) == OK;
}
/*
diff --git a/src/if_python3.c b/src/if_python3.c
index a6a655f..6afc223 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -686,7 +686,8 @@ py3_runtime_link_init(char *libname, int verbose)
int
python3_enabled(int verbose)
{
- return py3_runtime_link_init(DYNAMIC_PYTHON3_DLL, verbose) == OK;
+ char *dll = *p_py3dll ? (char *)p_py3dll : DYNAMIC_PYTHON3_DLL;
+ return py3_runtime_link_init(dll, verbose) == OK;
}
/* Load the standard Python exceptions - don't import the symbols from the
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 3767bf3..078d651 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -639,7 +639,8 @@ ruby_runtime_link_init(char *libname, int verbose)
ruby_enabled(verbose)
int verbose;
{
- return ruby_runtime_link_init(DYNAMIC_RUBY_DLL, verbose) == OK;
+ char *dll = *p_rubydll ? (char *)p_rubydll : DYNAMIC_RUBY_DLL;
+ return ruby_runtime_link_init(dll, verbose) == OK;
}
#endif /* defined(DYNAMIC_RUBY) || defined(PROTO) */
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 1f37e12..e886918 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -245,8 +245,9 @@ static int stubs_initialized = FALSE;
tcl_enabled(verbose)
int verbose;
{
+ char *dll = *p_tcldll ? (char *)p_tcldll : DYNAMIC_TCL_DLL;
if (!stubs_initialized && find_executable_arg != NULL
- && tcl_runtime_link_init(DYNAMIC_TCL_DLL, verbose) == OK)
+ && tcl_runtime_link_init(dll, verbose) == OK)
{
Tcl_Interp *interp;
diff --git a/src/option.c b/src/option.c
index d1bce6a..68a4004 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1779,6 +1779,11 @@ static struct vimoption
{"loadplugins", "lpl", P_BOOL|P_VI_DEF,
(char_u *)&p_lpl, PV_NONE,
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+#ifdef DYNAMIC_LUA
+ {"luadll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_luadll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
#ifdef FEAT_GUI_MAC
{"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
(char_u *)&p_macatsui, PV_NONE,
@@ -1933,6 +1938,14 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)100L, (char_u *)100L} SCRIPTID_INIT},
+#ifdef DYNAMIC_MZSCHEME
+ {"mzschdll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_mzschdll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"mzgcdll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_mzgcdll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
{"novice", NULL, P_BOOL|P_VI_DEF,
(char_u *)NULL, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
@@ -2014,6 +2027,11 @@ static struct vimoption
# endif
#endif
(char_u *)0L} SCRIPTID_INIT},
+#ifdef DYNAMIC_PERL
+ {"perldll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_perldll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
{"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
(char_u *)&p_pi, PV_PI,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
@@ -2128,6 +2146,16 @@ static struct vimoption
{(char_u *)NULL, (char_u *)0L}
#endif
SCRIPTID_INIT},
+#ifdef DYNAMIC_PYTHON
+ {"pythondll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_pydll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
+#ifdef DYNAMIC_PYTHON3
+ {"python3dll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_py3dll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
{"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
(char_u *)&p_ro, PV_RO,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
@@ -2192,6 +2220,11 @@ static struct vimoption
{(char_u *)NULL, (char_u *)0L}
#endif
SCRIPTID_INIT},
+#ifdef DYNAMIC_RUBY
+ {"rubydll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_rubydll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
{"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
#ifdef FEAT_CMDL_INFO
(char_u *)&p_ru, PV_NONE,
@@ -2595,6 +2628,11 @@ static struct vimoption
{"tagstack", "tgst", P_BOOL|P_VI_DEF,
(char_u *)&p_tgst, PV_NONE,
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+#ifdef DYNAMIC_TCL
+ {"tcldll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_tcldll, PV_NONE,
+ {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
{"term", NULL, P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
(char_u *)&T_NAME, PV_NONE,
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
diff --git a/src/option.h b/src/option.h
index 5e655bb..72aa090 100644
--- a/src/option.h
+++ b/src/option.h
@@ -626,6 +626,9 @@ EXTERN char_u *p_lcs; /* 'listchars' */
EXTERN int p_lz; /* 'lazyredraw' */
EXTERN int p_lpl; /* 'loadplugins' */
+#ifdef DYNAMIC_LUA
+EXTERN char_u *p_luadll; /* 'luadll' */
+#endif
#ifdef FEAT_GUI_MAC
EXTERN int p_macatsui; /* 'macatsui' */
#endif
@@ -666,6 +669,10 @@ EXTERN long p_mouset; /* 'mousetime' */
EXTERN int p_more; /* 'more' */
#ifdef FEAT_MZSCHEME
EXTERN long p_mzq; /* 'mzquantum */
+# ifdef DYNAMIC_MZSCHEME
+EXTERN char_u *p_mzschdll; /* 'mzschdll' */
+EXTERN char_u *p_mzgcdll; /* 'mzgcdll' */
+# endif
#endif
#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
EXTERN int p_odev; /* 'opendevice' */
@@ -682,6 +689,15 @@ EXTERN char_u *p_path; /* 'path' */
#ifdef FEAT_SEARCHPATH
EXTERN char_u *p_cdpath; /* 'cdpath' */
#endif
+#ifdef DYNAMIC_PERL
+EXTERN char_u *p_perldll; /* 'perldll' */
+#endif
+#ifdef DYNAMIC_PYTHON
+EXTERN char_u *p_pydll; /* 'pythondll' */
+#endif
+#ifdef DYNAMIC_PYTHON3
+EXTERN char_u *p_py3dll; /* 'python3dll' */
+#endif
#ifdef FEAT_RELTIME
EXTERN long p_rdt; /* 'redrawtime' */
#endif
@@ -701,6 +717,9 @@ EXTERN int p_rs; /* 'restorescreen' */
EXTERN int p_ari; /* 'allowrevins' */
EXTERN int p_ri; /* 'revins' */
#endif
+#ifdef DYNAMIC_RUBY
+EXTERN char_u *p_rubydll; /* 'rubydll' */
+#endif
#ifdef FEAT_CMDL_INFO
EXTERN int p_ru; /* 'ruler' */
#endif
@@ -808,6 +827,9 @@ EXTERN long p_tl; /* 'taglength' */
EXTERN int p_tr; /* 'tagrelative' */
EXTERN char_u *p_tags; /* 'tags' */
EXTERN int p_tgst; /* 'tagstack' */
+#ifdef DYNAMIC_RUBY
+EXTERN char_u *p_tcldll; /* 'tcldll' */
+#endif
#ifdef FEAT_ARABIC
EXTERN int p_tbidi; /* 'termbidi' */
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment