Wine64 : initializer element is not computable at load time?

Erik de Castro Lopo mle+win at mega-nerd.com
Tue Apr 22 16:26:17 CDT 2008


Ove Kaaven wrote:

> Erik de Castro Lopo skrev:
> > Anybody understand why?
> 
> You could look up the definition of RTL_CRITICAL_SECTION_DEBUG in 
> include/winnt.h. Then realize that __WINESRC__ is only defined for stuff 
> in dlls/, not for stuff in programs/, which should make the type 
> mismatch clear.

The error message says nothing about a type mismatch its complaining
about something not being compulatble a load time.

In include/winnt.h we have:

    #ifdef __WINESRC__  /* in Wine we store the name here */
      DWORD_PTR Spare[8/sizeof(DWORD_PTR)];
    #else
      DWORD Spare[ 2 ];
    #endif

and the code tries to initialize Spare with this:

    { (DWORD_PTR)(__FILE__ ": csRunningObjectTable") }

That makes me suspect that the non  __WINESRC__ definition
is wrong and that the whole #ifdef above could be replaced
with 

      DWORD_PTR Spare[8/sizeof(DWORD_PTR)];

Is that right?

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Copyrighting allows people to benefit from their labours,
but software patents allow the companies with the largest
legal departments to benefit from everyone else's work."
-- Andrew Brown
(http://www.guardian.co.uk/online/comment/story/0,12449,1387575,00.html)



More information about the wine-devel mailing list