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....? -- gmt "War is an ugly thing, but not the ugliest of things; the decayed and degraded state of moral and patriotic feeling which thinks that nothing is worth war is much worse. A man who has nothing for which he is willing to fight; nothing he cares about more than his own personal safety; is a miserable creature who has no chance of being free, unless made and kept so by the exertions of better persons than himself." -- John Stuart Mill