Hmm,
Another header problem. When compiling Putty with Wine's headers, I get this errors:
In file included from /home/dimi/dev/wine/wine.src/include/msvcrt/wchar.h:12, from wcwidth.c:9: /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:42: parse error before "__int64" /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:42: warning: no semicolon at end of struct or union /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:44: parse error before '}' token /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:60: parse error before "__int64" ...
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? Should we include this file from one of the msvcrt header files? I really don't like doing that, but than again, I don't know much about the organization of our headers, or most importantly, the way MS does it...
On Thursday 21 November 2002 01:21 am, Dimitrie O. Paun wrote:
Hmm,
Another header problem. When compiling Putty with Wine's headers, I get this errors:
In file included from /home/dimi/dev/wine/wine.src/include/msvcrt/wchar.h:12, from wcwidth.c:9: /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:42: parse error before "__int64" /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:42: warning: no semicolon at end of struct or union /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:44: parse error before '}' token /home/dimi/dev/wine/wine.src/include/msvcrt/io.h:60: parse error before "__int64" ...
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? Should we include this file from one of the msvcrt header files? I really don't like doing that, but than again, I don't know much about the organization of our headers, or most importantly, the way MS does it...
probably it is a #define instead of a typedef so that some modifiers work like "unsigned" or whatever... or does that matter?
they seem to have it in winnt.h as a #define. They also have it in basetsd.h, but only for the _WIN64 case! wierd -- even wierder, AFAICS they use it before the #define it anyhow, and before any other #includes in basetsd.h....
so maybe wchar pulls this in via windows.h somehow? I don't get it either, maybe there are more places it's #define'd out there that I'm missing....?
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).
On November 21, 2002 06:34 pm, Francois Gouget wrote:
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).
Since this is supposed to be a compiler thing in Windows, what about a -D__int64=long\ long on the command line? None of the other #include kludges fix the problem properly, because this should be available without any include...
On Thu, 21 Nov 2002, Dimitrie O. Paun wrote:
On November 21, 2002 06:34 pm, Francois Gouget wrote:
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).
Since this is supposed to be a compiler thing in Windows, what about a -D__int64=long\ long on the command line? None of the other #include kludges fix the problem properly, because this should be available without any include...
That would work, but it's worse. I checked with Visual C++ and you need:
-D__int8=char -D__int16=short -D__int32=int "-D__int64=long long"
Fortunately they don't have the unsigned variants but I don't know what else they may have. Also you'll need to adapt these based on the platform you are compiling on (Alpha, Sparc 32 vs. Sparc 64, etc.)
Ah, this may help: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html...
Yum, MMX datatypes! (let's ignore them)
On November 21, 2002 07:08 pm, Francois Gouget wrote:
That would work, but it's worse. I checked with Visual C++ and you need:
-D__int8=char -D__int16=short -D__int32=int "-D__int64=long long"
Well, that's fine. Is this fix acceptable? In that case, we should get rid of the #defines from the headers, and include these in the Makefile.
Alexandre, are you cool with such a thing?
"Dimitrie O. Paun" dpaun@rogers.com writes:
Well, that's fine. Is this fix acceptable? In that case, we should get rid of the #defines from the headers, and include these in the Makefile.
Alexandre, are you cool with such a thing?
I don't know, it doesn't really seem necessary to do that in Wine itself. You can just put a few #ifndefs in our headers to avoid redefinition warnings so that the defines can be added for apps that require them.
On November 21, 2002 07:54 pm, Alexandre Julliard wrote:
You can just put a few #ifndefs in our headers to avoid redefinition warnings so that the defines can be added for apps that require them.
Sounds like a plan. Expect a path soon.