Re: [Tinycc-devel] spawnvp V.S. _spawnvp on Windows

2016-05-16 Thread Christian Jullien
I pushed this small patch:

 

diff --git a/tcc.c
  b/tcc.c
 

index 93ed4de
 ..b340d9b
  100644 (file)

--- a/tcc.c
 

+++ b/tcc.c
 

@@
 -133,7
 +133,7 @@ static void help(void)

 #include 

 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, WAIT_CHILD);

 

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org]
On Behalf Of Christian Jullien
Sent: lundi 16 mai 2016 10:12
To: tinycc-devel@nongnu.org
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
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] tcc compilation on MSYS2

2016-05-16 Thread David Mertens
On Sat, May 14, 2016 at 3:27 PM, grischka  wrote:

> Chris Marshall wrote: ---
>
>> To be more specific, it should be possible to build the mingw version of
>> tcc on cygwin (I don't know, haven't had time to try) but what I would like
>> is the linux/unix version---if it builds on unix, it should be buildable on
>> cygwin---as long as you don't look under the covers to find windows.
>>
>
> Probably you could do that.  It is just that you'll find that
> such (almost true) linux/unix version of tcc will produce
> (entirely) true linux/unix programs.  And these will not
> run on windows, not even under cygwin.
>
> -- gr
>

This is already the case on Macs, but we still go to some lengths to
support it anyway. And, just as with Macs, even if the compiled executables
cannot be run on Windows, the memory output can be run. Knowing Chris, I'm
pretty sure this is what he is most interested in. :-)

Chris, what happens if you run ./configure on Cygwin?

David
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] spawnvp V.S. _spawnvp on Windows

2016-05-16 Thread Christian Jullien
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
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] tcc compilation on MSYS2

2016-05-16 Thread Sergey Korshunoff
> You can try my branch: https://github.com/avih/tinycc/commits/drafts (note, I 
> force-push and keep it rebased on top of mob).

First impression with this branch on Linux:
1)
fantoo tinycc # ./configure
Binary  directory   /usr/local/bin
TinyCC directory/usr/local/lib/tcc
Library directory   /usr/local/lib
Include directory   /usr/local/include
Manual directory/usr/local/share/man
Info directory  /usr/local/share/info
Doc directory   /usr/local/share/doc//usr/local/lib/tcc ??

2) there is no i386-tcc on i386 Linux even when "./configure --enable-cross"
But I need a i386-tcc to compile a tccboot kernel. Not a general tcc
wiich target is unknown.

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] -C option

2016-05-16 Thread Sergey Korshunoff
I simplified a -C option handling. Currently a code in my repo is like
in [mob]. Only check in parse_line_commen remain.
https://github.com/seyko2/tinycc/commit/acd6224a7fda62fe003e9901b85ef9a8d5dae851

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel