Patch 8.0.1236
Problem:    Mac features are confusing.
Solution:   Make feature names more consistent, add "osxdarwin". Rename
            feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
Files:      runtime/doc/eval.txt, runtime/doc/os_mac.txt, src/auto/configure,
            src/config.h.in, src/configure.ac, src/digraph.c, src/edit.c,
            src/evalfunc.c, src/feature.h, src/fileio.c, src/getchar.c,
            src/globals.h, src/gui.c, src/gui_mac.c, src/if_python.c,
            src/if_python3.c, src/if_ruby.c, src/keymap.h, src/macros.h,
            src/main.c, src/mbyte.c, src/message.c, src/misc1.c, src/misc2.c,
            src/option.c, src/os_mac.h, src/os_macosx.m, src/os_unix.c,
            src/proto.h, src/pty.c, src/structs.h, src/term.c, src/termlib.c,
            src/ui.c, src/undo.c, src/version.c, src/vim.h, src/window.c


*** ../vim-8.0.1235/runtime/doc/eval.txt        2017-10-14 23:24:20.746889776 
+0200
--- runtime/doc/eval.txt        2017-10-28 20:52:48.654019264 +0200
***************
*** 8866,8874 ****
                        and the argument list |arglist|.
  localmap              Compiled with local mappings and abbr. |:map-local|
  lua                   Compiled with Lua interface |Lua|.
! mac                   Any Macintosh version of Vim, but not all OS X.
! macunix                       Compiled for OS X, with |mac-darwin-feature|
! osx                   Compiled for OS X, with or w/o |mac-darwin-feature|
  menu                  Compiled with support for |:menu|.
  mksession             Compiled with support for |:mksession|.
  modify_fname          Compiled with file name modifiers. |filename-modifiers|
--- 8891,8898 ----
                        and the argument list |arglist|.
  localmap              Compiled with local mappings and abbr. |:map-local|
  lua                   Compiled with Lua interface |Lua|.
! mac                   Any Macintosh version of Vim  cf. osx
! macunix                       Synonym for osxdarwin
  menu                  Compiled with support for |:menu|.
  mksession             Compiled with support for |:mksession|.
  modify_fname          Compiled with file name modifiers. |filename-modifiers|
***************
*** 8891,8896 ****
--- 8915,8922 ----
  netbeans_intg         Compiled with support for |netbeans|.
  num64                 Compiled with 64-bit |Number| support.
  ole                   Compiled with OLE automation support for Win32.
+ osx                   Compiled for macOS  cf. mac
+ osxdarwin             Compiled for macOS, with |mac-darwin-feature|
  packages              Compiled with |packages| support.
  path_extra            Compiled with up/downwards search in 'path' and 'tags'
  perl                  Compiled with Perl interface.
***************
*** 8938,8944 ****
  toolbar                       Compiled with support for |gui-toolbar|.
  ttyin                 input is a terminal (tty)
  ttyout                        output is a terminal (tty)
! unix                  Unix version of Vim.
  unnamedplus           Compiled with support for "unnamedplus" in 'clipboard'
  user_commands         User-defined commands.
  vertsplit             Compiled with vertically split windows |:vsplit|.
--- 8964,8970 ----
  toolbar                       Compiled with support for |gui-toolbar|.
  ttyin                 input is a terminal (tty)
  ttyout                        output is a terminal (tty)
! unix                  Unix version of Vim. *+unix*
  unnamedplus           Compiled with support for "unnamedplus" in 'clipboard'
  user_commands         User-defined commands.
  vertsplit             Compiled with vertically split windows |:vsplit|.
*** ../vim-8.0.1235/runtime/doc/os_mac.txt      2016-09-12 12:45:26.000000000 
+0200
--- runtime/doc/os_mac.txt      2017-10-28 20:52:48.654019264 +0200
***************
*** 1,4 ****
! *os_mac.txt*    For Vim version 8.0.  Last change: 2006 Apr 30
  
  
                  VIM REFERENCE MANUAL    by Bram Moolenaar et al.
--- 1,4 ----
! *os_mac.txt*    For Vim version 8.0.  Last change: 2017 Apr 28
  
  
                  VIM REFERENCE MANUAL    by Bram Moolenaar et al.
***************
*** 12,22 ****
        http://macvim.org/
  
  1. Filename Convention                |mac-filename|
! 2. .vimrc an .vim files               |mac-vimfile|
! 3. FAQ                                |mac-faq|
! 4. Known Lack                 |mac-lack|
! 5. Mac Bug Report             |mac-bug|
! 6. Compiling Vim              |mac-compile|
  
  There was a Mac port for version 3.0 of Vim.  Here are the first few lines
  from the old file:
--- 12,24 ----
        http://macvim.org/
  
  1. Filename Convention                |mac-filename|
! 2. .vimrc and .vim files      |mac-vimfile|
! 3. Standard mappings          |mac-standard-mappings|
! 4. FAQ                                |mac-faq|
! 5. Known Lack                 |mac-lack|
! 6. Mac Bug Report             |mac-bug|
! 7. Compiling Vim              |mac-compile|
! 8. The darwin feature         |mac-darwin-feature|
  
  There was a Mac port for version 3.0 of Vim.  Here are the first few lines
  from the old file:
***************
*** 72,78 ****
  files.
  
  ==============================================================================
! 3. Mac FAQ                                            *mac-faq*
  
  On the internet:  http://macvim.org/OSX/index.php#FAQ
  
--- 74,91 ----
  files.
  
  ==============================================================================
! 3. Standard mappings                          *mac-standard-mappings*
! 
! The following mappings are available for cut/copy/paste from/to clipboard.
! 
! key           Normal  Visual    Insert        Description ~
! Command-v     "*P     "-d"*P    <C-R>*        paste text       *<D-v>*
! Command-c             "*y                     copy Visual text *<D-c>*
! Command-x             "*d                     cut Visual text  *<D-x>*
! Backspace             "*d                     cut Visual text
! 
! ==============================================================================
! 4. Mac FAQ                                            *mac-faq*
  
  On the internet:  http://macvim.org/OSX/index.php#FAQ
  
***************
*** 95,107 ****
        let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
  
  ==============================================================================
! 4. Mac Lack                                           *mac-lack*
  
  In a terminal CTRL-^ needs to be entered as Shift-Control-6.  CTRL-@ as
  Shift-Control-2.
  
  ==============================================================================
! 5. Mac Bug Report                                     *mac-bug*
  
  When reporting any Mac specific bug or feature change, please use the vim-mac
  maillist |vim-mac|.  However, you need to be subscribed.  An alternative is to
--- 108,120 ----
        let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
  
  ==============================================================================
! 5. Mac Lack                                           *mac-lack*
  
  In a terminal CTRL-^ needs to be entered as Shift-Control-6.  CTRL-@ as
  Shift-Control-2.
  
  ==============================================================================
! 6. Mac Bug Report                                     *mac-bug*
  
  When reporting any Mac specific bug or feature change, please use the vim-mac
  maillist |vim-mac|.  However, you need to be subscribed.  An alternative is to
***************
*** 110,118 ****
        [email protected]
  
  ==============================================================================
! 6. Compiling Vim                                      *mac-compile*
  
  See the file "src/INSTALLmac.txt" that comes with the source files.
  
  
   vim:tw=78:ts=8:ft=help:norl:
--- 123,182 ----
        [email protected]
  
  ==============================================================================
! 7. Compiling Vim                                      *mac-compile*
  
  See the file "src/INSTALLmac.txt" that comes with the source files.
  
+ ==============================================================================
+ 8. The Darwin Feature                                 *mac-darwin-feature*
+ 
+ If you have a Mac that isn't very old, you will be running OS X, also called
+ Darwin.  The last pre-Darwin OS was Mac OS 9.  The darwin feature makes Vim
+ use Darwin-specific properties.
+ 
+ What is accomplished with this feature is two-fold:
+ 
+ - Make Vim interoperable with the system clipboard.
+ - Incorporate into Vim a converter module that bridges the gap between some
+   character encodings specific to the platform and those known to Vim.
+ 
+ Needless to say, both are not to be missed for any decent text editor to work
+ nicely with other applications running on the same desktop environment.
+ 
+ As Vim is not an application dedicated only to macOS, we need an extra feature
+ to add in order for it to offer the same user experience that our users on
+ other platforms enjoy to people on macOS.
+ 
+ For brevity, the feature is referred to as "darwin" to signify it one of the
+ Vim features that are specific to that particular platform.
+ 
+ The feature is a configuration option.  Accordingly, whether it is enabled or
+ not is determined at build time; once it is selected to be enabled, it is
+ compiled in and hence cannot be disabled at runtime.
+ 
+ The feature is enabled by default.  For most macOS users, that should be
+ sufficient unless they have specific needs mentioned briefly below.
+ 
+ If you want to disable it, pass `--disable-darwin` to the configure script: >
+ 
+     ./configure --disable-darwin <other options>
+ 
+ and then run `make` to build Vim.  The order of the options doesn't matter.
+ 
+ To make sure at runtime whether or not the darwin feature is compiled in, you
+ can use `has('osxdarwin')` which returns 1 if the feature is compiled in; 0
+ otherwise.  For backwards comptibility, you can still use `macunix` instead of
+ `osxdarwin`.
+ 
+ Notable use cases where `--disable-darwin` is turned out to be useful are:
+ 
+ - When you want to use |x11-selection| instead of the system clipboard.
+ - When you want to use |x11-clientserver|.
+ 
+ Since both have to make use of X11 inter-client communication for them to work
+ properly, and since the communication mechanism can come into conflict with
+ the system clipboard, the darwin feature should be disabled to prevent Vim
+ from hanging at runtime.
+ 
  
   vim:tw=78:ts=8:ft=help:norl:
*** ../vim-8.0.1235/src/auto/configure  2017-10-28 20:28:18.676167007 +0200
--- src/auto/configure  2017-10-28 20:55:56.488721458 +0200
***************
*** 4187,4192 ****
--- 4187,4194 ----
  if test "`(uname) 2>/dev/null`" = Darwin; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
+   MACOS_X=yes
+   CPPFLAGS="$CPPFLAGS -DMACOS_X"
  
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-darwin 
argument" >&5
  $as_echo_n "checking --disable-darwin argument... " >&6; }
***************
*** 4357,4366 ****
    fi
  
    if test "$enable_darwin" = "yes"; then
!     MACOSX=yes
      OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
!             CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX"
  
                  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
  for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
--- 4359,4368 ----
    fi
  
    if test "$enable_darwin" = "yes"; then
!     MACOS_X_DARWIN=yes
      OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
!             CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
  
                  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
  for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
***************
*** 5153,5159 ****
        if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; 
then
        vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
        else
!       if test "x$MACOSX" = "xyes"; then
          ext="dylib"
          indexes=""
        else
--- 5155,5161 ----
        if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; 
then
        vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
        else
!       if test "x$MACOS_X" = "xyes"; then
          ext="dylib"
          indexes=""
        else
***************
*** 5199,5205 ****
        LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
      fi
      if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
!        test "x$MACOSX" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
         test "`(uname -m) 2>/dev/null`" = "x86_64"; then
              LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
      fi
--- 5201,5207 ----
        LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
      fi
      if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
!        test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
         test "`(uname -m) 2>/dev/null`" = "x86_64"; then
              LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
      fi
***************
*** 5404,5410 ****
  
      for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
        if test "X$path" != "X"; then
!       if test "x$MACOSX" = "xyes"; then
          MZSCHEME_LIBS="-framework Racket"
          MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
        elif test -f "${path}/libmzscheme3m.a"; then
--- 5406,5412 ----
  
      for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
        if test "X$path" != "X"; then
!       if test "x$MACOS_X" = "xyes"; then
          MZSCHEME_LIBS="-framework Racket"
          MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
        elif test -f "${path}/libmzscheme3m.a"; then
***************
*** 5784,5790 ****
      fi
    fi
  
!   if test "x$MACOSX" = "xyes"; then
          dir=/System/Library/Perl
      darwindir=$dir/darwin
      if test -d $darwindir; then
--- 5786,5792 ----
      fi
    fi
  
!   if test "x$MACOS_X" = "xyes"; then
          dir=/System/Library/Perl
      darwindir=$dir/darwin
      if test -d $darwindir; then
***************
*** 6002,6008 ****
  eof
                    eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | 
sed '/ directory /d'`"
            rm -f -- "${tmp_mkf}"
!           if test "x$MACOSX" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" 
&& ${vi_cv_path_python} -c \
                "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
              vi_cv_path_python_plibs="-framework Python"
              if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n 
"${python_PYTHONFRAMEWORKPREFIX}"; then
--- 6004,6010 ----
  eof
                    eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | 
sed '/ directory /d'`"
            rm -f -- "${tmp_mkf}"
!           if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" 
&& ${vi_cv_path_python} -c \
                "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
              vi_cv_path_python_plibs="-framework Python"
              if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n 
"${python_PYTHONFRAMEWORKPREFIX}"; then
***************
*** 6965,6971 ****
  
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl 
include" >&5
  $as_echo_n "checking for location of Tcl include... " >&6; }
!       if test "x$MACOSX" != "xyes"; then
        tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver 
/usr/local/include /usr/local/include/tcl$tclver /usr/include 
/usr/include/tcl$tclver"
        else
                tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
--- 6967,6973 ----
  
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl 
include" >&5
  $as_echo_n "checking for location of Tcl include... " >&6; }
!       if test "x$MACOS_X" != "xyes"; then
        tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver 
/usr/local/include /usr/local/include/tcl$tclver /usr/include 
/usr/include/tcl$tclver"
        else
                tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
***************
*** 6987,6993 ****
        if test -z "$SKIP_TCL"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of 
tclConfig.sh script" >&5
  $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
!       if test "x$MACOSX" != "xyes"; then
          tclcnf=`echo $tclinc | sed s/include/lib/g`
          tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
        else
--- 6989,6995 ----
        if test -z "$SKIP_TCL"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of 
tclConfig.sh script" >&5
  $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
!       if test "x$MACOS_X" != "xyes"; then
          tclcnf=`echo $tclinc | sed s/include/lib/g`
          tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
        else
***************
*** 7567,7573 ****
  $as_echo "$enable_fontset" >&6; }
  
  test -z "$with_x" && with_x=yes
! test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" 
&& with_x=yes
  if test "$with_x" = no; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't 
HAVE_X11" >&5
  $as_echo "defaulting to: don't HAVE_X11" >&6; }
--- 7569,7575 ----
  $as_echo "$enable_fontset" >&6; }
  
  test -z "$with_x" && with_x=yes
! test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" 
&& with_x=yes
  if test "$with_x" = no; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't 
HAVE_X11" >&5
  $as_echo "defaulting to: don't HAVE_X11" >&6; }
***************
*** 8584,8590 ****
    fi
  fi
  
! test "x$with_x" = xno -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && 
enable_gui=no
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
  $as_echo_n "checking --enable-gui argument... " >&6; }
--- 8586,8592 ----
    fi
  fi
  
! test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && 
enable_gui=no
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
  $as_echo_n "checking --enable-gui argument... " >&6; }
***************
*** 8626,8632 ****
                SKIP_PHOTON=YES ;;
    esac
  
! elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
    SKIP_CARBON=
    case "$enable_gui_canon" in
      no)               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI 
support" >&5
--- 8628,8634 ----
                SKIP_PHOTON=YES ;;
    esac
  
! elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
    SKIP_CARBON=
    case "$enable_gui_canon" in
      no)               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI 
support" >&5
***************
*** 8804,8810 ****
  fi
  
  
! if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
  $as_echo_n "checking for Carbon GUI... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--- 8806,8812 ----
  fi
  
  
! if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
  $as_echo_n "checking for Carbon GUI... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
***************
*** 10624,10630 ****
  
  done
  
! if test "x$MACOSX" = "xyes"; then
      $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
  
  else
--- 10626,10632 ----
  
  done
  
! if test "x$MACOS_X" = "xyes"; then
      $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
  
  else
***************
*** 12076,12082 ****
        getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
        sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
        strnicmp strpbrk strtol tgetent towlower towupper iswupper \
!       usleep utime utimes
  do :
    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
--- 12078,12084 ----
        getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
        sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
        strnicmp strpbrk strtol tgetent towlower towupper iswupper \
!       usleep utime utimes mblen
  do :
    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
***************
*** 14099,14126 ****
  done
  
  
! if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
      if echo $LIBS | grep -e '-ldl' >/dev/null; then
      LIBS=`echo $LIBS | sed s/-ldl//`
      PERL_LIBS="$PERL_LIBS -ldl"
    fi
  fi
  
! if test "x$MACOSX" = "xyes"; then
!   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need 
-framework Cocoa" >&5
! $as_echo_n "checking whether we need -framework Cocoa... " >&6; }
!       if test "x$features" != "xtiny" || test "x$enable_multibyte" = "xyes"; 
then
!     LIBS=$"$LIBS -framework Cocoa"
!     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
! $as_echo "yes" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
    fi
-         if test "x$features" = "xtiny"; then
-     OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
-     OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
-   fi
  fi
  if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
    LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 
-arch ppc"
--- 14101,14151 ----
  done
  
  
! if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
      if echo $LIBS | grep -e '-ldl' >/dev/null; then
      LIBS=`echo $LIBS | sed s/-ldl//`
      PERL_LIBS="$PERL_LIBS -ldl"
    fi
  fi
  
! if test "$MACOS_X" = "yes"; then
!   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS 
frameworks" >&5
! $as_echo_n "checking whether we need macOS frameworks... " >&6; }
!   if test "$GUITYPE" = "CARBONGUI"; then
!     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need Carbon" >&5
! $as_echo "yes, we need Carbon" >&6; }
!     LIBS="$LIBS -framework Carbon"
!   elif test "$MACOS_X_DARWIN" = "yes"; then
!     if test "$features" = "tiny"; then
!             OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
!       OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
!       if test "$enable_multibyte" = "yes"; then
!         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need 
CoreServices" >&5
! $as_echo "yes, we need CoreServices" >&6; }
!         LIBS="$LIBS -framework CoreServices"
!       else
!                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
! $as_echo "no" >&6; }
!         OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_mac_conv.c++'`
!         OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 
's+objects/os_mac_conv.o++'`
!         CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's+-DMACOS_X_DARWIN++'`
!       fi
!     else
!       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" 
>&5
! $as_echo "yes, we need AppKit" >&6; }
!       LIBS="$LIBS -framework AppKit"
!       if test "$features" = "small" -a "$enable_multibyte" = "no"; then
!                                 { $as_echo "$as_me:${as_lineno-$LINENO}: 
+multi_byte will be set in favor of +clipboard" >&5
! $as_echo "$as_me: +multi_byte will be set in favor of +clipboard" >&6;}
!         enable_multibyte=yes
!         $as_echo "#define FEAT_MBYTE 1" >>confdefs.h
! 
!       fi
!     fi
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
    fi
  fi
  if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
    LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 
-arch ppc"
*** ../vim-8.0.1235/src/config.h.in     2017-07-07 11:53:29.507876589 +0200
--- src/config.h.in     2017-10-28 20:52:48.658019236 +0200
***************
*** 212,217 ****
--- 212,218 ----
  #undef HAVE_USLEEP
  #undef HAVE_UTIME
  #undef HAVE_BIND_TEXTDOMAIN_CODESET
+ #undef HAVE_MBLEN
  
  /* Define, if needed, for accessing large files. */
  #undef _LARGE_FILES
*** ../vim-8.0.1235/src/configure.ac    2017-10-28 20:28:18.672167034 +0200
--- src/configure.ac    2017-10-28 20:52:48.662019209 +0200
***************
*** 134,139 ****
--- 134,141 ----
  AC_MSG_CHECKING([for Darwin (Mac OS X)])
  if test "`(uname) 2>/dev/null`" = Darwin; then
    AC_MSG_RESULT(yes)
+   MACOS_X=yes
+   CPPFLAGS="$CPPFLAGS -DMACOS_X"
  
    AC_MSG_CHECKING(--disable-darwin argument)
    AC_ARG_ENABLE(darwin,
***************
*** 208,219 ****
    fi
  
    if test "$enable_darwin" = "yes"; then
!     MACOSX=yes
      OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
      dnl TODO: use -arch i386 on Intel machines
      dnl Removed -no-cpp-precomp, only for very old compilers.
!     CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX"
  
      dnl If Carbon is found, assume we don't want X11
      dnl unless it was specifically asked for (--with-x)
--- 210,221 ----
    fi
  
    if test "$enable_darwin" = "yes"; then
!     MACOS_X_DARWIN=yes
      OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
      dnl TODO: use -arch i386 on Intel machines
      dnl Removed -no-cpp-precomp, only for very old compilers.
!     CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
  
      dnl If Carbon is found, assume we don't want X11
      dnl unless it was specifically asked for (--with-x)
***************
*** 626,632 ****
        if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; 
then
        vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
        else
!       if test "x$MACOSX" = "xyes"; then
          ext="dylib"
          indexes=""
        else
--- 628,634 ----
        if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; 
then
        vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
        else
!       if test "x$MACOS_X" = "xyes"; then
          ext="dylib"
          indexes=""
        else
***************
*** 670,676 ****
        LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
      fi
      if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
!        test "x$MACOSX" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
         test "`(uname -m) 2>/dev/null`" = "x86_64"; then
        dnl OSX/x64 requires these flags. See http://luajit.org/install.html
        LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
--- 672,678 ----
        LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
      fi
      if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
!        test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
         test "`(uname -m) 2>/dev/null`" = "x86_64"; then
        dnl OSX/x64 requires these flags. See http://luajit.org/install.html
        LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
***************
*** 802,808 ****
  
      for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
        if test "X$path" != "X"; then
!       if test "x$MACOSX" = "xyes"; then
          MZSCHEME_LIBS="-framework Racket"
          MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
        elif test -f "${path}/libmzscheme3m.a"; then
--- 804,810 ----
  
      for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
        if test "X$path" != "X"; then
!       if test "x$MACOS_X" = "xyes"; then
          MZSCHEME_LIBS="-framework Racket"
          MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
        elif test -f "${path}/libmzscheme3m.a"; then
***************
*** 1059,1065 ****
      fi
    fi
  
!   if test "x$MACOSX" = "xyes"; then
      dnl Mac OS X 10.2 or later
      dir=/System/Library/Perl
      darwindir=$dir/darwin
--- 1061,1067 ----
      fi
    fi
  
!   if test "x$MACOS_X" = "xyes"; then
      dnl Mac OS X 10.2 or later
      dir=/System/Library/Perl
      darwindir=$dir/darwin
***************
*** 1201,1207 ****
            dnl -- delete the lines from make about Entering/Leaving directory
            eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ 
directory /d'`"
            rm -f -- "${tmp_mkf}"
!           if test "x$MACOSX" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" 
&& ${vi_cv_path_python} -c \
                "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
              vi_cv_path_python_plibs="-framework Python"
              if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n 
"${python_PYTHONFRAMEWORKPREFIX}"; then
--- 1203,1209 ----
            dnl -- delete the lines from make about Entering/Leaving directory
            eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ 
directory /d'`"
            rm -f -- "${tmp_mkf}"
!           if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" 
&& ${vi_cv_path_python} -c \
                "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
              vi_cv_path_python_plibs="-framework Python"
              if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n 
"${python_PYTHONFRAMEWORKPREFIX}"; then
***************
*** 1269,1275 ****
        AC_MSG_CHECKING([if -pthread should be used])
        threadsafe_flag=
        thread_lib=
!       dnl if test "x$MACOSX" != "xyes"; then
          if test "`(uname) 2>/dev/null`" != Darwin; then
          test "$GCC" = yes && threadsafe_flag="-pthread"
          if test "`(uname) 2>/dev/null`" = FreeBSD; then
--- 1271,1277 ----
        AC_MSG_CHECKING([if -pthread should be used])
        threadsafe_flag=
        thread_lib=
!       dnl if test "x$MACOS_X" != "xyes"; then
          if test "`(uname) 2>/dev/null`" != Darwin; then
          test "$GCC" = yes && threadsafe_flag="-pthread"
          if test "`(uname) 2>/dev/null`" = FreeBSD; then
***************
*** 1474,1480 ****
          AC_MSG_CHECKING([if -pthread should be used])
          threadsafe_flag=
          thread_lib=
!         dnl if test "x$MACOSX" != "xyes"; then
          if test "`(uname) 2>/dev/null`" != Darwin; then
            test "$GCC" = yes && threadsafe_flag="-pthread"
            if test "`(uname) 2>/dev/null`" = FreeBSD; then
--- 1476,1482 ----
          AC_MSG_CHECKING([if -pthread should be used])
          threadsafe_flag=
          thread_lib=
!         dnl if test "x$MACOS_X" != "xyes"; then
          if test "`(uname) 2>/dev/null`" != Darwin; then
            test "$GCC" = yes && threadsafe_flag="-pthread"
            if test "`(uname) 2>/dev/null`" = FreeBSD; then
***************
*** 1729,1735 ****
        tcldll=`echo 'puts libtcl[[info tclversion]][[info 
sharedlibextension]]' | $vi_cv_path_tcl -`
  
        AC_MSG_CHECKING(for location of Tcl include)
!       if test "x$MACOSX" != "xyes"; then
        tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver 
/usr/local/include /usr/local/include/tcl$tclver /usr/include 
/usr/include/tcl$tclver"
        else
        dnl For Mac OS X 10.3, use the OS-provided framework location
--- 1731,1737 ----
        tcldll=`echo 'puts libtcl[[info tclversion]][[info 
sharedlibextension]]' | $vi_cv_path_tcl -`
  
        AC_MSG_CHECKING(for location of Tcl include)
!       if test "x$MACOS_X" != "xyes"; then
        tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver 
/usr/local/include /usr/local/include/tcl$tclver /usr/include 
/usr/include/tcl$tclver"
        else
        dnl For Mac OS X 10.3, use the OS-provided framework location
***************
*** 1749,1755 ****
        fi
        if test -z "$SKIP_TCL"; then
        AC_MSG_CHECKING(for location of tclConfig.sh script)
!       if test "x$MACOSX" != "xyes"; then
          tclcnf=`echo $tclinc | sed s/include/lib/g`
          tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
        else
--- 1751,1757 ----
        fi
        if test -z "$SKIP_TCL"; then
        AC_MSG_CHECKING(for location of tclConfig.sh script)
!       if test "x$MACOS_X" != "xyes"; then
          tclcnf=`echo $tclinc | sed s/include/lib/g`
          tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
        else
***************
*** 2093,2099 ****
  dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI
  
  test -z "$with_x" && with_x=yes
! test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" 
&& with_x=yes
  if test "$with_x" = no; then
    AC_MSG_RESULT(defaulting to: don't HAVE_X11)
  else
--- 2095,2101 ----
  dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI
  
  test -z "$with_x" && with_x=yes
! test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" 
&& with_x=yes
  if test "$with_x" = no; then
    AC_MSG_RESULT(defaulting to: don't HAVE_X11)
  else
***************
*** 2224,2230 ****
    fi
  fi
  
! test "x$with_x" = xno -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && 
enable_gui=no
  
  AC_MSG_CHECKING(--enable-gui argument)
  AC_ARG_ENABLE(gui,
--- 2226,2232 ----
    fi
  fi
  
! test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && 
enable_gui=no
  
  AC_MSG_CHECKING(--enable-gui argument)
  AC_ARG_ENABLE(gui,
***************
*** 2258,2264 ****
                SKIP_PHOTON=YES ;;
    esac
  
! elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
    SKIP_CARBON=
    case "$enable_gui_canon" in
      no)               AC_MSG_RESULT(no GUI support)
--- 2260,2266 ----
                SKIP_PHOTON=YES ;;
    esac
  
! elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
    SKIP_CARBON=
    case "$enable_gui_canon" in
      no)               AC_MSG_RESULT(no GUI support)
***************
*** 2380,2386 ****
  fi
  
  
! if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
    AC_MSG_CHECKING(for Carbon GUI)
    dnl already did the check, just give the message
    AC_MSG_RESULT(yes);
--- 2382,2388 ----
  fi
  
  
! if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
    AC_MSG_CHECKING(for Carbon GUI)
    dnl already did the check, just give the message
    AC_MSG_RESULT(yes);
***************
*** 3188,3194 ****
              AC_MSG_RESULT(no))
  
  AC_CHECK_HEADERS(strings.h)
! if test "x$MACOSX" = "xyes"; then
    dnl The strings.h file on OS/X contains a warning and nothing useful.
    AC_DEFINE(NO_STRINGS_WITH_STRING_H)
  else
--- 3190,3196 ----
              AC_MSG_RESULT(no))
  
  AC_CHECK_HEADERS(strings.h)
! if test "x$MACOS_X" = "xyes"; then
    dnl The strings.h file on OS/X contains a warning and nothing useful.
    AC_DEFINE(NO_STRINGS_WITH_STRING_H)
  else
***************
*** 3650,3656 ****
        getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
        sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
        strnicmp strpbrk strtol tgetent towlower towupper iswupper \
!       usleep utime utimes)
  AC_FUNC_FSEEKO
  
  dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
--- 3652,3658 ----
        getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
        sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
        strnicmp strpbrk strtol tgetent towlower towupper iswupper \
!       usleep utime utimes mblen)
  AC_FUNC_FSEEKO
  
  dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
***************
*** 4277,4283 ****
  fi
  AC_CHECK_HEADERS(setjmp.h)
  
! if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
    dnl -ldl must come after DynaLoader.a
    if echo $LIBS | grep -e '-ldl' >/dev/null; then
      LIBS=`echo $LIBS | sed s/-ldl//`
--- 4279,4285 ----
  fi
  AC_CHECK_HEADERS(setjmp.h)
  
! if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
    dnl -ldl must come after DynaLoader.a
    if echo $LIBS | grep -e '-ldl' >/dev/null; then
      LIBS=`echo $LIBS | sed s/-ldl//`
***************
*** 4285,4306 ****
    fi
  fi
  
! if test "x$MACOSX" = "xyes"; then
!   AC_MSG_CHECKING(whether we need -framework Cocoa)
!   dnl Cocoa is needed with FEAT_CLIPBOARD or FEAT_MBYTE (the former is
!   dnl disabled during tiny build)
!   if test "x$features" != "xtiny" || test "x$enable_multibyte" = "xyes"; then
!     LIBS=$"$LIBS -framework Cocoa"
!     AC_MSG_RESULT(yes)
    else
!     AC_MSG_RESULT(no)
!   fi
!   dnl As mentioned above, tiny build implies os_macosx.m isn't needed.  
!   dnl Exclude it from OS_EXTRA_SRC so that linker won't complain about
!   dnl missing Objective-C symbols.
!   if test "x$features" = "xtiny"; then
!     OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
!     OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
    fi
  fi
  if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
--- 4287,4326 ----
    fi
  fi
  
! if test "$MACOS_X" = "yes"; then
!   AC_MSG_CHECKING([whether we need macOS frameworks])
!   if test "$GUITYPE" = "CARBONGUI"; then
!     AC_MSG_RESULT([yes, we need Carbon])
!     LIBS="$LIBS -framework Carbon"
!   elif test "$MACOS_X_DARWIN" = "yes"; then
!     if test "$features" = "tiny"; then
!       dnl Since no FEAT_CLIPBOARD, no longer need for os_macosx.m.
!       OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
!       OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
!       if test "$enable_multibyte" = "yes"; then
!         AC_MSG_RESULT([yes, we need CoreServices])
!         LIBS="$LIBS -framework CoreServices"
!       else
!         dnl Since no FEAT_MBYTE, no longer need for os_mac_conv.c.
!         AC_MSG_RESULT([no])
!         OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_mac_conv.c++'`
!         OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 
's+objects/os_mac_conv.o++'`
!         CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's+-DMACOS_X_DARWIN++'`
!       fi
!     else
!       AC_MSG_RESULT([yes, we need AppKit])
!       LIBS="$LIBS -framework AppKit"
!       if test "$features" = "small" -a "$enable_multibyte" = "no"; then
!         dnl Since FEAT_CLIPBOARD is to be defined in vim.h for FEAT_SMALL, 
define
!         dnl FEAT_MBYTE in order not to compromise the interoperability of the
!         dnl clipboard.
!         AC_MSG_NOTICE([+multi_byte will be set in favor of +clipboard])
!         enable_multibyte=yes
!         AC_DEFINE(FEAT_MBYTE)
!       fi
!     fi
    else
!     AC_MSG_RESULT([no])
    fi
  fi
  if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
*** ../vim-8.0.1235/src/digraph.c       2017-09-16 20:54:47.086560482 +0200
--- src/digraph.c       2017-10-28 20:52:48.662019209 +0200
***************
*** 321,327 ****
        };
  
  #  else
! #   if defined(MACOS) && !defined(FEAT_MBYTE)
  
        /*
         * Macintosh digraphs
--- 321,327 ----
        };
  
  #  else
! #   if defined(MACOS_X) && !defined(FEAT_MBYTE)
  
        /*
         * Macintosh digraphs
***************
*** 449,455 ****
        {NUL, NUL, NUL}
        };
  
! #   else      /* !MACOS */
  
  #    ifdef OLD_DIGRAPHS
  
--- 449,455 ----
        {NUL, NUL, NUL}
        };
  
! #   else      /* !MACOS_X */
  
  #    ifdef OLD_DIGRAPHS
  
*** ../vim-8.0.1235/src/edit.c  2017-10-24 21:49:32.222837817 +0200
--- src/edit.c  2017-10-28 20:52:48.662019209 +0200
***************
*** 5977,5983 ****
       * Only use mod_mask for special keys, to avoid things like <S-Space>,
       * unless 'allow_modmask' is TRUE.
       */
! #ifdef MACOS
      /* Command-key never produces a normal key */
      if (mod_mask & MOD_MASK_CMD)
        allow_modmask = TRUE;
--- 5977,5983 ----
       * Only use mod_mask for special keys, to avoid things like <S-Space>,
       * unless 'allow_modmask' is TRUE.
       */
! #ifdef MACOS_X
      /* Command-key never produces a normal key */
      if (mod_mask & MOD_MASK_CMD)
        allow_modmask = TRUE;
***************
*** 8756,8762 ****
            case K_KPAGEUP:
            case K_PAGEDOWN:
            case K_KPAGEDOWN:
! # ifdef MACOS
            case K_LEFT:
            case K_RIGHT:
            case K_UP:
--- 8756,8762 ----
            case K_KPAGEUP:
            case K_PAGEDOWN:
            case K_KPAGEDOWN:
! # ifdef MACOS_X
            case K_LEFT:
            case K_RIGHT:
            case K_UP:
*** ../vim-8.0.1235/src/evalfunc.c      2017-09-29 21:29:13.305914951 +0200
--- src/evalfunc.c      2017-10-28 20:52:48.666019181 +0200
***************
*** 24,30 ****
  # include <float.h>
  #endif
  
! #ifdef MACOS
  # include <time.h>    /* for time_t */
  #endif
  
--- 24,30 ----
  # include <float.h>
  #endif
  
! #ifdef MACOS_X
  # include <time.h>    /* for time_t */
  #endif
  
***************
*** 5539,5552 ****
  #ifdef __BEOS__
        "beos",
  #endif
! #ifdef MACOS
!       "mac",
! #endif
! #if defined(MACOS_X_UNIX)
!       "macunix",  /* built with 'darwin' enabled */
! #endif
! #if defined(__APPLE__) && __APPLE__ == 1
!       "osx",      /* built with or without 'darwin' enabled */
  #endif
  #ifdef __QNX__
        "qnx",
--- 5539,5551 ----
  #ifdef __BEOS__
        "beos",
  #endif
! #ifdef MACOS_X
!        "mac",         /* Mac OS X (and, once, Mac OS Classic) */
!        "osx",         /* Mac OS X */
! # ifdef MACOS_X_DARWIN
!        "macunix",     /* Mac OS X, with the darwin feature */
!        "osxdarwin",   /* synonym for macunix */
! # endif
  #endif
  #ifdef __QNX__
        "qnx",
*** ../vim-8.0.1235/src/feature.h       2017-09-16 20:54:47.074560554 +0200
--- src/feature.h       2017-10-28 20:52:48.666019181 +0200
***************
*** 61,70 ****
   */
  #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
        && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
! # if defined(UNIX) || defined(WIN3264) || defined(MACOS)
  #  define FEAT_HUGE
  # else
! #  if defined(MSWIN) || defined(VMS) || defined(MACOS) || defined(AMIGA)
  #   define FEAT_BIG
  #  else
  #   define FEAT_NORMAL
--- 61,70 ----
   */
  #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
        && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
! # if defined(UNIX) || defined(WIN3264) || defined(MACOS_X)
  #  define FEAT_HUGE
  # else
! #  if defined(MSWIN) || defined(VMS) || defined(AMIGA)
  #   define FEAT_BIG
  #  else
  #   define FEAT_NORMAL
***************
*** 363,369 ****
   */
  #ifdef FEAT_NORMAL
  # define FEAT_EVAL
! # if defined(HAVE_FLOAT_FUNCS) || defined(WIN3264) || defined(MACOS)
  #  define FEAT_FLOAT
  # endif
  # if defined(HAVE_STDINT_H) || defined(WIN3264) || (VIM_SIZEOF_LONG >= 8)
--- 363,369 ----
   */
  #ifdef FEAT_NORMAL
  # define FEAT_EVAL
! # if defined(HAVE_FLOAT_FUNCS) || defined(WIN3264) || defined(MACOS_X)
  #  define FEAT_FLOAT
  # endif
  # if defined(HAVE_STDINT_H) || defined(WIN3264) || (VIM_SIZEOF_LONG >= 8)
***************
*** 777,783 ****
   * there is no terminal version, and on Windows we can't figure out how to
   * fork one off with :gui.
   */
! #if defined(FEAT_GUI_MSWIN) || (defined(FEAT_GUI_MAC) && 
!defined(MACOS_X_UNIX))
  # define ALWAYS_USE_GUI
  #endif
  
--- 777,783 ----
   * there is no terminal version, and on Windows we can't figure out how to
   * fork one off with :gui.
   */
! #if defined(FEAT_GUI_MSWIN) || (defined(FEAT_GUI_MAC) && 
!defined(MACOS_X_DARWIN))
  # define ALWAYS_USE_GUI
  #endif
  
*** ../vim-8.0.1235/src/fileio.c        2017-10-27 22:15:19.566317636 +0200
--- src/fileio.c        2017-10-28 20:52:48.666019181 +0200
***************
*** 68,74 ****
  #  define FIO_PUT_CP(x) (((x) & 0xffff) << 16)        /* put codepage in top 
word */
  #  define FIO_GET_CP(x)       (((x)>>16) & 0xffff)    /* get codepage from 
top word */
  # endif
! # ifdef MACOS_X
  #  define FIO_MACROMAN        0x20    /* convert MacRoman */
  # endif
  # define FIO_ENDIAN_L 0x80    /* little endian */
--- 68,74 ----
  #  define FIO_PUT_CP(x) (((x) & 0xffff) << 16)        /* put codepage in top 
word */
  #  define FIO_GET_CP(x)       (((x)>>16) & 0xffff)    /* get codepage from 
top word */
  # endif
! # ifdef MACOS_CONVERT
  #  define FIO_MACROMAN        0x20    /* convert MacRoman */
  # endif
  # define FIO_ENDIAN_L 0x80    /* little endian */
***************
*** 127,133 ****
  # ifdef WIN3264
  static int get_win_fio_flags(char_u *ptr);
  # endif
! # ifdef MACOS_X
  static int get_mac_fio_flags(char_u *ptr);
  # endif
  #endif
--- 127,133 ----
  # ifdef WIN3264
  static int get_win_fio_flags(char_u *ptr);
  # endif
! # ifdef MACOS_CONVERT
  static int get_mac_fio_flags(char_u *ptr);
  # endif
  #endif
***************
*** 1088,1094 ****
            fio_flags = get_win_fio_flags(fenc);
  # endif
  
! # ifdef MACOS_X
        /* Conversion from Apple MacRoman to latin1 or UTF-8 */
        if (fio_flags == 0)
            fio_flags = get_mac_fio_flags(fenc);
--- 1088,1094 ----
            fio_flags = get_win_fio_flags(fenc);
  # endif
  
! # ifdef MACOS_CONVERT
        /* Conversion from Apple MacRoman to latin1 or UTF-8 */
        if (fio_flags == 0)
            fio_flags = get_mac_fio_flags(fenc);
***************
*** 1274,1280 ****
                else if (fio_flags & FIO_CODEPAGE)
                    size = size / ICONV_MULT;   /* also worst case */
  # endif
! # ifdef MACOS_X
                else if (fio_flags & FIO_MACROMAN)
                    size = size / ICONV_MULT;   /* also worst case */
  # endif
--- 1274,1280 ----
                else if (fio_flags & FIO_CODEPAGE)
                    size = size / ICONV_MULT;   /* also worst case */
  # endif
! # ifdef MACOS_CONVERT
                else if (fio_flags & FIO_MACROMAN)
                    size = size / ICONV_MULT;   /* also worst case */
  # endif
***************
*** 4200,4219 ****
        }
      }
  
- #ifdef MACOS_CLASSIC /* TODO: Is it need for MACOS_X? (Dany) */
-     /*
-      * Before risking to lose the original file verify if there's
-      * a resource fork to preserve, and if cannot be done warn
-      * the users. This happens when overwriting without backups.
-      */
-     if (backup == NULL && overwriting && !append)
-       if (mch_has_resource_fork(fname))
-       {
-           errmsg = (char_u *)_("E460: The resource fork would be lost (add ! 
to override)");
-           goto restore_backup;
-       }
- #endif
- 
  #ifdef VMS
      vms_remove_version(fname); /* remove version */
  #endif
--- 4200,4205 ----
***************
*** 4271,4277 ****
      }
  # endif
  
! # ifdef MACOS_X
      if (converted && wb_flags == 0 && (wb_flags = get_mac_fio_flags(fenc)) != 
0)
      {
        write_info.bw_conv_buflen = bufsize * 3;
--- 4257,4263 ----
      }
  # endif
  
! # ifdef MACOS_CONVERT
      if (converted && wb_flags == 0 && (wb_flags = get_mac_fio_flags(fenc)) != 
0)
      {
        write_info.bw_conv_buflen = bufsize * 3;
***************
*** 4474,4486 ****
            }
            write_info.bw_fd = fd;
  
! #if defined(MACOS_CLASSIC) || defined(WIN3264)
!           /* TODO: Is it need for MACOS_X? (Dany) */
!           /*
!            * On macintosh copy the original files attributes (i.e. the backup)
!            * This is done in order to preserve the resource fork and the
!            * Finder attribute (label, comments, custom icons, file creator)
!            */
            if (backup != NULL && overwriting && !append)
            {
                if (backup_copy)
--- 4460,4466 ----
            }
            write_info.bw_fd = fd;
  
! #if defined(WIN3264)
            if (backup != NULL && overwriting && !append)
            {
                if (backup_copy)
***************
*** 5199,5208 ****
  
      got_int |= prev_got_int;
  
- #ifdef MACOS_CLASSIC /* TODO: Is it need for MACOS_X? (Dany) */
-     /* Update machine specific information. */
-     mch_post_buffer_write(buf);
- #endif
      return retval;
  }
  
--- 5179,5184 ----
***************
*** 5972,5978 ****
  }
  #endif
  
! #ifdef MACOS_X
  /*
   * Check "ptr" for a Carbon supported encoding and return the FIO_ flags
   * needed for the internal conversion to/from utf-8 or latin1.
--- 5948,5954 ----
  }
  #endif
  
! #ifdef MACOS_CONVERT
  /*
   * Check "ptr" for a Carbon supported encoding and return the FIO_ flags
   * needed for the internal conversion to/from utf-8 or latin1.
*** ../vim-8.0.1235/src/getchar.c       2017-09-22 15:20:27.732148666 +0200
--- src/getchar.c       2017-10-28 20:52:48.666019181 +0200
***************
*** 1893,1899 ****
      int           retval;
  
  #ifdef FEAT_EVAL
!     /* When test_disable_char_avail(1) was called pretend there is no
       * typeahead. */
      if (disable_char_avail_for_testing)
        return FALSE;
--- 1893,1899 ----
      int           retval;
  
  #ifdef FEAT_EVAL
!     /* When test_override("char_avail", 1) was called pretend there is no
       * typeahead. */
      if (disable_char_avail_for_testing)
        return FALSE;
***************
*** 5257,5263 ****
  }
  #endif
  
! #if defined(MSWIN) || defined(MACOS)
  
  #define VIS_SEL       (VISUAL+SELECTMODE)     /* abbreviation */
  
--- 5257,5263 ----
  }
  #endif
  
! #if defined(MSWIN) || defined(MACOS_X)
  
  #define VIS_SEL       (VISUAL+SELECTMODE)     /* abbreviation */
  
***************
*** 5308,5314 ****
  # endif
  #endif
  
! #if defined(MACOS)
        /* Use the Standard MacOS binding. */
        /* paste, copy and cut */
        {(char_u *)"<D-v> \"*P", NORMAL},
--- 5308,5314 ----
  # endif
  #endif
  
! #if defined(MACOS_X)
        /* Use the Standard MacOS binding. */
        /* paste, copy and cut */
        {(char_u *)"<D-v> \"*P", NORMAL},
***************
*** 5329,5335 ****
      void
  init_mappings(void)
  {
! #if defined(MSWIN) ||defined(MACOS)
      int               i;
  
      for (i = 0; i < (int)(sizeof(initmappings) / sizeof(struct initmap)); ++i)
--- 5329,5335 ----
      void
  init_mappings(void)
  {
! #if defined(MSWIN) || defined(MACOS_X)
      int               i;
  
      for (i = 0; i < (int)(sizeof(initmappings) / sizeof(struct initmap)); ++i)
***************
*** 5337,5343 ****
  #endif
  }
  
! #if defined(MSWIN) || defined(FEAT_CMDWIN) || defined(MACOS) || defined(PROTO)
  /*
   * Add a mapping "map" for mode "mode".
   * Need to put string in allocated memory, because do_map() will modify it.
--- 5337,5344 ----
  #endif
  }
  
! #if defined(MSWIN) || defined(FEAT_CMDWIN) || defined(MACOS_X) \
!                                                            || defined(PROTO)
  /*
   * Add a mapping "map" for mode "mode".
   * Need to put string in allocated memory, because do_map() will modify it.
*** ../vim-8.0.1235/src/globals.h       2017-10-26 14:28:25.940145001 +0200
--- src/globals.h       2017-10-28 20:52:48.666019181 +0200
***************
*** 1425,1431 ****
  #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
  EXTERN char_u e_fontset[]     INIT(= N_("E234: Unknown fontset: %s"));
  #endif
! #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(MACOS) \
        || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN)
  EXTERN char_u e_font[]                INIT(= N_("E235: Unknown font: %s"));
  #endif
--- 1425,1431 ----
  #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
  EXTERN char_u e_fontset[]     INIT(= N_("E234: Unknown fontset: %s"));
  #endif
! #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
        || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN)
  EXTERN char_u e_font[]                INIT(= N_("E235: Unknown font: %s"));
  #endif
***************
*** 1545,1551 ****
  EXTERN char_u e_sandbox[]     INIT(= N_("E48: Not allowed in sandbox"));
  #endif
  EXTERN char_u e_secure[]      INIT(= N_("E523: Not allowed here"));
! #if defined(AMIGA) || defined(MACOS) || defined(MSWIN)  \
        || defined(UNIX) || defined(VMS)
  EXTERN char_u e_screenmode[]  INIT(= N_("E359: Screen mode setting not 
supported"));
  #endif
--- 1545,1551 ----
  EXTERN char_u e_sandbox[]     INIT(= N_("E48: Not allowed in sandbox"));
  #endif
  EXTERN char_u e_secure[]      INIT(= N_("E523: Not allowed here"));
! #if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN)  \
        || defined(UNIX) || defined(VMS)
  EXTERN char_u e_screenmode[]  INIT(= N_("E359: Screen mode setting not 
supported"));
  #endif
***************
*** 1592,1598 ****
  #endif
  EXTERN char_u e_dirnotf[]     INIT(= N_("E919: Directory not found in '%s': 
\"%s\""));
  
! #ifdef MACOS_X_UNIX
  EXTERN short disallow_gui     INIT(= FALSE);
  #endif
  
--- 1592,1598 ----
  #endif
  EXTERN char_u e_dirnotf[]     INIT(= N_("E919: Directory not found in '%s': 
\"%s\""));
  
! #ifdef FEAT_GUI_MAC
  EXTERN short disallow_gui     INIT(= FALSE);
  #endif
  
*** ../vim-8.0.1235/src/gui.c   2017-10-28 19:23:05.715000423 +0200
--- src/gui.c   2017-10-28 20:52:48.666019181 +0200
***************
*** 37,43 ****
  static void gui_set_bg_color(char_u *name);
  static win_T *xy2win(int x, int y);
  
! #if defined(UNIX) && !defined(MACOS_X) && !defined(__APPLE__)
  # define MAY_FORK
  static void gui_do_fork(void);
  
--- 37,43 ----
  static void gui_set_bg_color(char_u *name);
  static win_T *xy2win(int x, int y);
  
! #if defined(UNIX) && !defined(FEAT_GUI_MAC)
  # define MAY_FORK
  static void gui_do_fork(void);
  
***************
*** 2520,2526 ****
            /* Draw a composing char on top of the previous char. */
            if (comping && sep_comp)
            {
! #  if (defined(__APPLE_CC__) || defined(__MRC__)) && TARGET_API_MAC_CARBON
                /* Carbon ATSUI autodraws composing char over previous char */
                gui_mch_draw_string(gui.row, scol, s + i, cl,
                                                    draw_flags | DRAW_TRANSP);
--- 2520,2526 ----
            /* Draw a composing char on top of the previous char. */
            if (comping && sep_comp)
            {
! #  if defined(__APPLE_CC__) && TARGET_API_MAC_CARBON
                /* Carbon ATSUI autodraws composing char over previous char */
                gui_mch_draw_string(gui.row, scol, s + i, cl,
                                                    draw_flags | DRAW_TRANSP);
*** ../vim-8.0.1235/src/gui_mac.c       2017-09-22 15:20:27.736148641 +0200
--- src/gui_mac.c       2017-10-28 20:52:48.670019153 +0200
***************
*** 267,275 ****
  /*  {XK_Help,         '%', '1'}, */
  /*  {XK_Undo,         '&', '8'}, */
  /*  {XK_BackSpace,    'k', 'b'}, */
! #ifndef MACOS_X
!     {vk_Delete,               'k', 'b'},
! #endif
      {vk_Insert,               'k', 'I'},
      {vk_FwdDelete,    'k', 'D'},
      {vk_Home,         'k', 'h'},
--- 267,273 ----
  /*  {XK_Help,         '%', '1'}, */
  /*  {XK_Undo,         '&', '8'}, */
  /*  {XK_BackSpace,    'k', 'b'}, */
! /*  {vk_Delete,               'k', 'b'}, */
      {vk_Insert,               'k', 'I'},
      {vk_FwdDelete,    'k', 'D'},
      {vk_Home,         'k', 'h'},
*** ../vim-8.0.1235/src/if_python.c     2017-09-16 20:54:47.102560387 +0200
--- src/if_python.c     2017-10-28 20:52:48.670019153 +0200
***************
*** 70,79 ****
  # undef PY_SSIZE_T_CLEAN
  #endif
  
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
- # include "macglue.h"
- # include <CodeFragments.h>
- #endif
  #undef main /* Defined in python.h - aargh */
  #undef HAVE_FCNTL_H /* Clash with os_win32.h */
  
--- 70,75 ----
***************
*** 948,958 ****
        Py_NoSiteFlag++;
  #endif
  
- #if !defined(MACOS) || defined(MACOS_X_UNIX)
        Py_Initialize();
- #else
-       PyMac_Initialize();
- #endif
  
  #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
        /* 'import site' explicitly. */
--- 944,950 ----
***************
*** 1024,1032 ****
  #ifndef PY_CAN_RECURSE
      static int                recursive = 0;
  #endif
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
-     GrafPtr           oldPort;
- #endif
  #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
      char              *saved_locale;
  #endif
--- 1016,1021 ----
***************
*** 1045,1056 ****
      if (python_end_called)
        return;
  
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
-     GetPort(&oldPort);
-     /* Check if the Python library is available */
-     if ((Ptr)PyMac_Initialize == (Ptr)kUnresolvedCFragSymbolAddress)
-       goto theend;
- #endif
      if (Python_Init())
        goto theend;
  
--- 1034,1039 ----
***************
*** 1099,1107 ****
  
      Python_Lock_Vim();                    /* enter vim */
      PythonIO_Flush();
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
-     SetPort(oldPort);
- #endif
  
  theend:
  #ifndef PY_CAN_RECURSE
--- 1082,1087 ----
*** ../vim-8.0.1235/src/if_python3.c    2017-09-16 20:54:47.102560387 +0200
--- src/if_python3.c    2017-10-28 20:52:48.670019153 +0200
***************
*** 74,83 ****
  
  #include <Python.h>
  
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
- # include "macglue.h"
- # include <CodeFragments.h>
- #endif
  #undef main /* Defined in python.h - aargh */
  #undef HAVE_FCNTL_H /* Clash with os_win32.h */
  
--- 74,79 ----
***************
*** 871,881 ****
  
        PyImport_AppendInittab("vim", Py3Init_vim);
  
- #if !defined(MACOS) || defined(MACOS_X_UNIX)
        Py_Initialize();
! #else
!       PyMac_Initialize();
! #endif
        /* Initialise threads, and below save the state using
         * PyEval_SaveThread.  Without the call to PyEval_SaveThread, thread
         * specific state (such as the system trace hook), will be lost
--- 867,874 ----
  
        PyImport_AppendInittab("vim", Py3Init_vim);
  
        Py_Initialize();
! 
        /* Initialise threads, and below save the state using
         * PyEval_SaveThread.  Without the call to PyEval_SaveThread, thread
         * specific state (such as the system trace hook), will be lost
***************
*** 929,937 ****
      static void
  DoPyCommand(const char *cmd, rangeinitializer init_range, runner run, void 
*arg)
  {
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
-     GrafPtr           oldPort;
- #endif
  #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
      char              *saved_locale;
  #endif
--- 922,927 ----
***************
*** 942,953 ****
      if (python_end_called)
        goto theend;
  
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
-     GetPort(&oldPort);
-     /* Check if the Python library is available */
-     if ((Ptr)PyMac_Initialize == (Ptr)kUnresolvedCFragSymbolAddress)
-       goto theend;
- #endif
      if (Python3_Init())
        goto theend;
  
--- 932,937 ----
***************
*** 992,1000 ****
  
      Python_Lock_Vim();                    /* enter vim */
      PythonIO_Flush();
- #if defined(MACOS) && !defined(MACOS_X_UNIX)
-     SetPort(oldPort);
- #endif
  
  theend:
      return;       /* keeps lint happy */
--- 976,981 ----
*** ../vim-8.0.1235/src/if_ruby.c       2017-09-26 21:21:39.974051309 +0200
--- src/if_ruby.c       2017-10-28 20:52:48.670019153 +0200
***************
*** 127,133 ****
  #undef _
  
  /* T_DATA defined both by Ruby and Mac header files, hack around it... */
! #if defined(MACOS_X_UNIX) || defined(macintosh)
  # define __OPENTRANSPORT__
  # define __OPENTRANSPORTPROTOCOL__
  # define __OPENTRANSPORTPROVIDERS__
--- 127,133 ----
  #undef _
  
  /* T_DATA defined both by Ruby and Mac header files, hack around it... */
! #if defined(MACOS_X)
  # define __OPENTRANSPORT__
  # define __OPENTRANSPORTPROTOCOL__
  # define __OPENTRANSPORTPROVIDERS__
***************
*** 251,257 ****
  # endif
  # define rb_lastline_get                      dll_rb_lastline_get
  # define rb_lastline_set                      dll_rb_lastline_set
! # define rb_load_protect                      dll_rb_load_protect
  # ifndef RUBY19_OR_LATER
  #  define rb_num2long                 dll_rb_num2long
  # endif
--- 251,258 ----
  # endif
  # define rb_lastline_get                      dll_rb_lastline_get
  # define rb_lastline_set                      dll_rb_lastline_set
! # define rb_protect                   dll_rb_protect
! # define rb_load                      dll_rb_load
  # ifndef RUBY19_OR_LATER
  #  define rb_num2long                 dll_rb_num2long
  # endif
***************
*** 376,382 ****
  # endif
  static VALUE (*dll_rb_lastline_get) (void);
  static void (*dll_rb_lastline_set) (VALUE);
! static void (*dll_rb_load_protect) (VALUE, int, int*);
  static long (*dll_rb_num2long) (VALUE);
  static unsigned long (*dll_rb_num2ulong) (VALUE);
  static VALUE (*dll_rb_obj_alloc) (VALUE);
--- 377,384 ----
  # endif
  static VALUE (*dll_rb_lastline_get) (void);
  static void (*dll_rb_lastline_set) (VALUE);
! static void (*dll_rb_protect) (VALUE (*)(VALUE), int, int*);
! static void (*dll_rb_load) (VALUE, int);
  static long (*dll_rb_num2long) (VALUE);
  static unsigned long (*dll_rb_num2ulong) (VALUE);
  static VALUE (*dll_rb_obj_alloc) (VALUE);
***************
*** 568,574 ****
  # endif
      {"rb_lastline_get", (RUBY_PROC*)&dll_rb_lastline_get},
      {"rb_lastline_set", (RUBY_PROC*)&dll_rb_lastline_set},
!     {"rb_load_protect", (RUBY_PROC*)&dll_rb_load_protect},
      {"rb_num2long", (RUBY_PROC*)&dll_rb_num2long},
      {"rb_num2ulong", (RUBY_PROC*)&dll_rb_num2ulong},
      {"rb_obj_alloc", (RUBY_PROC*)&dll_rb_obj_alloc},
--- 570,577 ----
  # endif
      {"rb_lastline_get", (RUBY_PROC*)&dll_rb_lastline_get},
      {"rb_lastline_set", (RUBY_PROC*)&dll_rb_lastline_set},
!     {"rb_protect", (RUBY_PROC*)&dll_rb_protect},
!     {"rb_load", (RUBY_PROC*)&dll_rb_load},
      {"rb_num2long", (RUBY_PROC*)&dll_rb_num2long},
      {"rb_num2ulong", (RUBY_PROC*)&dll_rb_num2ulong},
      {"rb_obj_alloc", (RUBY_PROC*)&dll_rb_obj_alloc},
***************
*** 831,837 ****
  
      if (ensure_ruby_initialized())
      {
!       rb_load_protect(rb_str_new2((char *) eap->arg), 0, &state);
        if (state) error_print(state);
      }
  }
--- 834,841 ----
  
      if (ensure_ruby_initialized())
      {
!       rb_protect((VALUE (*)(VALUE))rb_load, rb_str_new2((char *)eap->arg),
!                                                                      &state);
        if (state) error_print(state);
      }
  }
*** ../vim-8.0.1235/src/keymap.h        2017-07-07 13:32:10.866905242 +0200
--- src/keymap.h        2017-10-28 20:52:48.670019153 +0200
***************
*** 479,485 ****
  #define MOD_MASK_2CLICK           0x20        /* use MOD_MASK_MULTI_CLICK */
  #define MOD_MASK_3CLICK           0x40        /* use MOD_MASK_MULTI_CLICK */
  #define MOD_MASK_4CLICK           0x60        /* use MOD_MASK_MULTI_CLICK */
! #ifdef MACOS
  # define MOD_MASK_CMD     0x80
  #endif
  
--- 479,485 ----
  #define MOD_MASK_2CLICK           0x20        /* use MOD_MASK_MULTI_CLICK */
  #define MOD_MASK_3CLICK           0x40        /* use MOD_MASK_MULTI_CLICK */
  #define MOD_MASK_4CLICK           0x60        /* use MOD_MASK_MULTI_CLICK */
! #ifdef MACOS_X
  # define MOD_MASK_CMD     0x80
  #endif
  
*** ../vim-8.0.1235/src/macros.h        2017-08-02 22:07:08.450378993 +0200
--- src/macros.h        2017-10-28 20:52:48.670019153 +0200
***************
*** 209,226 ****
  # define mch_lstat(n, p)      mch_stat((n), (p))
  #endif
  
! #ifdef MACOS_CLASSIC
! /* MacOS classic doesn't support perm but MacOS X does. */
! # define mch_open(n, m, p)    open((n), (m))
! #else
! # ifdef VMS
  /*
   * It is possible to force some record format with:
   * #  define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p)), "rat=cr", 
"rfm=stmlf", "mrs=0")
   * but it is not recommended, because it can destroy indexes etc.
   */
! #  define mch_open(n, m, p)   open(vms_fixfilename(n), (m), (p))
! # endif
  #endif
  
  /* mch_open_rw(): invoke mch_open() with third argument for user R/W. */
--- 209,221 ----
  # define mch_lstat(n, p)      mch_stat((n), (p))
  #endif
  
! #ifdef VMS
  /*
   * It is possible to force some record format with:
   * #  define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p)), "rat=cr", 
"rfm=stmlf", "mrs=0")
   * but it is not recommended, because it can destroy indexes etc.
   */
! # define mch_open(n, m, p)    open(vms_fixfilename(n), (m), (p))
  #endif
  
  /* mch_open_rw(): invoke mch_open() with third argument for user R/W. */
***************
*** 266,272 ****
   * PTR2CHAR(): get character from pointer.
   */
  #ifdef FEAT_MBYTE
! /* Get the length of the character p points to */
  # define MB_PTR2LEN(p)            (has_mbyte ? (*mb_ptr2len)(p) : 1)
  /* Advance multi-byte pointer, skip over composing chars. */
  # define MB_PTR_ADV(p)            p += has_mbyte ? (*mb_ptr2len)(p) : 1
--- 261,267 ----
   * PTR2CHAR(): get character from pointer.
   */
  #ifdef FEAT_MBYTE
! /* Get the length of the character p points to, including composing chars */
  # define MB_PTR2LEN(p)            (has_mbyte ? (*mb_ptr2len)(p) : 1)
  /* Advance multi-byte pointer, skip over composing chars. */
  # define MB_PTR_ADV(p)            p += has_mbyte ? (*mb_ptr2len)(p) : 1
*** ../vim-8.0.1235/src/main.c  2017-10-26 14:28:25.944144974 +0200
--- src/main.c  2017-10-28 20:52:48.670019153 +0200
***************
*** 299,305 ****
        params.want_full_screen = FALSE;
  #endif
  
! #if defined(FEAT_GUI_MAC) && defined(MACOS_X_UNIX)
      /* When the GUI is started from Finder, need to display messages in a
       * message box.  isatty(2) returns TRUE anyway, thus we need to check the
       * name to know we're not started from a terminal. */
--- 299,305 ----
        params.want_full_screen = FALSE;
  #endif
  
! #if defined(FEAT_GUI_MAC) && defined(MACOS_X_DARWIN)
      /* When the GUI is started from Finder, need to display messages in a
       * message box.  isatty(2) returns TRUE anyway, thus we need to check the
       * name to know we're not started from a terminal. */
***************
*** 927,939 ****
      qnx_init();               /* PhAttach() for clipboard, (and gui) */
  #endif
  
- #ifdef MAC_OS_CLASSIC
-     /* Prepare for possibly starting GUI sometime */
-     /* Macintosh needs this before any memory is allocated. */
-     gui_prepare(&paramp->argc, paramp->argv);
-     TIME_MSG("GUI prepared");
- #endif
- 
      /* Init the table of Normal mode commands. */
      init_normal_cmds();
  
--- 927,932 ----
***************
*** 984,990 ****
  #ifdef FEAT_SUN_WORKSHOP
      findYourself(paramp->argv[0]);
  #endif
! #if defined(FEAT_GUI) && !defined(MAC_OS_CLASSIC)
      /* Prepare for possibly starting GUI sometime */
      gui_prepare(&paramp->argc, paramp->argv);
      TIME_MSG("GUI prepared");
--- 977,983 ----
  #ifdef FEAT_SUN_WORKSHOP
      findYourself(paramp->argv[0]);
  #endif
! #if defined(FEAT_GUI)
      /* Prepare for possibly starting GUI sometime */
      gui_prepare(&paramp->argc, paramp->argv);
      TIME_MSG("GUI prepared");
***************
*** 1724,1730 ****
  
      initstr = gettail((char_u *)parmp->argv[0]);
  
! #ifdef MACOS_X_UNIX
      /* An issue has been seen when launching Vim in such a way that
       * $PWD/$ARGV[0] or $ARGV[0] is not the absolute path to the
       * executable or a symbolic link of it. Until this issue is resolved
--- 1717,1723 ----
  
      initstr = gettail((char_u *)parmp->argv[0]);
  
! #ifdef FEAT_GUI_MAC
      /* An issue has been seen when launching Vim in such a way that
       * $PWD/$ARGV[0] or $ARGV[0] is not the absolute path to the
       * executable or a symbolic link of it. Until this issue is resolved
***************
*** 2619,2625 ****
  #if defined(HAS_SWAP_EXISTS_ACTION)
      check_swap_exists_action();
  #endif
! #if !(defined(AMIGA) || defined(MACOS))
      /*
       * Close stdin and dup it from stderr.  Required for GPM to work
       * properly, and for running external commands.
--- 2612,2618 ----
  #if defined(HAS_SWAP_EXISTS_ACTION)
      check_swap_exists_action();
  #endif
! #if !(defined(AMIGA) || defined(MACOS_X))
      /*
       * Close stdin and dup it from stderr.  Required for GPM to work
       * properly, and for running external commands.
*** ../vim-8.0.1235/src/mbyte.c 2017-10-15 22:56:45.763420554 +0200
--- src/mbyte.c 2017-10-28 20:52:48.670019153 +0200
***************
*** 105,111 ****
  # include <X11/Intrinsic.h>
  #endif
  #ifdef X_LOCALE
! #include <X11/Xlocale.h>
  #endif
  
  #if defined(FEAT_GUI_GTK) && defined(FEAT_XIM)
--- 105,114 ----
  # include <X11/Intrinsic.h>
  #endif
  #ifdef X_LOCALE
! # include <X11/Xlocale.h>
! # if !defined(HAVE_MBLEN) && !defined(mblen)
! #  define mblen _Xmblen
! # endif
  #endif
  
  #if defined(FEAT_GUI_GTK) && defined(FEAT_XIM)
***************
*** 415,421 ****
      {"euccn",         IDX_EUC_CN},
      {"gb2312",                IDX_EUC_CN},
      {"euctw",         IDX_EUC_TW},
! #if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS)
      {"japan",         IDX_CP932},
      {"korea",         IDX_CP949},
      {"prc",           IDX_CP936},
--- 418,424 ----
      {"euccn",         IDX_EUC_CN},
      {"gb2312",                IDX_EUC_CN},
      {"euctw",         IDX_EUC_TW},
! #if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS_X)
      {"japan",         IDX_CP932},
      {"korea",         IDX_CP949},
      {"prc",           IDX_CP936},
***************
*** 516,522 ****
      int               n;
      int               enc_dbcs_new = 0;
  #if defined(USE_ICONV) && !defined(WIN3264) && !defined(WIN32UNIX) \
!       && !defined(MACOS)
  # define LEN_FROM_CONV
      vimconv_T vimconv;
      char_u    *p;
--- 519,525 ----
      int               n;
      int               enc_dbcs_new = 0;
  #if defined(USE_ICONV) && !defined(WIN3264) && !defined(WIN32UNIX) \
!       && !defined(MACOS_CONVERT)
  # define LEN_FROM_CONV
      vimconv_T vimconv;
      char_u    *p;
***************
*** 711,717 ****
             * API */
            n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1;
  #else
! # if defined(MACOS) || defined(__amigaos4__) || defined(__ANDROID__)
            /*
             * if mblen() is not available, character which MSB is turned on
             * are treated as leading byte character. (note : This assumption
--- 714,721 ----
             * API */
            n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1;
  #else
! # if defined(__amigaos4__) || defined(__ANDROID__) || \
!                                  !(defined(HAVE_MBLEN) || defined(X_LOCALE))
            /*
             * if mblen() is not available, character which MSB is turned on
             * are treated as leading byte character. (note : This assumption
***************
*** 720,737 ****
            n = (i & 0x80) ? 2 : 1;
  # else
            char buf[MB_MAXBYTES + 1];
! # ifdef X_LOCALE
! #  ifndef mblen
! #   define mblen _Xmblen
! #  endif
! # endif
            if (i == NUL)       /* just in case mblen() can't handle "" */
                n = 1;
            else
            {
                buf[0] = i;
                buf[1] = 0;
! #ifdef LEN_FROM_CONV
                if (vimconv.vc_type != CONV_NONE)
                {
                    /*
--- 724,737 ----
            n = (i & 0x80) ? 2 : 1;
  # else
            char buf[MB_MAXBYTES + 1];
! 
            if (i == NUL)       /* just in case mblen() can't handle "" */
                n = 1;
            else
            {
                buf[0] = i;
                buf[1] = 0;
! #  ifdef LEN_FROM_CONV
                if (vimconv.vc_type != CONV_NONE)
                {
                    /*
***************
*** 748,754 ****
                        n = 2;
                }
                else
! #endif
                {
                    /*
                     * mblen() should return -1 for invalid (means the leading
--- 748,754 ----
                        n = 2;
                }
                else
! #  endif
                {
                    /*
                     * mblen() should return -1 for invalid (means the leading
***************
*** 918,924 ****
                unsigned char tb = trail;
  
                /* convert process code to JIS */
! # if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS)
                /* process code is SJIS */
                if (lb <= 0x9f)
                    lb = (lb - 0x81) * 2 + 0x21;
--- 918,924 ----
                unsigned char tb = trail;
  
                /* convert process code to JIS */
! # if defined(WIN3264) || defined(WIN32UNIX) || defined(MACOS_X)
                /* process code is SJIS */
                if (lb <= 0x9f)
                    lb = (lb - 0x81) * 2 + 0x21;
***************
*** 6536,6542 ****
        vcp->vc_cpto = to_is_utf8 ? 0 : encname2codepage(to);
      }
  #endif
! #ifdef MACOS_X
      else if ((from_prop & ENC_MACROMAN) && (to_prop & ENC_LATIN1))
      {
        vcp->vc_type = CONV_MAC_LATIN1;
--- 6536,6542 ----
        vcp->vc_cpto = to_is_utf8 ? 0 : encname2codepage(to);
      }
  #endif
! #ifdef MACOS_CONVERT
      else if ((from_prop & ENC_MACROMAN) && (to_prop & ENC_LATIN1))
      {
        vcp->vc_type = CONV_MAC_LATIN1;
*** ../vim-8.0.1235/src/message.c       2017-10-24 21:49:32.230837763 +0200
--- src/message.c       2017-10-28 20:52:48.670019153 +0200
***************
*** 2660,2670 ****
        if (!(silent_mode && p_verbose == 0))
        {
            /* NL --> CR NL translation (for Unix, not for "--version") */
-           /* NL --> CR translation (for Mac) */
            p = &buf[0];
            if (*s == '\n' && !info_message)
                *p++ = '\r';
! #if defined(USE_CR) && !defined(MACOS_X_UNIX)
            else
  #endif
                *p++ = *s;
--- 2660,2669 ----
        if (!(silent_mode && p_verbose == 0))
        {
            /* NL --> CR NL translation (for Unix, not for "--version") */
            p = &buf[0];
            if (*s == '\n' && !info_message)
                *p++ = '\r';
! #if defined(USE_CR)
            else
  #endif
                *p++ = *s;
***************
*** 3005,3011 ****
       * On Mac, when started from Finder, stderr is the console. */
      if (
  # ifdef UNIX
! #  ifdef MACOS_X_UNIX
            (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
  #  else
            isatty(2)
--- 3004,3010 ----
       * On Mac, when started from Finder, stderr is the console. */
      if (
  # ifdef UNIX
! #  ifdef MACOS_X
            (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
  #  else
            isatty(2)
***************
*** 3072,3078 ****
       * On Mac, when started from Finder, stderr is the console. */
      if (
  #  ifdef UNIX
! #   ifdef MACOS_X_UNIX
            (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
  #   else
            isatty(2)
--- 3071,3077 ----
       * On Mac, when started from Finder, stderr is the console. */
      if (
  #  ifdef UNIX
! #   ifdef MACOS_X
            (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0)
  #   else
            isatty(2)
*** ../vim-8.0.1235/src/misc1.c 2017-10-26 22:04:00.186638048 +0200
--- src/misc1.c 2017-10-28 20:52:48.674019126 +0200
***************
*** 4334,4345 ****
            }
  
            /* remove trailing path separator */
- #ifndef MACOS_CLASSIC
-           /* With MacOS path (with  colons) the final colon is required */
-           /* to avoid confusion between absolute and relative path */
            if (pend > p && after_pathsep(p, pend))
                --pend;
- #endif
  
  #ifdef MACOS_X
            if (p == exe_name || p == p_hf)
--- 4334,4341 ----
***************
*** 4499,4507 ****
      expand_T  *xp UNUSED,
      int               idx)
  {
! # if defined(AMIGA) || defined(__MRC__) || defined(__SC__)
      /*
!      * No environ[] on the Amiga and on the Mac (using MPW).
       */
      return NULL;
  # else
--- 4495,4503 ----
      expand_T  *xp UNUSED,
      int               idx)
  {
! # if defined(AMIGA)
      /*
!      * No environ[] on the Amiga.
       */
      return NULL;
  # else
***************
*** 10996,11004 ****
        {
            char_u      *t = backslash_halve_save(p);
  
- #if defined(MACOS_CLASSIC)
-           slash_to_colon(t);
- #endif
            /* When EW_NOTFOUND is used, always add files and dirs.  Makes
             * "vim c:/" work. */
            if (flags & EW_NOTFOUND)
--- 10992,10997 ----
*** ../vim-8.0.1235/src/misc2.c 2017-10-23 21:53:25.865975578 +0200
--- src/misc2.c 2017-10-28 20:52:48.674019126 +0200
***************
*** 2202,2208 ****
      {MOD_MASK_MULTI_CLICK,    MOD_MASK_2CLICK,        (char_u)'2'},
      {MOD_MASK_MULTI_CLICK,    MOD_MASK_3CLICK,        (char_u)'3'},
      {MOD_MASK_MULTI_CLICK,    MOD_MASK_4CLICK,        (char_u)'4'},
! #ifdef MACOS
      {MOD_MASK_CMD,            MOD_MASK_CMD,           (char_u)'D'},
  #endif
      /* 'A' must be the last one */
--- 2202,2208 ----
      {MOD_MASK_MULTI_CLICK,    MOD_MASK_2CLICK,        (char_u)'2'},
      {MOD_MASK_MULTI_CLICK,    MOD_MASK_3CLICK,        (char_u)'3'},
      {MOD_MASK_MULTI_CLICK,    MOD_MASK_4CLICK,        (char_u)'4'},
! #ifdef MACOS_X
      {MOD_MASK_CMD,            MOD_MASK_CMD,           (char_u)'D'},
  #endif
      /* 'A' must be the last one */
***************
*** 2927,2933 ****
  {
      int       modifiers = *modp;
  
! #ifdef MACOS
      /* Command-key really special, no fancynest */
      if (!(modifiers & MOD_MASK_CMD))
  #endif
--- 2927,2933 ----
  {
      int       modifiers = *modp;
  
! #ifdef MACOS_X
      /* Command-key really special, no fancynest */
      if (!(modifiers & MOD_MASK_CMD))
  #endif
***************
*** 2954,2960 ****
        if (key == 0)
            key = K_ZERO;
      }
! #ifdef MACOS
      /* Command-key really special, no fancynest */
      if (!(modifiers & MOD_MASK_CMD))
  #endif
--- 2954,2960 ----
        if (key == 0)
            key = K_ZERO;
      }
! #ifdef MACOS_X
      /* Command-key really special, no fancynest */
      if (!(modifiers & MOD_MASK_CMD))
  #endif
***************
*** 5933,5942 ****
  #define EXTRASIZE 5           /* increment to add to env. size */
  
  static int  envsize = -1;     /* current size of environment */
! #ifndef MACOS_CLASSIC
! extern
! #endif
!        char **environ;                /* the global which is your env. */
  
  static int  findenv(char *name); /* look for a name in the env. */
  static int  newenv(void);     /* copy env. from stack to heap */
--- 5933,5939 ----
  #define EXTRASIZE 5           /* increment to add to env. size */
  
  static int  envsize = -1;     /* current size of environment */
! extern char **environ;                /* the global which is your env. */
  
  static int  findenv(char *name); /* look for a name in the env. */
  static int  newenv(void);     /* copy env. from stack to heap */
***************
*** 6008,6026 ****
      char    **env, *elem;
      int           i, esize;
  
- #ifdef MACOS
-     /* for Mac a new, empty environment is created */
-     i = 0;
- #else
      for (i = 0; environ[i]; i++)
        ;
! #endif
      esize = i + EXTRASIZE + 1;
      env = (char **)alloc((unsigned)(esize * sizeof (elem)));
      if (env == NULL)
        return -1;
  
- #ifndef MACOS
      for (i = 0; environ[i]; i++)
      {
        elem = (char *)alloc((unsigned)(strlen(environ[i]) + 1));
--- 6005,6018 ----
      char    **env, *elem;
      int           i, esize;
  
      for (i = 0; environ[i]; i++)
        ;
! 
      esize = i + EXTRASIZE + 1;
      env = (char **)alloc((unsigned)(esize * sizeof (elem)));
      if (env == NULL)
        return -1;
  
      for (i = 0; environ[i]; i++)
      {
        elem = (char *)alloc((unsigned)(strlen(environ[i]) + 1));
***************
*** 6029,6035 ****
        env[i] = elem;
        strcpy(elem, environ[i]);
      }
- #endif
  
      env[i] = 0;
      environ = env;
--- 6021,6026 ----
***************
*** 6093,6099 ****
  #if defined(UNIX) || defined(VMS)
      perm = mch_getperm(fname);
  #endif
- #ifndef MACOS_CLASSIC /* TODO: get either mch_writable or mch_access */
      if (
  # ifdef WIN3264
            mch_writable(fname) &&
--- 6084,6089 ----
***************
*** 6104,6110 ****
  # endif
            mch_access((char *)fname, W_OK) == 0
         )
- #endif
      {
        ++retval;
        if (mch_isdir(fname))
--- 6094,6099 ----
*** ../vim-8.0.1235/src/option.c        2017-10-15 13:34:55.897456845 +0200
--- src/option.c        2017-10-28 20:52:48.674019126 +0200
***************
*** 510,516 ****
  #endif
                                            (char_u *)0L} SCRIPTID_INIT},
      {"antialias",   "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
! #if defined(FEAT_GUI) && defined(MACOS_X)
                            (char_u *)&p_antialias, PV_NONE,
                            {(char_u *)FALSE, (char_u *)FALSE}
  #else
--- 510,516 ----
  #endif
                                            (char_u *)0L} SCRIPTID_INIT},
      {"antialias",   "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
! #if defined(FEAT_GUI_MAC)
                            (char_u *)&p_antialias, PV_NONE,
                            {(char_u *)FALSE, (char_u *)FALSE}
  #else
***************
*** 1431,1437 ****
      {"guioptions",  "go",   P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
  #if defined(FEAT_GUI)
                            (char_u *)&p_go, PV_NONE,
! # if defined(UNIX) && !defined(MACOS)
                            {(char_u *)"aegimrLtT", (char_u *)0L}
  # else
                            {(char_u *)"egmrLtT", (char_u *)0L}
--- 1431,1437 ----
      {"guioptions",  "go",   P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
  #if defined(FEAT_GUI)
                            (char_u *)&p_go, PV_NONE,
! # if defined(UNIX) && !defined(FEAT_GUI_MAC)
                            {(char_u *)"aegimrLtT", (char_u *)0L}
  # else
                            {(char_u *)"egmrLtT", (char_u *)0L}
***************
*** 1697,1704 ****
      {"isprint",           "isp",  P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
                            (char_u *)&p_isp, PV_NONE,
                            {
! #if defined(MSWIN) || (defined(MACOS) && !defined(MACOS_X)) \
!               || defined(VMS)
                            (char_u *)"@,~-255",
  #else
  # ifdef EBCDIC
--- 1697,1703 ----
      {"isprint",           "isp",  P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
                            (char_u *)&p_isp, PV_NONE,
                            {
! #if defined(MSWIN) || defined(VMS)
                            (char_u *)"@,~-255",
  #else
  # ifdef EBCDIC
***************
*** 1989,1995 ****
  #if defined(MSWIN)
                                (char_u *)"popup",
  #else
! # if defined(MACOS)
                                (char_u *)"popup_setpos",
  # else
                                (char_u *)"extend",
--- 1988,1994 ----
  #if defined(MSWIN)
                                (char_u *)"popup",
  #else
! # if defined(MACOS_X)
                                (char_u *)"popup_setpos",
  # else
                                (char_u *)"extend",
***************
*** 3650,3656 ****
                options[opt_idx].flags |= P_DEF_ALLOCED;
            }
  
! #if defined(MSWIN) || defined(MACOS) || defined(VMS)
            if (STRCMP(p_enc, "latin1") == 0
  # ifdef FEAT_MBYTE
                    || enc_utf8
--- 3649,3655 ----
                options[opt_idx].flags |= P_DEF_ALLOCED;
            }
  
! #if defined(MSWIN) || defined(MACOS_X) || defined(VMS)
            if (STRCMP(p_enc, "latin1") == 0
  # ifdef FEAT_MBYTE
                    || enc_utf8
*** ../vim-8.0.1235/src/os_mac.h        2016-08-29 22:42:20.000000000 +0200
--- src/os_mac.h        2017-10-28 20:52:48.674019126 +0200
***************
*** 77,83 ****
   */
  /* When compiled under MacOS X (including CARBON version)
   * we use the Unix File path style.  Also when UNIX is defined. */
! # define USE_UNIXFILENAME
  
  
  /*
--- 77,83 ----
   */
  /* When compiled under MacOS X (including CARBON version)
   * we use the Unix File path style.  Also when UNIX is defined. */
! #define USE_UNIXFILENAME
  
  
  /*
***************
*** 94,108 ****
                                       quite fast. Did I forgot to update the
                                       comment */
  
- 
  #define USE_FNAME_CASE                /* make ":e os_Mac.c" open the file in 
its
                                   original case, as "os_mac.c" */
  #define BINARY_FILE_IO
  #define EOL_DEFAULT EOL_MAC
- #ifndef MACOS_X_UNIX          /* I hope that switching these two lines */
- # define USE_CR                       /* does what I want -- BNF */
- # define NO_CONSOLE           /* don't include console mode */
- #endif
  #define HAVE_AVAIL_MEM
  
  #ifndef HAVE_CONFIG_H
--- 94,103 ----
***************
*** 128,165 ****
   */
  
  #ifndef SYS_VIMRC_FILE
! #  define SYS_VIMRC_FILE "$VIM/vimrc"
  #endif
  #ifndef SYS_GVIMRC_FILE
! #  define SYS_GVIMRC_FILE "$VIM/gvimrc"
  #endif
  #ifndef SYS_MENU_FILE
! #  define SYS_MENU_FILE       "$VIMRUNTIME/menu.vim"
  #endif
  #ifndef SYS_OPTWIN_FILE
! #  define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
  #endif
  #ifndef VIM_DEFAULTS_FILE
! #  define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
  #endif
  #ifndef EVIM_FILE
! #  define EVIM_FILE   "$VIMRUNTIME/evim.vim"
  #endif
  
  #ifdef FEAT_GUI
  # ifndef USR_GVIMRC_FILE
! #   define USR_GVIMRC_FILE "~/.gvimrc"
  # endif
  # ifndef GVIMRC_FILE
  #  define GVIMRC_FILE "_gvimrc"
  # endif
  #endif
  #ifndef USR_VIMRC_FILE
! #  define USR_VIMRC_FILE      "~/.vimrc"
  #endif
  
  #ifndef USR_EXRC_FILE
! #  define USR_EXRC_FILE       "~/.exrc"
  #endif
  
  #ifndef VIMRC_FILE
--- 123,160 ----
   */
  
  #ifndef SYS_VIMRC_FILE
! # define SYS_VIMRC_FILE "$VIM/vimrc"
  #endif
  #ifndef SYS_GVIMRC_FILE
! # define SYS_GVIMRC_FILE "$VIM/gvimrc"
  #endif
  #ifndef SYS_MENU_FILE
! # define SYS_MENU_FILE        "$VIMRUNTIME/menu.vim"
  #endif
  #ifndef SYS_OPTWIN_FILE
! # define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
  #endif
  #ifndef VIM_DEFAULTS_FILE
! # define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
  #endif
  #ifndef EVIM_FILE
! # define EVIM_FILE    "$VIMRUNTIME/evim.vim"
  #endif
  
  #ifdef FEAT_GUI
  # ifndef USR_GVIMRC_FILE
! #  define USR_GVIMRC_FILE "~/.gvimrc"
  # endif
  # ifndef GVIMRC_FILE
  #  define GVIMRC_FILE "_gvimrc"
  # endif
  #endif
  #ifndef USR_VIMRC_FILE
! # define USR_VIMRC_FILE       "~/.vimrc"
  #endif
  
  #ifndef USR_EXRC_FILE
! # define USR_EXRC_FILE        "~/.exrc"
  #endif
  
  #ifndef VIMRC_FILE
***************
*** 171,177 ****
  #endif
  
  #ifndef DFLT_HELPFILE
! #  define DFLT_HELPFILE       "$VIMRUNTIME/doc/help.txt"
  #endif
  
  #ifndef FILETYPE_FILE
--- 166,172 ----
  #endif
  
  #ifndef DFLT_HELPFILE
! # define DFLT_HELPFILE        "$VIMRUNTIME/doc/help.txt"
  #endif
  
  #ifndef FILETYPE_FILE
***************
*** 194,205 ****
  #endif
  
  #ifndef SYNTAX_FNAME
! #  define SYNTAX_FNAME        "$VIMRUNTIME/syntax/%s.vim"
  #endif
  
  #ifdef FEAT_VIMINFO
  # ifndef VIMINFO_FILE
! #   define VIMINFO_FILE       "~/.viminfo"
  # endif
  #endif /* FEAT_VIMINFO */
  
--- 189,200 ----
  #endif
  
  #ifndef SYNTAX_FNAME
! # define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
  #endif
  
  #ifdef FEAT_VIMINFO
  # ifndef VIMINFO_FILE
! #  define VIMINFO_FILE        "~/.viminfo"
  # endif
  #endif /* FEAT_VIMINFO */
  
***************
*** 218,224 ****
  #define DFLT_ERRORFILE                "errors.err"
  
  #ifndef DFLT_RUNTIMEPATH
! #  define DFLT_RUNTIMEPATH    
"~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
  #endif
  
  /*
--- 213,219 ----
  #define DFLT_ERRORFILE                "errors.err"
  
  #ifndef DFLT_RUNTIMEPATH
! # define DFLT_RUNTIMEPATH     
"~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
  #endif
  
  /*
***************
*** 226,236 ****
   */
  #define CMDBUFFSIZE 1024      /* size of the command processing buffer */
  
- #if !defined(MACOS_X_UNIX)
- # define MAXPATHL     256             /* Limited by the Pascal Strings */
- # define BASENAMELEN  (32-5-1)        /* length of base of filename */
- #endif
- 
  #ifndef DFLT_MAXMEM
  # define DFLT_MAXMEM  512     /* use up to  512 Kbyte for buffer */
  #endif
--- 221,226 ----
***************
*** 245,256 ****
  #define mch_rename(src, dst) rename(src, dst)
  #define mch_remove(x) unlink((char *)(x))
  #ifndef mch_getenv
! # if defined(__MRC__) || defined(__SC__)
! #  define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
! #  define mch_setenv(name, val, x) setenv((name), (val))
! # elif defined(__APPLE_CC__)
  #  define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
- /*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by 
Dany on Oct 30, 2001 */
  #  define mch_setenv(name, val, x) setenv(name, val, x)
  # else
    /* vim_getenv() is in pty.c */
--- 235,242 ----
  #define mch_rename(src, dst) rename(src, dst)
  #define mch_remove(x) unlink((char *)(x))
  #ifndef mch_getenv
! # if defined(__APPLE_CC__)
  #  define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
  #  define mch_setenv(name, val, x) setenv(name, val, x)
  # else
    /* vim_getenv() is in pty.c */
***************
*** 275,307 ****
   * of ./configure for console MacOS X.
   */
  
! #ifdef MACOS_X_UNIX
! # ifndef SIGPROTOARG
! #  define SIGPROTOARG (int)
! # endif
! # ifndef SIGDEFARG
! #  define SIGDEFARG(s)        (s) int s UNUSED;
! # endif
! # ifndef SIGDUMMYARG
! #  define SIGDUMMYARG 0
! # endif
! # undef  HAVE_AVAIL_MEM
! # ifndef HAVE_CONFIG_H
! #  define RETSIGTYPE void
! #  define SIGRETURN  return
  /*# define USE_SYSTEM */  /* Output ship do debugger :(, but ot compile */
! #  define HAVE_SYS_WAIT_H 1 /* Attempt */
! #  define HAVE_TERMIOS_H 1
! #  define SYS_SELECT_WITH_SYS_TIME 1
! #  define HAVE_SELECT 1
! #  define HAVE_SYS_SELECT_H 1
! #  define HAVE_PUTENV
! #  define HAVE_SETENV
! #  define HAVE_RENAME
! # endif
  #endif
  
! #if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
  # define HAVE_PUTENV
  #endif
  
--- 261,291 ----
   * of ./configure for console MacOS X.
   */
  
! #ifndef SIGPROTOARG
! # define SIGPROTOARG  (int)
! #endif
! #ifndef SIGDEFARG
! # define SIGDEFARG(s) (s) int s UNUSED;
! #endif
! #ifndef SIGDUMMYARG
! # define SIGDUMMYARG  0
! #endif
! #undef  HAVE_AVAIL_MEM
! #ifndef HAVE_CONFIG_H
! # define RETSIGTYPE void
! # define SIGRETURN  return
  /*# define USE_SYSTEM */  /* Output ship do debugger :(, but ot compile */
! # define HAVE_SYS_WAIT_H 1 /* Attempt */
! # define HAVE_TERMIOS_H 1
! # define SYS_SELECT_WITH_SYS_TIME 1
! # define HAVE_SELECT 1
! # define HAVE_SYS_SELECT_H 1
! # define HAVE_PUTENV
! # define HAVE_SETENV
! # define HAVE_RENAME
  #endif
  
! #if !defined(HAVE_CONFIG_H)
  # define HAVE_PUTENV
  #endif
  
*** ../vim-8.0.1235/src/os_macosx.m     2016-08-29 22:42:20.000000000 +0200
--- src/os_macosx.m     2017-10-28 20:52:48.674019126 +0200
***************
*** 8,27 ****
   */
  
  /*
!  * os_macosx.m -- Mac specific things for Mac OS/X.
   */
  
- #ifndef MACOS_X_UNIX
-     Error: MACOS 9 is no longer supported in Vim 7
- #endif
- 
  /* Avoid a conflict for the definition of Boolean between Mac header files and
   * X11 header files. */
  #define NO_X11_INCLUDES
  #define BalloonEval int   /* used in header files */
  
  #include "vim.h"
! #import <Cocoa/Cocoa.h>
  
  
  /*
--- 8,23 ----
   */
  
  /*
!  * os_macosx.m -- Mac specific things for Mac OS X.
   */
  
  /* Avoid a conflict for the definition of Boolean between Mac header files and
   * X11 header files. */
  #define NO_X11_INCLUDES
  #define BalloonEval int   /* used in header files */
  
  #include "vim.h"
! #import <AppKit/AppKit.h>
  
  
  /*
*** ../vim-8.0.1235/src/os_unix.c       2017-10-06 01:07:32.060360673 +0200
--- src/os_unix.c       2017-10-28 20:52:48.674019126 +0200
***************
*** 856,865 ****
   * completely full.
   */
  
- #if defined(HAVE_AVAILABILITYMACROS_H)
- # include <AvailabilityMacros.h>
- #endif
- 
  #ifndef SIGSTKSZ
  # define SIGSTKSZ 8000    /* just a guess of how much stack is needed... */
  #endif
--- 856,861 ----
***************
*** 879,891 ****
      if (signal_stack != NULL)
      {
  # ifdef HAVE_SIGALTSTACK
- #  if defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
-               || MAC_OS_X_VERSION_MAX_ALLOWED <= 1040)
-       /* missing prototype.  Adding it to osdef?.h.in doesn't work, because
-        * "struct sigaltstack" needs to be declared. */
-       extern int sigaltstack(const struct sigaltstack *ss, struct sigaltstack 
*oss);
- #  endif
- 
  #  ifdef HAVE_SS_BASE
        sigstk.ss_base = signal_stack;
  #  else
--- 875,880 ----
*** ../vim-8.0.1235/src/proto.h 2017-07-22 21:11:49.260678364 +0200
--- src/proto.h 2017-10-28 20:52:48.674019126 +0200
***************
*** 213,219 ****
  # endif
  
  # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
! #  if defined(UNIX) || defined(MACOS)
  #   include "pty.pro"
  #  endif
  # endif
--- 213,219 ----
  # endif
  
  # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
! #  if defined(UNIX) || defined(MACOS_X)
  #   include "pty.pro"
  #  endif
  # endif
***************
*** 286,292 ****
  #ifdef MACOS_CONVERT
  # include "os_mac_conv.pro"
  #endif
! #if defined(MACOS_X_UNIX) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI)
  /* functions in os_macosx.m */
  void clip_mch_lose_selection(VimClipboard *cbd);
  int clip_mch_own_selection(VimClipboard *cbd);
--- 286,292 ----
  #ifdef MACOS_CONVERT
  # include "os_mac_conv.pro"
  #endif
! #if defined(MACOS_X_DARWIN) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI)
  /* functions in os_macosx.m */
  void clip_mch_lose_selection(VimClipboard *cbd);
  int clip_mch_own_selection(VimClipboard *cbd);
*** ../vim-8.0.1235/src/pty.c   2017-09-30 20:04:31.636688591 +0200
--- src/pty.c   2017-10-28 20:52:48.674019126 +0200
***************
*** 89,95 ****
  # include <sys/ptem.h>
  #endif
  
! #if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS)
  # include <sys/ioctl.h>
  #endif
  
--- 89,95 ----
  # include <sys/ptem.h>
  #endif
  
! #if !defined(SUN_SYSTEM) && !defined(VMS)
  # include <sys/ioctl.h>
  #endif
  
***************
*** 379,399 ****
      {
        for (d = PTYRANGE1; (p[1] = *d) != '\0'; d++)
        {
- #if !defined(MACOS) || defined(USE_CARBONIZED)
            if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_EXTRA, 0)) == -1)
- #else
-           if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_EXTRA)) == -1)
- #endif
                continue;
            q[0] = *l;
            q[1] = *d;
- #ifndef MACOS
            if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK))
            {
                close(f);
                continue;
            }
- #endif
  #if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
            /* Hack to ensure that the slave side of the pty is
             * unused. May not work in anything other than SunOS4.1
--- 379,393 ----
*** ../vim-8.0.1235/src/structs.h       2017-09-24 16:24:28.624560207 +0200
--- src/structs.h       2017-10-28 20:52:48.678019098 +0200
***************
*** 969,987 ****
  # else
  #  if defined(MACOS_X)
  #   include <sys/errno.h>
! #   define EILSEQ ENOENT /* MacOS X does not have EILSEQ */
  typedef struct _iconv_t *iconv_t;
  #  else
! #   if defined(MACOS_CLASSIC)
! typedef struct _iconv_t *iconv_t;
! #    define EINVAL    22
! #    define E2BIG     7
! #    define ENOENT    2
! #    define EFAULT    14
! #    define EILSEQ    123
! #   else
! #    include <errno.h>
! #   endif
  #  endif
  typedef void *iconv_t;
  # endif
--- 969,980 ----
  # else
  #  if defined(MACOS_X)
  #   include <sys/errno.h>
! #   ifndef EILSEQ
! #    define EILSEQ ENOENT /* Early MacOS X does not have EILSEQ */
! #   endif
  typedef struct _iconv_t *iconv_t;
  #  else
! #   include <errno.h>
  #  endif
  typedef void *iconv_t;
  # endif
*** ../vim-8.0.1235/src/term.c  2017-10-15 21:44:40.353078800 +0200
--- src/term.c  2017-10-28 20:52:48.678019098 +0200
***************
*** 2534,2540 ****
      void
  out_char(unsigned c)
  {
! #if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(MACOS_X_UNIX)
      if (c == '\n')    /* turn LF into CR-LF (CRMOD doesn't seem to do this) */
        out_char('\r');
  #endif
--- 2534,2540 ----
      void
  out_char(unsigned c)
  {
! #if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(MACOS_X)
      if (c == '\n')    /* turn LF into CR-LF (CRMOD doesn't seem to do this) */
        out_char('\r');
  #endif
***************
*** 2554,2560 ****
      static void
  out_char_nf(unsigned c)
  {
! #if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(MACOS_X_UNIX)
      if (c == '\n')    /* turn LF into CR-LF (CRMOD doesn't seem to do this) */
        out_char_nf('\r');
  #endif
--- 2554,2560 ----
      static void
  out_char_nf(unsigned c)
  {
! #if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(MACOS_X)
      if (c == '\n')    /* turn LF into CR-LF (CRMOD doesn't seem to do this) */
        out_char_nf('\r');
  #endif
*** ../vim-8.0.1235/src/termlib.c       2016-08-29 22:42:20.000000000 +0200
--- src/termlib.c       2017-10-28 20:52:48.678019098 +0200
***************
*** 13,19 ****
  #include "vim.h"
  #include "termlib.pro"
  
! #if !defined(AMIGA) && !defined(VMS) && !defined(MACOS)
  # include <sgtty.h>
  #endif
  
--- 13,19 ----
  #include "vim.h"
  #include "termlib.pro"
  
! #if !defined(AMIGA) && !defined(VMS)
  # include <sgtty.h>
  #endif
  
*** ../vim-8.0.1235/src/ui.c    2017-09-23 15:08:13.180518917 +0200
--- src/ui.c    2017-10-28 20:52:48.678019098 +0200
***************
*** 1748,1754 ****
      void
  fill_input_buf(int exit_on_error UNUSED)
  {
! #if defined(UNIX) || defined(VMS) || defined(MACOS_X_UNIX)
      int               len;
      int               try;
      static int        did_read_something = FALSE;
--- 1748,1754 ----
      void
  fill_input_buf(int exit_on_error UNUSED)
  {
! #if defined(UNIX) || defined(VMS) || defined(MACOS_X)
      int               len;
      int               try;
      static int        did_read_something = FALSE;
***************
*** 1772,1778 ****
        return;
      }
  #endif
! #if defined(UNIX) || defined(VMS) || defined(MACOS_X_UNIX)
      if (vim_is_input_buf_full())
        return;
      /*
--- 1772,1778 ----
        return;
      }
  #endif
! #if defined(UNIX) || defined(VMS) || defined(MACOS_X)
      if (vim_is_input_buf_full())
        return;
      /*
*** ../vim-8.0.1235/src/undo.c  2017-08-30 22:00:16.374112596 +0200
--- src/undo.c  2017-10-28 20:52:48.678019098 +0200
***************
*** 1750,1756 ****
      if (!write_ok)
        EMSG2(_("E829: write error in undo file: %s"), file_name);
  
! #if defined(MACOS_CLASSIC) || defined(WIN3264)
      /* Copy file attributes; for systems where this can only be done after
       * closing the file. */
      if (buf->b_ffname != NULL)
--- 1750,1756 ----
      if (!write_ok)
        EMSG2(_("E829: write error in undo file: %s"), file_name);
  
! #if defined(WIN3264)
      /* Copy file attributes; for systems where this can only be done after
       * closing the file. */
      if (buf->b_ffname != NULL)
*** ../vim-8.0.1235/src/version.c       2017-10-28 20:28:18.676167007 +0200
--- src/version.c       2017-10-28 21:04:58.028981914 +0200
***************
*** 3389,3403 ****
  #  endif
  # endif
  #endif
! #ifdef MACOS
! # ifdef MACOS_X
! #  ifdef MACOS_X_UNIX
!     MSG_PUTS(_("\nMacOS X (unix) version"));
! #  else
!     MSG_PUTS(_("\nMacOS X version"));
! #  endif
! #else
!     MSG_PUTS(_("\nMacOS version"));
  # endif
  #endif
  
--- 3391,3401 ----
  #  endif
  # endif
  #endif
! #if defined(MACOS_X)
! # if defined(MACOS_X_DARWIN)
!     MSG_PUTS(_("\nmacOS version"));
! # else
!     MSG_PUTS(_("\nmacOS version w/o darwin feat."));
  # endif
  #endif
  
***************
*** 3530,3538 ****
  #      if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
      MSG_PUTS(_("with Cocoa GUI."));
  #      else
- #       if defined(MACOS)
-     MSG_PUTS(_("with (classic) GUI."));
- #       endif
  #      endif
  #     endif
  #      endif
--- 3528,3533 ----
*** ../vim-8.0.1235/src/vim.h   2017-10-19 18:35:46.094557713 +0200
--- src/vim.h   2017-10-28 20:52:48.678019098 +0200
***************
*** 85,112 ****
  #endif
  
  /*
!  * MACOS_CLASSIC compiling for MacOS prior to MacOS X
!  * MACOS_X_UNIX  compiling for MacOS X (using os_unix.c)
!  * MACOS_X       compiling for MacOS X (using os_unix.c)
!  * MACOS       compiling for either one
   */
! #if defined(macintosh) && !defined(MACOS_CLASSIC)
! # define MACOS_CLASSIC
! #endif
! #if defined(MACOS_X_UNIX)
  # define MACOS_X
- # ifndef HAVE_CONFIG_H
- #  define UNIX
- # endif
- #endif
- #if defined(MACOS_X) || defined(MACOS_CLASSIC)
- # define MACOS
- #endif
- #if defined(MACOS_X) && defined(MACOS_CLASSIC)
-     Error: To compile for both MACOS X and Classic use a Classic Carbon
  #endif
  /* Unless made through the Makefile enforce GUI on Mac */
! #if defined(MACOS) && !defined(HAVE_CONFIG_H)
  # define FEAT_GUI_MAC
  #endif
  
--- 85,99 ----
  #endif
  
  /*
!  * MACOS_X        compiling for Mac OS X
!  * MACOS_X_DARWIN   integrating the darwin feature into MACOS_X
   */
! #if defined(MACOS_X_DARWIN) && !defined(MACOS_X)
  # define MACOS_X
  #endif
  /* Unless made through the Makefile enforce GUI on Mac */
! #if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
! # define UNIX
  # define FEAT_GUI_MAC
  #endif
  
***************
*** 164,186 ****
  #  endif
  # endif
  #endif
! #ifdef MACOS
! # if defined(__POWERPC__) || defined(MACOS_X) || defined(__fourbyteints__) \
!   || defined(__MRC__) || defined(__SC__) || defined(__APPLE_CC__)/* MPW 
Compilers */
! #  define VIM_SIZEOF_INT 4
! # else
! #  define VIM_SIZEOF_INT 2
! # endif
  #endif
  
- 
  /*
   * #defines for optionals and features
   * Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined.
   */
  #include "feature.h"
  
! #if defined(MACOS_X_UNIX)
  # if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD)
  #  define FEAT_CLIPBOARD
  # endif
--- 151,167 ----
  #  endif
  # endif
  #endif
! #if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
! #  define VIM_SIZEOF_INT __SIZEOF_INT__
  #endif
  
  /*
   * #defines for optionals and features
   * Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined.
   */
  #include "feature.h"
  
! #if defined(MACOS_X_DARWIN)
  # if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD)
  #  define FEAT_CLIPBOARD
  # endif
***************
*** 227,233 ****
  #endif
  
  /* The Mac conversion stuff doesn't work under X11. */
! #if defined(FEAT_MBYTE) && defined(MACOS_X)
  # define MACOS_CONVERT
  #endif
  
--- 208,214 ----
  #endif
  
  /* The Mac conversion stuff doesn't work under X11. */
! #if defined(FEAT_MBYTE) && defined(MACOS_X_DARWIN)
  # define MACOS_CONVERT
  #endif
  
***************
*** 297,306 ****
  # include "os_mint.h"
  #endif
  
! #if defined(MACOS)
! # if defined(__MRC__) || defined(__SC__) /* MPW Compilers */
! #  define HAVE_SETENV
! # endif
  # include "os_mac.h"
  #endif
  
--- 278,284 ----
  # include "os_mint.h"
  #endif
  
! #if defined(MACOS_X)
  # include "os_mac.h"
  #endif
  
***************
*** 2358,2366 ****
  # ifdef instr
  #  undef instr
  # endif
!   /* bool may cause trouble on MACOS but is required on a few other systems
!    * and for Perl */
! # if defined(bool) && defined(MACOS) && !defined(FEAT_PERL)
  #  undef bool
  # endif
  
--- 2336,2345 ----
  # ifdef instr
  #  undef instr
  # endif
!   /* bool may cause trouble on some old versions of Mac OS X but is required
!    * on a few other systems and for Perl */
! # if (defined(MACOS_X) && !defined(MAC_OS_X_VERSION_10_6)) \
!                                      && defined(bool) && !defined(FEAT_PERL)
  #  undef bool
  # endif
  
*** ../vim-8.0.1235/src/window.c        2017-10-24 21:49:32.234837736 +0200
--- src/window.c        2017-10-28 20:52:48.678019098 +0200
***************
*** 6364,6370 ****
        /* something failed; use the file name (truncate when too long) */
        vim_strncpy(buf, fname, len - 1);
      }
! #if defined(MACOS_CLASSIC) || defined(MSWIN)
      slash_adjust(buf);
  #endif
      return retval;
--- 6364,6370 ----
        /* something failed; use the file name (truncate when too long) */
        vim_strncpy(buf, fname, len - 1);
      }
! #if defined(MSWIN)
      slash_adjust(buf);
  #endif
      return retval;
*** ../vim-8.0.1235/src/version.c       2017-10-28 20:28:18.676167007 +0200
--- src/version.c       2017-10-28 21:04:58.028981914 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     1236,
  /**/

-- 
ARTHUR: Charge!
   [They all charge with swords drawn towards the RABBIT.  A tremendous twenty
   second fight with Peckinpahish shots and borrowing heavily also on the
   Kung Fu and karate-type films ensues, in which some four KNIGHTS are
   comprehensively killed.]
ARTHUR: Run away!  Run away!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui