[Top][All Lists]

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

[Tinycc-devel] Few files are missing for socket programming on Windows

From: Christian Jullien
Subject: [Tinycc-devel] Few files are missing for socket programming on Windows
Date: Sun, 7 Apr 2019 08:45:11 +0200

Programming with sockets on Windows require:
- qos.h 
- winsock2.h
- ws2ipdef.h

- ws2_32.def

Which are missing from standard tinycc git repository (under win32).

Ok I've grabbed .h from winapi-full-for-0.9.27 and "./tcc -impdef 
$(WINDIR)/System32/ws2_32.dll -o lib/ws2_32.def" produced missing .def

Question, do you allow me to add those files in win32 repository subdir?

- socket is an important part of software programming
- socket is not Windows specific and can be used to make programs compatible 
between linux and Windows
- ws2_32.def is missing from winapi-full-for-0.9.27
- winapi-full-for-0.9.27 is BIG as it contains almost all Windows API, so it 
only useful for those doing Windows specific programming and they'll probably 
use them all.

Is it OK for those 4 additional files?

Btw, I also modified my https://sourceforge.net/projects/wintcc/ which makes 
standalone and reproducible tcc 32/64 Windows executables bootstrapped with 
Cygwin. So I'm personally not lost with socket on Windows.


-----Original Message-----
From: Tinycc-devel [mailto:address@hidden On Behalf Of Michael Matz
Sent: Sunday, April 07, 2019 04:21
To: address@hidden
Subject: Re: [Tinycc-devel] "internal compiler error: vstack leak" and crash 
with VLA of incomplete type

Hello Pascal,

On Sun, 31 Mar 2019, Pascal Cuoq wrote:

> With TCC from git (commit 9382a3a), the two following inputs vla0.i 
> and vla1.i each cause the message “error: internal compiler error: vstack 
> leak”
> to be printed. In addition, the input vla1.i makes TCC crash:
> $ cat vla0.i
> int X=1;
> int main(void) {
>   int t[][X];
> }

Indeed, luckily this use of VLAs is invalid, so we can just diagnose it. 
The invalid vstack accesses you correctly diagnosed were the result of two 
paths within TCC disagreeing if the array size for '[]' was pushed or not (it 
wasn't but the VLA calculation assumed it was).

Fixed in mob.  Your other report about the nested definition of a union leading 
to endless recursion is also fixed in mob, FYI.

Thanks for your reports again.


reply via email to

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