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: Christian Zietz <czietz@xxxxxxx>
- Date: Mon, 3 Oct 2022 18:24:51 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1664814292; bh=Qeo7CyzdEwlMkbA0w7durd2lY5YWYBR4ISXJIYHuHC0=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=Df6MMDpjZqhUvrRdPzUy1k5AF+DQYNS1FyYYdpjp5XA9g1r3S+Vzs18luuY7WMfY0 ke3RnrleaZGgBXCRg07bDh1hTkHqTo2AAn/iEsIv32khbCePhDfS8WsPJxstLRmvMZ 0OmJKZfImTsv6cW25UeoXZG3D8rCEio7heFrZ0jA=
David Savinkoff schrieb:
I think MSFT is trying to be a trouble maker here, so use the force.
It's always easy and convenient to blame Microsoft, I know. But -- as
Thomas already wrote -- M_PI is *not* part of math.h in ANSI C. You will
find that glibc's math.h does not define it unconditionally either:
https://github.com/bminor/glibc/blob/b7bd94068e55d5fa8681e2ab4802d31852ea404e/math/math.h#L1144
.... it's just that __USE_MISC or __USE_XOPEN is set somewhere else.
I would conditionally define M_PI most accurately in a future-proof way.
.... and, therefore, this suggestion might be good solution.
Regards
Christian
--
Christian Zietz - CHZ-Soft - czietz@xxxxxxx
WWW: https://www.chzsoft.de/
New GnuPG-Key-ID: 0x8708B34C827B159E