Hello Christian,

That was an annoying warning. You patch works for me on my flavors of
Windows on the toolchain provided by Strawberry Perl. Thanks!

David

On Tue, May 17, 2016 at 12:23 AM, Christian Jullien <[email protected]>
wrote:

> I pushed this small patch:
>
>
>
> diff --git a/tcc.c
> <http://repo.or.cz/tinycc.git/blob/93ed4deec954a8533826a17ef8796ee7087a1847:/tcc.c>
> b/tcc.c
> <http://repo.or.cz/tinycc.git/blob/b340d9bd5325df6601b51dab397df55091128f93:/tcc.c>
>
> index 93ed4de
> <http://repo.or.cz/tinycc.git/blob/93ed4deec954a8533826a17ef8796ee7087a1847:/tcc.c>
> ..b340d9b
> <http://repo.or.cz/tinycc.git/blob/b340d9bd5325df6601b51dab397df55091128f93:/tcc.c>
> 100644 (file)
>
> --- a/tcc.c
> <http://repo.or.cz/tinycc.git/blob/93ed4deec954a8533826a17ef8796ee7087a1847:/tcc.c>
>
> +++ b/tcc.c
> <http://repo.or.cz/tinycc.git/blob/b340d9bd5325df6601b51dab397df55091128f93:/tcc.c>
>
> @@ -133,7
> <http://repo.or.cz/tinycc.git/blob/93ed4deec954a8533826a17ef8796ee7087a1847:/tcc.c#l133>
> +133,7
> <http://repo.or.cz/tinycc.git/blob/b340d9bd5325df6601b51dab397df55091128f93:/tcc.c#l133>
> @@ static void help(void)
>
>  #include <process.h>
>
>  static int execvp_win32(const char *prog, char **argv)
>
>  {
>
> -    int ret = spawnvp(P_NOWAIT, prog, (const char *const*)argv);
>
> +    int ret = _spawnvp(P_NOWAIT, prog, (const char *const*)argv);
>
>      if (-1 == ret)
>
>          return ret;
>
>      cwait(&ret, ret, WAIT_CHILD);
>
>
>
>
>
> *From:* Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> [email protected]] *On Behalf Of *Christian Jullien
> *Sent:* lundi 16 mai 2016 10:12
> *To:* [email protected]
> *Subject:* [Tinycc-devel] spawnvp V.S. _spawnvp on Windows
>
>
>
> Hi,
>
>
>
> When I build tinycc on Windows (both 32/64 bit).
>
>
>
> I always get this warning:
>
>
>
> ../tcc.c:136:39: warning: passing argument 3 of 'spawnvp' from
> incompatible pointer type [-Wincompatible-pointer-types]
>
>      int ret = spawnvp(P_NOWAIT, prog, (const char *const*)argv);
>
>
>
> Looking a spawnvp documentation from Microsoft, I get:
>
>
>
> This POSIX function is deprecated. Use the ISO C++ conformant spawnvp
> instead.
>
>
>
> So I replaced spawnvp by _spawnvp and no more warning when using
> mingw32/64 gcc compilers.
>
>
>
> Please Windows maintainer (if any), can you consider this very simple
> change?
>
>
>
> Christian
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>


-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to