Page 1 of 1

_wstat32i64 and _wstati64

Posted: Sat May 23, 2020 9:34 am
by Julcar
Hi folks,

I am currently doing tests compiling C apps in ReactOS using TCC but I am stuck on something that looks like a ReactOS bug:

The code I am trying to compile is here: ... mongoose.c

The function at line 369 mg_stat() returns a _wstati64 instance.

TCC has a sys/stat.h include file in which _wstati64 is defined as an alias of _wstat32i64: ... stat.h#l80

When compiling, TCC complains about the symbol _wstat32i64 is not defined in msvcrt.dll

On ReactOS' side, _wstati64 is exported as CDECL:; ... .spec#l760

And instead _wstat32i64 is just a stub; ... 0.spec#l63

BTW, both functions are implemented in wine and both are almost the same code: ... le.c#l3205 ... le.c#l3248

Here I am a bit confused whether it is faulty on ReactOS's side either TCC's side, so I reckon on experts to get clarified :geek:

Re: _wstat32i64 and _wstati64

Posted: Sat May 23, 2020 2:03 pm
by q.michal
Doesn't ReactOS use wine's msvcrt?

Re: _wstat32i64 and _wstati64

Posted: Sun May 24, 2020 5:03 am
by Julcar
Commenting the line 80 in sys/stat.h fixes the problem, so I guess the problem is in TCC side