Re: [hatari-devel] Removing SDL use for byte order checks / conversions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Removing SDL use for byte order checks / conversions
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Mon, 3 Oct 2022 12:18:24 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1664799506; bh=H3A6+3mWkFo+tdco++tU7c/UtgjaGvczN0zyBTMH0MA=; h=Date:From:To:Subject:From; b=EBf6yObUUheRTAiXJtPS1rWNb6OcNDxoA5dmdwPqHtkQfgZgHRGaxBPI+BvYNJabt z2YgtZAwS8Bdk6O+nPVfaJbAA4aoPFx4by9mXfg+UXffYrRufQW5KU4fZP8BG81vB3 hjfw1emO1qCOwlpvAl+4tm658xKoy6p7oR7BQG1P2CRH4T1Fs6ft/Z1a91xSiaGzyK spwNQsSizee3ZYTSgt2EhYpKPoa5ffbb9y1F6VDAFDKH1zg07rS58El6Ip5I7KXi0B 7r9xI0TL22jlx7o3JzipbpDACDySbaOckOwce398ZqMjKLwGiG4LNXwj4Wqoi0udyH dde7Y+PIi0MuA==
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