Re: [hatari-devel] Removing SDL use for byte order checks / conversions

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Mon, 3 Oct 2022 11:11:42 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On 2.10.2022 22.05, Christian Zietz wrote:
> > Thomas Huth schrieb:
> >   
> >> Without that, compilation was broken with VisualStudio:
> >>
> >> https://cirrus-ci.com/task/6045603464478720?logs=main#L752  
> > 
> > See:
> > https://learn.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-170  
> 
> Ok, Thanks!
> 
> So better solution than the SDL include, would be adding this to 
> "main.h", before <math.h> include:
> 	#define _USE_MATH_DEFINES  // for MSVC
> 
> Thomas, could you try that in your CI?

Not sure if that's really better - if I've got that right, M_PI and the
other constants are not part of POSIX or the C standard, so there might be
other systems where M_PI is not defined. OTOH, SDL_stdinc.h always makes
sure that it is defined, so unless we really really need to make dmaSnd.c
independent from the SDL headers, using SDL_stdinc.h is maybe the easier
choice here.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/