Ken Takata wrote:
> >>> > What was the error on FreeBSD? I thought it also suppored Posix. > >>> > >>> https://cirrus-ci.com/task/5566942320001024 > >>> > >>> In file included from os_unix.c:87: > >>> /usr/include/sys/consio.h:262:2: error: unknown type name 'u_short'; did > >>> you mean 'short'? > >>> u_short font_size; > >>> ^ [...] > >>> ^ > >>> fatal error: too many errors emitted, stopping now [-ferror-limit=] > >>> 20 errors generated. > >>> gmake[2]: *** [Makefile:3338: objects/os_unix.o] Error 1 > >>> gmake[2]: Leaving directory '/tmp/cirrus-ci-build/src' > >>> gmake[1]: *** [Makefile:2030: reconfig] Error 2 > >>> gmake[1]: Leaving directory '/tmp/cirrus-ci-build/src' > >>> gmake: *** [Makefile:29: first] Error 2 > >>> Exit status: 2 > >>> > > >>> > I think being specific is OK, thus checking for __FreeBSD__ would be > >>> OK. > >>> > Otherwise we would need a configure check of some kind. > >>> > > >>> > >> > >> If we use __FreeBSD__, maybe we also need to add checks for other BSDs. > >> It seems that "BSD" is defined in sys/param.h, so how about this patch? > >> > >> --- a/src/vim.h > >> +++ b/src/vim.h > >> @@ -36,7 +36,10 @@ > >> Error: configure did not run properly. Check auto/config.log. > >> # endif > >> > >> -# if defined(UNIX) && !defined(MACOS_X) > >> +# ifdef HAVE_SYS_PARAM_H > >> +# include <sys/param.h> > >> +# endif > >> +# if defined(UNIX) && !defined(MACOS_X) && !defined(BSD) > >> // 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 > >> // matter for Vim. > >> > > > > Sorry, this patch doesn't work as expected. This causes warnings on Cygwin > > again. > > `&& !defined(__FreeBSD__)` might be needed. (And maybe similar checks for > > other BSDs?) > > > > How about this? > > diff --git a/src/vim.h b/src/vim.h > --- a/src/vim.h > +++ b/src/vim.h > @@ -36,7 +36,7 @@ > Error: configure did not run properly. Check auto/config.log. > # endif > > -# if defined(UNIX) && !defined(MACOS_X) > +# if defined(__gnu_linux__) || defined(__CYGWIN__) > // 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 > // matter for Vim. > > Defining _XOPEN_SOURCE only on Linux and Cygwin might be enough? That makes sense, since this mechanism is for all kinds of GNU-Linux, but not for BSD-like systems. MacOS is also based on BSD. -- hundred-and-one symptoms of being an internet addict: 132. You come back and check this list every half-hour. /// 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201911281448.xASEmkH7005179%40masaka.moolenaar.net.
