Include math.h in d3dx9math.inl as it uses sqrt().
kgbricola at web.de
Fri Nov 11 02:09:18 CST 2011
Am 10.11.2011 19:02, schrieb Daniel Scharrer:
>> Does the Microsoft header include math.h?
> I'm sorry, it seems I made a mistake here: the actual header file
> (d3dx9math.h) from wine includes math.h so the sqrt usage is ok.
> However, d3dx9math.inl also uses min and max macros which aren't
> included anywhere. Because of this a winelib user has to
> define/include those symbols before including d3dx9math.h (that was my
> original problem). I'm pretty certain that is not the case for the
> Microsoft headers.
> A quick grep of the wine include files shows that the min/max macros
> are defined in windef.h, minmax.h and msvcrt/stdlib.h - I have no idea
> which one should be included here.
> Again, sorry for the bogus patch and thanks for the quick response.
> Daniel Scharrer
It seems to me that native d3dx9math.h doesn't use min/max, it uses a
normal comparison, not the macro. I think the better fix would be to
replace the min/max in wine's d3dx9math.inl.
More information about the wine-devel