Francois Gouget fgouget at free.fr
Thu Nov 21 17:34:24 CST 2002

On Thu, 21 Nov 2002, Dimitrie O. Paun wrote:
> Reason is that __int64 is not defined. Now, this happens when I compile
> a file that has only one include:
> #include <wchar.h>
> As a quick hack, I've added this:
> typedef long long      __int64;
> to include/msvcrt/sys/types.h, but it doesn't look like the
> right fix. We define __int64 in here:
> include/basetsd.h:#define __int64 long long
> but why a define and not a typedef?

I did not really check but AFAIK __int64 is a native compiler type in
Visual C++. So you don't need it to be defined anywhere at all which is
why it compiles on windows with just #include <wchar.h>.

And since __int64 is a 'native' type like 'int', you can write 'unsinged
__int64', 'signed int64', etc, hence the #define.

I'm not sure what the solution to this is. We could make sure that each
and every single Wine header includes (directly or indirectly)
'stddef.h' so that __int64 is always defined. But that seems pretty
ugly. Unfortunately I don't see any viable alternative (duplicating the
__int64 #defined would be worse).

Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
  Any sufficiently advanced Operating System is indistinguishable from Linux

More information about the wine-devel mailing list