Re: [hatari-devel] Switching from SDL_types.h to inttypes.h ?

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


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



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