Zhaoming Luo, le mer. 05 févr. 2025 09:03:49 +0800, a ecrit: > Please have a look, I hope the semantics are correct :).
That looks alright indeed! Thanks, Samuel > --- > runtime/doc/builtin.txt | 1 + > src/evalfunc.c | 9 ++++++++- > src/testdir/test_functions.vim | 2 ++ > 3 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt > index d7ed7320f..310268b00 100644 > --- a/runtime/doc/builtin.txt > +++ b/runtime/doc/builtin.txt > @@ -12639,6 +12639,7 @@ gui_win32s idem, and Win32s system being > used (Windows 3.1) > haiku Haiku version of Vim. > hangul_input Compiled with Hangul input support. |hangul| > hpux HP-UX version of Vim. > +hurd Hurd version of Vim > iconv Can use iconv() for conversion. > insert_expand Compiled with support for CTRL-X expansion > commands in > Insert mode. (always true) > diff --git a/src/evalfunc.c b/src/evalfunc.c > index d81480b50..27b54b7f0 100644 > --- a/src/evalfunc.c > +++ b/src/evalfunc.c > @@ -6409,7 +6409,7 @@ f_has(typval_T *argvars, typval_T *rettv) > #endif > }, > {"bsd", > -#if defined(BSD) && !defined(MACOS_X) > +#if defined(BSD) && !defined(MACOS_X) && !defined(__GNU__) > 1 > #else > 0 > @@ -6420,6 +6420,13 @@ f_has(typval_T *argvars, typval_T *rettv) > 1 > #else > 0 > +#endif > + }, > + {"hurd", > +#ifdef __GNU__ > + 1 > +#else > + 0 > #endif > }, > {"linux", > diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim > index f80754f0a..ca9137df3 100644 > --- a/src/testdir/test_functions.vim > +++ b/src/testdir/test_functions.vim > @@ -2760,6 +2760,7 @@ func Test_platform_name() > " Is Unix? > call assert_equal(has('bsd'), has('bsd') && has('unix')) > call assert_equal(has('hpux'), has('hpux') && has('unix')) > + call assert_equal(has('hurd'), has('hurd') && has('unix')) > call assert_equal(has('linux'), has('linux') && has('unix')) > call assert_equal(has('mac'), has('mac') && has('unix')) > call assert_equal(has('qnx'), has('qnx') && has('unix')) > @@ -2777,6 +2778,7 @@ func Test_platform_name() > call assert_equal(uname =~? 'QNX', has('qnx')) > call assert_equal(uname =~? 'SunOS', has('sun')) > call assert_equal(uname =~? 'CYGWIN\|MSYS', has('win32unix')) > + call assert_equal(uname =~? 'GNU', has('hurd')) > endif > endfunc > > -- > 2.47.2 > > -- Samuel <c> hiri, le cri ici, c des marrants <c> j'ai un rep ".uglyhackdirectorywithoutacls" ds mon home -+- #ens-mim en stage -+-