On Fri, 14 Jun 2002, Steven Edwards wrote:
I dont know if this is proper or not but mingw already defines WIN32 _WIN32 and __declspec(spec)
Changelog: Fix Warnings
cvs diff -u twain.h Index: twain.h =================================================================== RCS file: /home/wine/wine/dlls/twain/twain.h,v retrieving revision 1.3 diff -u -r1.3 twain.h --- twain.h 31 May 2002 23:40:53 -0000 1.3 +++ twain.h 14 Jun 2002 10:42:57 -0000 @@ -56,9 +56,11 @@
#define FAR #define huge +#ifndef __MINGW__ #define WIN32 #define _WIN32 #define __declspec(spec) +#endif
I don't think the twain.h header should define any of these macros, including FAR and huge.
The main issue is that _WIN32 is normally defined by the compiler. As an alternative we could define it in one of the Wine headers, but why define _WIN32 rather than _WIN64? Maybe we could add the following in basestd.h: #if !defined(_WIN32) && !defined(_WIN64) #define _WIN32 #endif
WIN32 is not normally defined by the compiler but it is part of the default set of macros defined my Visual C++ project. So maybe we should add:
#ifdef _WIN32 #define WIN32 #endif
Does anyone else care to comment on the above?
Then * FAR is defined in winnt.h so there is no need to redefine it * __declspec is defined in winnt.h too * huge will not be needed if WIN32 is defined
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Linux: Because rebooting is for adding new hardware
Francois Gouget fgouget@free.fr writes:
I don't think the twain.h header should define any of these macros, including FAR and huge.
These are just hacks to make twain.h compile without too many changes. This is not visible outside of the twain dll anyway.
The main issue is that _WIN32 is normally defined by the compiler. As an alternative we could define it in one of the Wine headers, but why define _WIN32 rather than _WIN64?
Well, it should obviously be _WIN32 on 32-bit platforms and _WIN64 on 64-bit ones (not that Wine works on any of them...) But yes it would be reasonable to define that in one of our headers.