From 7c43f1128d7deb9ecbe5bf747b441c7afcb736ab Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 7 Feb 2025 06:24:17 +0800 Subject: vim-patch:9.1.1081: has('bsd') is true for GNU/Hurd Problem: has('bsd') is true for GNU/Hurd Solution: exclude GNU/Hurd from BSD feature flag (Zhaoming Luo) GNU/Hurd, like Mac OS X, is a BSD-based system. It should exclude has('bsd') feature just like what Mac OS X does. The __GNU__ pre-defined macro indicates it's compiled for GNU/Hurd. closes: vim/vim#16580 https://github.com/vim/vim/commit/a41dfcd55b1744b44a47d2fc3feb5d5f6207a556 Co-authored-by: Zhaoming Luo --- src/nvim/eval/funcs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/nvim/eval/funcs.c') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index c125bd8893..8e83b3d146 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -3075,9 +3075,12 @@ static void f_gettext(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) { static const char *const has_list[] = { -#if defined(BSD) && !defined(__APPLE__) +#if defined(BSD) && !defined(__APPLE__) && !defined(__GNU__) "bsd", #endif +#ifdef __GNU__ + "hurd", +#endif #ifdef __linux__ "linux", #endif -- cgit