unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Angelo Graziosi <angelo.graziosi@alice.it>
To: Eli Zaretskii <eliz@gnu.org>, Ken Brown <kbrown@cornell.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64
Date: Wed, 31 Aug 2016 21:56:45 +0200	[thread overview]
Message-ID: <11ac6b41-3a59-ec19-c414-151c08a91ba3@alice.it> (raw)
In-Reply-To: <8337lklqrl.fsf@gnu.org>

Il 31/08/2016 20:47, Eli Zaretskii ha scritto:
>> Cc: emacs-devel@gnu.org
>> From: Ken Brown <kbrown@cornell.edu>
>> Date: Wed, 31 Aug 2016 14:11:41 -0400
>>
>> According to
>>
>>    http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
>>    http://man7.org/linux/man-pages/man2/execve.2.html
>>
>> you should include <unistd.h>, and the return type should be int.
>
> Thanks.  On MS-Windows, execve is not declared in unistd.h, it's
> declared in process.h (which we cannot include, because it conflicts
> with our own process.h).  Nevertheless, doing what you suggest is
> worth a try, since there are no other ideas.
>

As always, Ken's suggestions are right!

Now this test case,

$ cat test.c
/*#include <stdint.h>*/
#include <unistd.h>

/*extern intptr_t execve (const char *, char * const *, char * const *);*/
/*extern intptr_t execve (const char *, char * const [], char * const []);*/
extern int execve (const char *, char * const *, char * const *);

int main()
{
   return 0;
}

builds without warnings with

$ gcc -Wall test.c


BTW, I tried my first test case (that with the Emacs definition of 
'execve') with the other compilers in MSYS2/MinGW-64/32, and both MSYS2 
gcc 5.3 and MinGW64 gcc-6.1 give the warning, instead MinGW32 gcc-6.1 
does not print warnings.

Ciao,
Angelo.



  reply	other threads:[~2016-08-31 19:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31  8:01 Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64 Angelo Graziosi
2016-08-31 14:27 ` Eli Zaretskii
2016-08-31 15:01   ` Angelo Graziosi
2016-08-31 15:42     ` Eli Zaretskii
2016-08-31 17:40       ` Angelo Graziosi
2016-08-31 18:11         ` Ken Brown
2016-08-31 18:47           ` Eli Zaretskii
2016-08-31 19:56             ` Angelo Graziosi [this message]
2016-09-01  2:37               ` Eli Zaretskii
2016-09-01  7:44                 ` Angelo Graziosi
2016-09-01 14:17                   ` Eli Zaretskii
2016-09-01 15:42                     ` Angelo Graziosi
2016-09-01 16:04                       ` Eli Zaretskii
2016-09-01 16:12                         ` Eli Zaretskii
2016-09-01 16:14                         ` Angelo Graziosi
2016-09-01 16:17                         ` Davis Herring
2016-09-01 16:24                           ` Ken Brown
2016-09-01 17:43                             ` Davis Herring
2016-09-01 16:29                           ` Eli Zaretskii
2016-09-01 16:32                         ` Andreas Schwab
2016-09-01 16:49                           ` Eli Zaretskii
2016-09-01 16:25                     ` Angelo Graziosi
2016-09-01 16:30                       ` Eli Zaretskii
2016-09-01 19:44                         ` Angelo Graziosi
2016-09-01 17:19                     ` Eli Zaretskii
2016-08-31 18:18         ` Eli Zaretskii
2016-09-01 18:50           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11ac6b41-3a59-ec19-c414-151c08a91ba3@alice.it \
    --to=angelo.graziosi@alice.it \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kbrown@cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).