while compiling a sample for MS SDK, I run into the following issues
1/ macro definition
-------------------
the GlobalPtrHandle macro in windowsx.h is the one used in the 16 bit version
of the SDK. since all winelib apps have to be 32 bit apps, using the 32 bit
API, should we use the 32 bit version of this macro instead ?
/* 32 bit def */
#define GlobalPtrHandle(lp) \
((HGLOBAL)GlobalHandle(lp))
/* 16 bit def */
#define GlobalPtrHandle(lp) \
((HGLOBAL)LOWORD(GlobalHandle(SELECTOROF(lp))))
If no one objects, I'll send a patch to correct windowsx.h accordingly
Note: none of the Global*Ptr* macros are used in the Wine code, so changes
should only impact Winelib programs
2/ winemaker (#1)
-----------------
In one of the .h file, there was something like
#pragma pack(1)
and later
#pragma pack()
which winemaker translated into:
#include <pshpack1.h>
and later
#include <pshpack4.h> // revert to default packing
since, the #pragma use was done outside the #ifndef __MY_H__ protection against
multiple inclusion, the compilation blew up because of too many pushed levels...
this is not easily solvable... (the last #pragma should be translated into a
#include <poppack.h>, but it's hard to tell in all the cases
perhaps, winemaker should at least generate a warning when the pairing of
push and pop is not correct (and let the user decides what to do)
3/ winemaker (#2)
-----------------
program used a way to print debug strings...
when debug is turned on, something like
void FAR CDECL dprintf(UINT uDbgLevel, LPSTR szFmt, ...);
#define DPF dprintf
is defined
when debug is turned off, the following is defined
#define DPF()
this isn't standard preprocessor code, because it's called like
DPF(1, "got %s", "one issue");
however, it seems that MS preprocessor allows it
perhaps could winemaker detect such macros and define them (for gcc at least)
as
#define DPF(...)
or
#define DPF (void)
4/ wrc
------
wrc couldn't compile the .rc file, but I hadn't time yet to look into it.
more on next post(s).
A+
--
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle