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

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


 Hi all!

The recent changes wrt FindSDL2.cmake made me aware again of the fact that
almost all our source files depend on the SDL headers - which can be
cumbersome in situations like this (since you've got to add
target_link_library() to each and every internal sub-library of the
project). This dependencies exists mainly because we're including
<SDL_types.h> in our main.h to get the old-fashioned types like Uint16 etc.

Now, in some parts of the Hatari sources, we already use the types from
stdint.h / inttypes.h instead, which also work without the SDL headers, so
it's currently quite a mix of types that we have in the sources. I wonder
whether we should slowly try to move away from the SDL types and finally
include "inttypes.h" in main.h instead? That way, the Hatari sources could
also be easier used in spots that should not directly link to the SDL
library (like the files in tests/debugger/ for example)...

Opinions? Would it be OK to switch non-SDL related files to uint16_t
instead of Uint16 etc. ? Or is anybody really keen on keeping the SDL types?

 Thomas



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