patch 9.2.0122: Vim still supports compiling on NeXTSTEP
Commit:
https://github.com/vim/vim/commit/48b913d735a358b1ce70eeb0d13428066451a28b
Author: Christian Brabandt <
c...@256bit.org>
Date: Sun Mar 8 19:48:32 2026 +0000
patch 9.2.0122: Vim still supports compiling on NeXTSTEP
Problem: Vim still supports compiling on NeXTSTEP
Solution: Drop Support (Damien Lejay)
The NeXTSTEP operating system has been obsolete for decades. The
special-case code required to support it adds unnecessary complexity,
preprocessor conditionals, and non-standard workarounds to the codebase.
This commit removes all support for NeXTSTEP, simplifying the code and
build system in several ways:
- Replaced custom configure checks for `union wait` with a standard `AC_CHECK_FUNCS` call for `waitpid`.
- Removed all conditional code that used the non-standard `union wait` for process status, relying solely on a standard `int`.
- Replaced calls to the non-standard `wait4()` function with the POSIX-standard `waitpid()`.
- Cleaned up headers (`os_unix.h`, `os_unixx.h`) to remove NeXT-specific workarounds and macros.
- Removed obsolete NeXT compilation instructions from the INSTALL file.
This change improves maintainability and makes the Unix process handling code more linear and compliant with modern POSIX standards.
related: #18079
closes: #19582
Signed-off-by: Damien Lejay <
dam...@lejay.be>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index db13c27f9..5d122ef41 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -1,4 +1,4 @@
-*version9.txt* For Vim version 9.2. Last change: 2026 Mar 02
+*version9.txt* For Vim version 9.2. Last change: 2026 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52599,6 +52599,7 @@ Other ~
*changed-9.3*
Changed~
-------
+- Support for NeXTStep was dropped with patch v9.2.0122
*added-9.3*
Added ~
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index 23dd30493..d87db7cc5 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -1,4 +1,4 @@
-*vi_diff.txt* For Vim version 9.2. Last change: 2026 Feb 14
+*vi_diff.txt* For Vim version 9.2. Last change: 2026 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1401,6 +1401,6 @@ MS-DOS: | support was dropped with v7.4.1399
MS-Windows XP and Vista: | support was dropped with v9.0.0496
OS/2: | support was dropped with v7.4.1008
RISC OS: | support was dropped with v7.3.0187
-NeXTSTEP: | support was deprecated with v9.1.1727
+NeXTSTEP: | support was dropped with v9.2.0122
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/src/INSTALL b/src/INSTALL
index 79d75842c..ab760cd13 100644
--- a/src/INSTALL
+++ b/src/INSTALL
@@ -45,7 +45,7 @@ To build Vim on Ubuntu from scratch on a clean system using git:
% sudo apt install make
% sudo apt install clang
% sudo apt install libtool-bin
-
+
Build Vim with default features:
% git clone
https://github.com/vim/vim.git
% cd vim/src
@@ -185,13 +185,6 @@ Vim runtime files in /usr. This can be done with:
./configure --prefix=/usr
make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim MAKE="make -e"
-Unix: COMPILING ON NeXT
-
-Add the "-posix" argument to the compiler by using one of these commands:
- setenv CC 'cc -posix' (csh)
- export CC='cc -posix' (sh)
-And run configure with "--disable-motif-check".
-
Unix: LOCAL HEADERS AND LIBRARIES NOT IN /usr/local
Sometimes it is necessary to search different path than /usr/local for locally
diff --git a/src/auto/configure b/src/auto/configure
index 60ea66520..93ee5ea65 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -12300,36 +12300,21 @@ fi
fi
-if test $ac_cv_header_sys_wait_h = no; then
- { printf "%s
" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
-printf %s "checking for sys/wait.h that defines union wait... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/wait.h>
-int
-main (void)
-{
-union wait xx, yy; xx = yy
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes
then :
- { printf "%s
" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s
" "yes" >&6; }
- printf "%s
" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
-
- printf "%s
" "#define HAVE_UNION_WAIT 1" >>confdefs.h
+ printf "%s
" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
-else case e in #(
- e) { printf "%s
" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s
" "no" >&6; } ;;
-esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
+if test "x$ac_cv_func_waitpid" = xyes
+then :
+ printf "%s
" "#define HAVE_WAITPID 1" >>confdefs.h
+
fi
+
ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
if test "x$ac_cv_header_stdint_h" = xyes
then :
diff --git a/src/bufwrite.c b/src/bufwrite.c
index 1a1322dfc..875619537 100644
--- a/src/bufwrite.c
+++ b/src/bufwrite.c
@@ -601,11 +601,7 @@ set_file_time(
tvp[0].tv_usec = 0;
tvp[1].tv_sec = mtime;
tvp[1].tv_usec = 0;
-# ifdef NeXT
- (void)utimes((char *)fname, tvp);
-# else
(void)utimes((char *)fname, (const struct timeval *)&tvp);
-# endif
# endif
# endif
}
diff --git a/src/
config.h.in b/src/
config.h.in
index 22c4a155d..f15d8800c 100644
--- a/src/
config.h.in
+++ b/src/
config.h.in
@@ -311,9 +311,6 @@
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
-/* Define if you have a <sys/wait.h> that is not POSIX.1 compatible. */
-#undef HAVE_UNION_WAIT
-
/* This is currently unused in vim: */
/* Define if you have the ANSI C header files. */
/* #undef STDC_HEADERS */
diff --git a/src/
configure.ac b/src/
configure.ac
index 70ffb8eb2..495c8de40 100644
--- a/src/
configure.ac
+++ b/src/
configure.ac
@@ -3420,17 +3420,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [int x __attribute__((u
AC_HEADER_DIRENT
-dnl If sys/wait.h is not found it might still exist but not be POSIX
-dnl compliant. In that case we define HAVE_UNION_WAIT (for NeXT)
-if test $ac_cv_header_sys_wait_h = no; then
- AC_MSG_CHECKING([for sys/wait.h that defines union wait])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/wait.h>],
- [union wait xx, yy; xx = yy])],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_SYS_WAIT_H)
- AC_DEFINE(HAVE_UNION_WAIT),
- AC_MSG_RESULT(no))
-fi
+AC_CHECK_HEADERS([sys/wait.h])
+AC_CHECK_FUNCS([waitpid])
AC_CHECK_HEADERS(stdint.h stdlib.h string.h \
sys/select.h sys/utsname.h termcap.h fcntl.h \
diff --git a/src/gui.c b/src/gui.c
index 698c7c2b3..edf64368f 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -224,7 +224,7 @@ gui_attempt_start(void)
#ifdef GUI_MAY_FORK
// for waitpid()
-# if defined(HAVE_SYS_WAIT_H) || defined(HAVE_UNION_WAIT)
+# if defined(HAVE_SYS_WAIT_H)
# include <sys/wait.h>
# endif
@@ -280,11 +280,7 @@ gui_do_fork(void)
// The child failed to start the GUI, so the caller must
// continue. There may be more error information written
// to stderr by the child.
-# ifdef __NeXT__
- wait4(pid, &exit_status, 0, (struct rusage *)0);
-# else
waitpid(pid, &exit_status, 0);
-# endif
emsg(_(e_the_child_process_failed_to_start_GUI));
return;
}
diff --git a/src/os_unix.c b/src/os_unix.c
index c7ca383d0..8aeca951c 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -276,11 +276,7 @@ static int did_set_icon = FALSE;
static void may_core_dump(void);
-#ifdef HAVE_UNION_WAIT
-typedef union wait waitstatus;
-#else
typedef int waitstatus;
-#endif
static int WaitForChar(long msec, int *interrupted, int ignore_input);
static int WaitForCharOrMouse(long msec, int *interrupted, int ignore_input);
#ifdef VMS
@@ -541,10 +537,8 @@ mch_chdir(char *path)
#endif
}
-// Why is NeXT excluded here (and not in os_unixx.h)?
#if defined(ECHOE) && defined(ICANON) \
- && (defined(HAVE_TERMIO_H) || defined(HAVE_TERMIOS_H)) \
- && !defined(__NeXT__)
+ && (defined(HAVE_TERMIO_H) || defined(HAVE_TERMIOS_H))
# define NEW_TTY_SYSTEM
#endif
@@ -4660,11 +4654,7 @@ wait4pid(pid_t child, waitstatus *status)
// wait() sometimes hangs for no obvious reason. Use waitpid()
// instead and loop (like the GUI). Also needed for other interfaces,
// they might call system().
-#ifdef __NeXT__
- wait_pid = wait4(child, status, WNOHANG, (struct rusage *)0);
-#else
wait_pid = waitpid(child, status, WNOHANG);
-#endif
if (wait_pid == 0)
{
// Wait for 1 to 10 msec before trying again.
@@ -5075,11 +5065,7 @@ mch_call_shell_fork(
pid_t pid;
pid_t wpid = 0;
pid_t wait_pid = 0;
-# ifdef HAVE_UNION_WAIT
- union wait status;
-# else
int status = -1;
-# endif
int retval = -1;
char **argv = NULL;
char_u *tofree1 = NULL;
@@ -5717,11 +5703,7 @@ mch_call_shell_fork(
* Check if the child still exists, before checking for
* typed characters (otherwise we would lose typeahead).
*/
-# ifdef __NeXT__
- wait_pid = wait4(pid, &status, WNOHANG, (struct rusage *)0);
-# else
wait_pid = waitpid(pid, &status, WNOHANG);
-# endif
if ((wait_pid == (pid_t)-1 && errno == ECHILD)
|| (wait_pid == pid && WIFEXITED(status)))
{
@@ -5796,11 +5778,7 @@ finished:
# endif
got_int = FALSE;
}
-# ifdef __NeXT__
- wait_pid = wait4(pid, &status, WNOHANG, (struct rusage *)0);
-# else
wait_pid = waitpid(pid, &status, WNOHANG);
-# endif
if ((wait_pid == (pid_t)-1 && errno == ECHILD)
|| (wait_pid == pid && WIFEXITED(status)))
{
@@ -6295,18 +6273,10 @@ get_signal_name(int sig)
char *
mch_job_status(job_T *job)
{
-# ifdef HAVE_UNION_WAIT
- union wait status;
-# else
int status = -1;
-# endif
pid_t wait_pid = 0;
-# ifdef __NeXT__
- wait_pid = wait4(job->jv_pid, &status, WNOHANG, (struct rusage *)0);
-# else
wait_pid = waitpid(job->jv_pid, &status, WNOHANG);
-# endif
if (wait_pid == -1)
{
int waitpid_errno = errno;
@@ -6352,11 +6322,7 @@ return_dead:
job_T *
mch_detect_ended_job(job_T *job_list)
{
-# ifdef HAVE_UNION_WAIT
- union wait status;
-# else
int status = -1;
-# endif
pid_t wait_pid = 0;
job_T *job;
@@ -6368,11 +6334,7 @@ mch_detect_ended_job(job_T *job_list)
return NULL;
# endif
-# ifdef __NeXT__
- wait_pid = wait4(-1, &status, WNOHANG, (struct rusage *)0);
-# else
wait_pid = waitpid(-1, &status, WNOHANG);
-# endif
if (wait_pid <= 0)
// no process ended
return NULL;
@@ -6445,11 +6407,7 @@ mch_signal_job(job_T *job, char_u *how)
mch_clear_job(job_T *job)
{
// call waitpid because child process may become zombie
-# ifdef __NeXT__
- (void)wait4(job->jv_pid, NULL, WNOHANG, (struct rusage *)0);
-# else
(void)waitpid(job->jv_pid, NULL, WNOHANG);
-# endif
}
#endif
diff --git a/src/os_unix.h b/src/os_unix.h
index 0472b195d..a50739227 100644
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -6,18 +6,6 @@
* Do ":help credits" in Vim to see a list of people who contributed.
*/
-/*
- * NextStep has a problem with configure, undefine a few things:
- */
-#ifdef NeXT
-# ifdef HAVE_UTIME
-# undef HAVE_UTIME
-# endif
-# ifdef HAVE_SYS_UTSNAME_H
-# undef HAVE_SYS_UTSNAME_H
-# endif
-#endif
-
#include <stdio.h>
#include <ctype.h>
@@ -52,10 +40,6 @@
# include <unistd.h>
#endif
-#ifdef HAVE_LIBC_H
-# include <libc.h> // for NeXT
-#endif
-
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h> // defines BSD, if it's a BSD system
#endif
diff --git a/src/os_unixx.h b/src/os_unixx.h
index 485ac07e5..73a21934b 100644
--- a/src/os_unixx.h
+++ b/src/os_unixx.h
@@ -17,24 +17,16 @@
#ifndef USE_SYSTEM // use fork/exec to start the shell
-# if defined(HAVE_SYS_WAIT_H) || defined(HAVE_UNION_WAIT)
+# if defined(HAVE_SYS_WAIT_H)
# include <sys/wait.h>
# endif
# ifndef WEXITSTATUS
-# ifdef HAVE_UNION_WAIT
-# define WEXITSTATUS(stat_val) ((stat_val).w_T.w_Retcode)
-# else
-# define WEXITSTATUS(stat_val) (((stat_val) >> 8) & 0377)
-# endif
+# define WEXITSTATUS(stat_val) (((stat_val) >> 8) & 0377)
# endif
# ifndef WIFEXITED
-# ifdef HAVE_UNION_WAIT
-# define WIFEXITED(stat_val) ((stat_val).w_T.w_Termsig == 0)
-# else
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-# endif
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
# endif
#endif // !USE_SYSTEM
diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h
index cef828725..5831cb1f7 100644
--- a/src/os_vms_conf.h
+++ b/src/os_vms_conf.h
@@ -124,7 +124,6 @@
#undef HAVE_SYS_DIR_H
#undef HAVE_NDIR_H
#undef HAVE_SYS_WAIT_H
-#undef HAVE_UNION_WAIT
#undef HAVE_SYS_SELECT_H
#undef HAVE_SYS_UTSNAME_H
#undef HAVE_SYS_SYSTEMINFO_H
diff --git a/src/version.c b/src/version.c
index 4ad7d6aee..4c34ea9ae 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 122,
/**/
121,
/**/
diff --git a/src/vim.h b/src/vim.h
index 1a38606f7..63cb78088 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -40,22 +40,6 @@
# error configure did not run properly. Check auto/config.log.
# endif
-/*
- * NeXTSTEP / OPENSTEP support deprecation
- *
- * NeXT hardware was discontinued in 1993, and the last OPENSTEP release
- * (4.2) shipped in 1996–1997. No known users remain today.
- *
- * To simplify maintenance, NeXT support is formally deprecated. If you hit
- * this error, please report it to the Vim maintainers.
- *
- * This guard will be removed once the remaining NeXT-specific code paths
- * are deleted in a future release.
- */
-# if defined(NeXT) || defined(__NeXT__)
-# error "NeXTSTEP / OPENSTEP support has been deprecated."
-# endif
-
# if (defined(__linux__) && !defined(__ANDROID__)) || defined(__CYGWIN__) || defined(__GNU__)
// Needed for strptime(). Needs to be done early, since header files can
// include other header files and end up including time.h, where these symbols