Re: Compiler warning under cygwin/mingw (was: fix for 50a6c8e)
- From
Jeff King <peff@peff.net>
- Date
- Feb 29, 2016, 10:47 UTC
- Message-ID
- <20160229104708.GA17042@sigill.intra.peff.net>
- In-Reply-To
- <56D4203B.1030708@web.de>
On Mon, Feb 29, 2016 at 11:40:59AM +0100, Torsten Bögershausen wrote:
Show 11 quoted lines
> That compiles OK, thanks. > > Sorry for high-jacking this thread, but while compiling under CYGWIN, > found one warning: > > LINK git-credential-store.exe > CC daemon.o > daemon.c: In function ‘drop_privileges’: > daemon.c:1136:15: warning: implicit declaration of function ‘initgroups’ > [-Wimplicit-function-declaration] > if (cred && (initgroups(cred->pass->pw_name, cred->gid) ||
Interesting that it doesn't later complain in the link step. :)
You should probably be compiling with the NO_INITGROUPS knob on that platform.
> t9115 doesn't pass, NTFS doesn't like the non-UTF filenames, it seams. > Probably the same problem as under Mac OS /HFS+- > -----------------------
No comment from me on that one.
Show 7 quoted lines
> And MINGW is not happy for other reasons: > > builtin/rev-parse.c: In function 'cmd_rev_parse': > builtin/rev-parse.c:775:12: warning: implicit declaration of function > 'realpath' [-Wimplicit-function-declaration] > if (!realpath(gitdir, absolute_path)) > ^
I guess you're building "pu"; that is only in sg/completion-updates. I don't know if our custom real_path() would suffice there. You might want to ping the author. The patch is:
http://article.gmane.org/gmane.comp.version-control.git/287462
-Peff