Re: [hatari-devel] Switching from SDL_types.h to inttypes.h ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Switching from SDL_types.h to inttypes.h ?
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Fri, 30 Sep 2022 04:06:40 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1664510811; bh=pNDHnOp6HJ1bXaAq3L3pvrR0JyzwmyaAYjqJWPcNiQk=; h=Date:From:To:Subject:From; b=OUybXe/cpeVP6ahPrSEyYFc/5h9OLfxWaeyrqQCX5LBVlfjb90Zet/LwrLs32ofQg RWJPVVvu4NxvYK2atzS/a0iaz2KUip3Pm83+nhwzkeOqA1FXBpuyDA2yp6AJztnst6 YijdnM6wkQoI4VNZNmIP797rUq3KPhV8AMhLfHM2GobgFk9okDLa92hhumY9A3WkLt S83jXlHGo9D3xD1Rk8HIlhzbGQ/aU60J6ihRsok2vpt9q8uGtpmhnw3GA4EhPy0vF8 yiHWZeBv5MbEszBnjBjaiqS5lpWIe4PPKYsa+WDH7bf0I3YIpKM4IgNP2NQvmA4Hd5 AA2jbAIWdSRYw==
Am Fri, 30 Sep 2022 02:11:28 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> Hi,
>
> On 29.9.2022 12.09, Andreas Grabher wrote:
> >> Am 29.09.2022 um 11:07 schrieb Chris Jenkins <cdpjenkins@xxxxxxxxx>:
> >> A general point from me on this: it's really annoying that SDL (and seemingly every other library ever) defines its own typedefs for integer types. Presumably there's a historical reason for that but I really wish it wasn't like that.
>
> Blame Microsoft and MSVC:
> https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#C
>
> -----------------------------------------
> "There had been no plans to support C99 even in 2011, more than a decade
> after its publication.
>
> Visual C++ 2013 finally added support for various C99 features in its C
> mode (...) though it was still not complete. Visual C++ 2015 further
> improved the C99 support ..."
> -----------------------------------------
>
> I.e. if major C-project wanted to support Windows well, it still needed
> its own typedefs over decade after C99 came out.
Right. Also when Hatari started in the early 2000s, stdint.h was also not
available on each and every Unix-style OS out there yet. That's why the
Hatari Codebase mainly used those types. Fortunately, times have changed
now...
> (As I stated earlier, I see some value in keeping CPU core uae_u* types
> as WinUAE functions are not properly prefixed, like SDL ones are.)
We also need to keep the uae_* types in the CPU core to be able to sync' our
code with WinUAE, so please don't touch them!
Thomas