On Thu, Jun 21, 2018 at 10:37 AM, Gary Johnson <[email protected]> wrote: > On 2018-06-20, Gary Johnson wrote: >> On 2018-06-20, Bram Moolenaar wrote: >> > Gary Johnson wrote: >> > >> > > When compiling Vim 8.1.89 on an Ubuntu Linux system, I get the >> > > following warning. >> > > >> > > os_unix.c: In function ‘mch_signal_job’: >> > > os_unix.c:5851: warning: implicit declaration of function ‘getpgid’ >> > > >> > > I think that means that os_unixx.h should include something like >> > > this: >> > > >> > > #ifdef HAVE_GETPGID >> > > # include <unistd.h> >> > > #endif >> > > >> > > but I'm not familiar enough with Vim's include strategy to know for >> > > sure. >> > >> > We already have this in os_unix.h: >> > >> > #ifdef HAVE_UNISTD_H >> > # include <unistd.h> >> > #endif >> > >> > Perhaps you can check src/auto/config.log why unistd.h wasn't found. >> > Mine contains: >> > >> > configure:11078: checking unistd.h usability >> > configure:11078: gcc -c -g -Wall -Wextra -Wshadow -Wmissing-prototypes >> > -Wunreachable-code -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 conftest.c >&5 >> > configure:11078: $? = 0 >> > configure:11078: result: yes >> > configure:11078: checking unistd.h presence >> > configure:11078: gcc -E conftest.c >> > configure:11078: $? = 0 >> > configure:11078: result: yes >> > configure:11078: checking for unistd.h >> > configure:11078: result: yes >> >> Mine contains this, which, except for the gcc arguments, looks the same to >> me. >> >> configure:11078: checking unistd.h usability >> configure:11078: gcc -std=gnu99 -c -g -DFEAT_CONCEAL -DFEAT_MOUSE_SGR >> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 conftest.c >&5 >> configure:11078: $? = 0 >> configure:11078: result: yes >> configure:11078: checking unistd.h presence >> configure:11078: gcc -std=gnu99 -E conftest.c >> configure:11078: $? = 0 >> configure:11078: result: yes >> configure:11078: checking for unistd.h >> configure:11078: result: yes >> >> I don't have an explanation at the moment. I'll try to look at it >> more this evening. > > For /usr/include/unistd.h to include a prototype for getpgid(), > __USE_XOPEN_EXTENDED must be defined, and in this system of mine, > it isn't. > > The man page for getpgid() says that _XOPEN_SOURCE >= 500 for > getpgid() to be declared. In my system, _XOPEN_SOURCE isn't > defined, either. > > My gcc version is 4.4.3, if that matters. > > Regards, > Gary
Hm, the gcc command-line arguments produced by src/auto/configure seem highly variable: I have configure:11078: checking unistd.h usability configure:11078: gcc -c -O2 -fno-strength-reduce -Wall conftest.c >&5 configure:11078: $? = 0 configure:11078: result: yes configure:11078: checking unistd.h presence configure:11078: gcc -E conftest.c configure:11078: $? = 0 configure:11078: result: yes configure:11078: checking for unistd.h configure:11078: result: yes with gcc 7.3.1 and (as shown at the top of auto/config.log) Gnu Autoconf 2.69 IIUC, that _XOPEN_SOURCE number is a question of C dialect; and older gcc versions (as yours seem to be) didn't know about newer dialects. According to https://en.wikipedia.org/wiki/GNU_Compiler_Collection the current stable gcc version is 8.1 released 48 days ago, and 6.x is also supported (which IIUC means that 6.0 to 8.1 are supposed to be supported). Maybe you ought to find a newer gcc version. Or (depending on your OS release) maybe even a newer Ubuntu version: the current release is supposed to be Ubuntu 18.04 LTS "Bionic Beaver" released 56 days ago, and older versions 14.04 LTS "Trusty Tahr", 16.04 LTS "Xenial Xerus" and 17.10 "Artful Aardvark" are supposed still to be supported. Best regards, Tony. -- -- 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.
