[hatari-devel] Switching from SDL_types.h to inttypes.h ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: Hatari Development <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: [hatari-devel] Switching from SDL_types.h to inttypes.h ?
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sat, 24 Sep 2022 11:53:35 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1664020418; bh=xwroI+YNNZykS0MrLF1ZmjGiAVJUZ0kPyUsuLbSsBfI=; h=Date:From:To:Subject:From; b=Tf1XbDrFAi2NyV/7ktqd+RqnGAdK5oo3nE6w6MaD/jDGeZrWjTByhGXv3Eblvwo+6 Mf/SIK40B9sxkMCGFWOgOl9XcjNDLVZTpFKfNBL6nY2iFQzpM8zWjUfauGPvd7QJ6v UHC3BYdDl8XOUCVCaFmb6YY7tQd6Y68PDcIelQhABPu80E10jeRTJ1nn5WNokDCChi W3xqOJJuegcGR2Lnefn18+rns/Sf0/OnxRk27p0ybHfLtWQtsdcny/9DWcOeTTdVW8 pXT2TqBPGO/Dmx2I2liIwAwvaOAUieQqGfnnYRj9TroppRfw2ese6LeyYifO0XQP0g LQxXMhuBPNj6Q==
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