1diff --git a/src/MacVim/vimrc b/src/MacVim/vimrc
2index 32c89b387..c2af70127 100644
3--- a/src/MacVim/vimrc
4+++ b/src/MacVim/vimrc
5@@ -9,35 +9,5 @@ set nocompatible
6 " more sensible value. Add "set backspace&" to your ~/.vimrc to reset it.
7 set backspace+=indent,eol,start
8
9-" Python2
10-" MacVim is configured by default to use the pre-installed System python2
11-" version. However, following code tries to find a Homebrew, MacPorts or
12-" an installation from python.org:
13-if exists("&pythondll") && exists("&pythonhome")
14- if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
15- " Homebrew python 2.7
16- set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
17- elseif filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python")
18- " MacPorts python 2.7
19- set pythondll=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
20- elseif filereadable("/Library/Frameworks/Python.framework/Versions/2.7/Python")
21- " https://www.python.org/downloads/mac-osx/
22- set pythondll=/Library/Frameworks/Python.framework/Versions/2.7/Python
23- endif
24-endif
25-
26-" Python3
27-" MacVim is configured by default to use Homebrew python3 version
28-" If this cannot be found, following code tries to find a MacPorts
29-" or an installation from python.org:
30-if exists("&pythonthreedll") && exists("&pythonthreehome") &&
31- \ !filereadable(&pythonthreedll)
32- if filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/3.9/Python")
33- " MacPorts python 3.9
34- set pythonthreedll=/opt/local/Library/Frameworks/Python.framework/Versions/3.9/Python
35- elseif filereadable("/Library/Frameworks/Python.framework/Versions/3.9/Python")
36- " https://www.python.org/downloads/mac-osx/
37- set pythonthreedll=/Library/Frameworks/Python.framework/Versions/3.9/Python
38- endif
39-endif
40-
41+" Default cscopeprg to the Nix-installed path
42+set cscopeprg=@CSCOPE@
43diff --git a/src/Makefile b/src/Makefile
44index c4a3ada37..06ee3de44 100644
45--- a/src/Makefile
46+++ b/src/Makefile
47@@ -1402,7 +1402,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \
48 MacVim/MacVim.m
49 MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o \
50 objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o
51-MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
52+MACVIMGUI_DEFS = -DMACOS_X_DARWIN -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
53 MACVIMGUI_IPATH =
54 MACVIMGUI_LIBS_DIR =
55 MACVIMGUI_LIBS1 =
56diff --git a/src/auto/configure b/src/auto/configure
57index 39ef81449..d8fa7ec2f 100755
58--- a/src/auto/configure
59+++ b/src/auto/configure
60@@ -5896,10 +5896,7 @@ $as_echo "not found" >&6; }
61
62 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
63 if test "X$path" != "X"; then
64- if test "x$MACOS_X" = "xyes"; then
65- MZSCHEME_LIBS="-framework Racket"
66- MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
67- elif test -f "${path}/libmzscheme3m.a"; then
68+ if test -f "${path}/libmzscheme3m.a"; then
69 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
70 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
71 elif test -f "${path}/libracket3m.a"; then
72@@ -6287,23 +6284,6 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
73 fi
74
75 if test "x$MACOS_X" = "xyes"; then
76- dir=/System/Library/Perl
77- darwindir=$dir/darwin
78- if test -d $darwindir; then
79- PERL=/usr/bin/perl
80- else
81- dir=/System/Library/Perl/5.8.1
82- darwindir=$dir/darwin-thread-multi-2level
83- if test -d $darwindir; then
84- PERL=/usr/bin/perl
85- fi
86- fi
87- if test -n "$PERL"; then
88- PERL_DIR="$dir"
89- PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
90- PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
91- PERL_LIBS="-L$darwindir/CORE -lperl"
92- fi
93 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
94 PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
95 fi
96@@ -6526,13 +6506,6 @@ __:
97 eof
98 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
99 rm -f -- "${tmp_mkf}"
100- if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
101- "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
102- vi_cv_path_python_plibs="-framework Python"
103- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
104- vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
105- fi
106- else
107 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
108 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
109 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
110@@ -6547,7 +6520,6 @@ eof
111 fi
112 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
113 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
114- fi
115
116 fi
117
118@@ -6626,13 +6598,6 @@ rm -f core conftest.err conftest.$ac_objext \
119 $as_echo "no" >&6; }
120 fi
121
122- if test -n "$MACSDK"; then
123- PYTHON_CFLAGS=
124- PYTHON_LIBS=-framework Python
125- PYTHON_CONFDIR=
126- PYTHON_GETPATH_CFLAGS=
127- fi
128-
129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
130 $as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
131 cflags_save=$CFLAGS
132@@ -7557,11 +7522,7 @@ $as_echo "$tclver - OK" >&6; };
133
134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
135 $as_echo_n "checking for location of Tcl include... " >&6; }
136- if test "x$MACOS_X" != "xyes"; then
137 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
138- else
139- tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /System/Library/Frameworks/Tcl.framework/Headers `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework/Versions/Current/Headers"
140- fi
141 TCL_INC=
142 for try in $tclinc; do
143 if test -f "$try/tcl.h"; then
144@@ -7579,13 +7540,8 @@ $as_echo "<not found>" >&6; }
145 if test -z "$SKIP_TCL"; then
146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
147 $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
148- if test "x$MACOS_X" != "xyes"; then
149 tclcnf=`echo $tclinc | sed s/include/lib/g`
150 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
151- else
152- tclcnf=`echo $tclinc | sed s/include/lib/g`
153- tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
154- fi
155 for try in $tclcnf; do
156 if test -f "$try/tclConfig.sh"; then
157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
158@@ -7774,10 +7730,6 @@ $as_echo "$rubyhdrdir" >&6; }
159 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
160 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; then
161 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
162- elif test "$vi_cv_path_ruby" = "/usr/bin/ruby" -a -d "/System/Library/Frameworks/Ruby.framework"; then
163- RUBY_LIBS="-framework Ruby"
164- RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
165- librubyarg=
166 fi
167
168 if test "X$librubyarg" != "X"; then
169diff --git a/src/vim.h b/src/vim.h
170index 4ff59f201..f91cb9836 100644
171--- a/src/vim.h
172+++ b/src/vim.h
173@@ -244,17 +244,6 @@
174 # define SUN_SYSTEM
175 #endif
176
177-// If we're compiling in C++ (currently only KVim), the system
178-// headers must have the correct prototypes or nothing will build.
179-// Conversely, our prototypes might clash due to throw() specifiers and
180-// cause compilation failures even though the headers are correct. For
181-// a concrete example, gcc-3.2 enforces exception specifications, and
182-// glibc-2.2.5 has them in their system headers.
183-#if !defined(__cplusplus) && defined(UNIX) \
184- && !defined(MACOS_X) // MACOS_X doesn't yet support osdef.h
185-# include "auto/osdef.h" // bring missing declarations in
186-#endif
187-
188 #ifdef AMIGA
189 # include "os_amiga.h"
190 #endif
191diff --git a/src/vimtutor b/src/vimtutor
192index 3b154f288..e89f26060 100755
193--- a/src/vimtutor
194+++ b/src/vimtutor
195@@ -16,6 +16,6 @@ seq="vim vim81 vim80 vim8 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
196 if test "$1" = "-g"; then
197 # Try to use the GUI version of Vim if possible, it will fall back
198 # on Vim if Gvim is not installed.
199- seq="gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
200+ seq="mvim gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
201 shift
202 fi