hyperion@svn.reactos.org schrieb:
Author: hyperion Date: Sun Jan 18 00:25:43 2009 New Revision: 38872
...
Introduce new define __ROS_LONG64__ ("assume 64-bit long"), to use int instead of long in typedefs of 32-bit integers __ROS_LONG64__ automatically defined if __WINESRC__ is defined. No, __WINESRC__ alone is not enough
If it's defined automatically, why isn't __WINESRC__ alone enough? And when it's not enough anyway, why define __ROS_LONG64__ automatically at all? ...
#else /* !_WIN64 */ +#if !defined(__ROS_LONG64__) typedef int INT_PTR, *PINT_PTR; typedef unsigned int UINT_PTR, *PUINT_PTR; +#else +typedef long INT_PTR, *PINT_PTR; +typedef unsigned long UINT_PTR, *PUINT_PTR; +#endif
If we assume a 64bit long, why define INT_PTR to long on 32 bit target?
Timo Kreuzer wrote:
If it's defined automatically, why isn't __WINESRC__ alone enough?
Because __WINESRC__ is for system code. It will, for example, force you to choose between A/W, disabling the generic name. Wine non-system code (like winetests) doesn't compile if __WINESRC__ is defined
And when it's not enough anyway, why define __ROS_LONG64__ automatically at all?
The hope is someone will follow up with a cleaner commit that defines __ROS_LONG64__ automatically in a single place, instead of in every header that uses it
If we assume a 64bit long, why define INT_PTR to long on 32 bit target?
Because that's what Wine does on 32 bit targets. Don't ask me why. If you can think of a better way, you have commit access