_wstat32i64 and _wstati64

All development related issues welcome

Moderator: Moderator Team

Post Reply
Julcar
Posts: 134
Joined: Thu Jul 31, 2008 8:19 pm

_wstat32i64 and _wstati64

Post 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: https://github.com/julcar/reactos/blob/ ... 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: https://repo.or.cz/tinycc.git/blob/HEAD ... 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: https://git.reactos.org/?p=reactos.git; ... .spec#l760

And instead _wstat32i64 is just a stub https://git.reactos.org/?p=reactos.git; ... 0.spec#l63

BTW, both functions are implemented in wine and both are almost the same code:
https://source.winehq.org/git/wine.git/ ... le.c#l3205
https://source.winehq.org/git/wine.git/ ... 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:
Last edited by Julcar on Sat May 23, 2020 7:34 pm, edited 1 time in total.

q.michal
Posts: 9
Joined: Thu May 21, 2020 7:16 pm

Re: _wstat32i64 and _wstati64

Post by q.michal »

Doesn't ReactOS use wine's msvcrt?

Julcar
Posts: 134
Joined: Thu Jul 31, 2008 8:19 pm

Re: _wstat32i64 and _wstati64

Post by Julcar »

Commenting the line 80 in sys/stat.h fixes the problem, so I guess the problem is in TCC side

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest