On Mon, 8 Jan 2001, Eric Pouech wrote:

> 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 ?

   It seems like a good idea.


> 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

   I believed that 'pack()' was equivalent to 'pack(4)'. Now I think it
may be in fact equivalent to 'pack(pop)'.
   Also it seems you can do jumps in the stack using labels as is
described in the following page. Maybe winemaker should have support for
something like this.

http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_predir_pack.htm


> 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)

   I think this is beyond winemaker's scope. It would require parsing
the file, detecting that a macro is defined and then called with a
different number of arguments, then going back and changing the macro
definition...
   It seems to complex, and thus too likely to fail, to me. Also it does
not seem to be something very common that would make it really
worthwhile. It's not like the case issues or the pack issues which occur
many times in many applications.


--
Francois Gouget         [EMAIL PROTECTED]        http://fgouget.free.fr/
                     Avoid the Gates of Hell - use Linux.


Reply via email to