emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64


From: Angelo Graziosi
Subject: Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64
Date: Wed, 31 Aug 2016 21:56:45 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Il 31/08/2016 20:47, Eli Zaretskii ha scritto:
Cc: address@hidden
From: Ken Brown <address@hidden>
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 via email to

[Prev in Thread] Current Thread [Next in Thread]