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.

Those specified feature tests only work on some systems, mainly those
that have glibc.  Vim uses autoconf to find out if getpgid() is
supported.  Where the prototype is defined remains to be a guess.

-- 
>From "know your smileys":
 :-D    Big smile

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui