1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00
QB64-PE/internal/c/os.h
Matthew Kilgore e6964dfc69 Include stdint.h on Windows, change integer defines to use them
It seems we weren't including stdint.h on Windows by mistake. Likely we
were getting it anywy from some other header, but it sounds like that
got changed in newer versions of MinGW and either way we shouldn't rely
on that.

Being that we include stdint.h on all platforms, I also changed os.h to
always use these types when defining the `int32` and friends sized
types. Ideally we get rid of those defines in the future but we can at
least use the stdint.h types going forward (as we already have).
2022-11-12 19:48:26 -05:00

28 lines
631 B
C

#include "libqb-common.h"
/* common types (not quite an include guard, but allows an including
* file to not have these included.
*
* Should this be adapted to check for each type before defining?
*/
#ifndef QB64_OS_H_NO_TYPES
# define int64 int64_t
# define int32 int32_t
# define int16 int16_t
# define int8 int8_t
# define uint64 uint64_t
# define uint32 uint32_t
# define uint16 uint16_t
# define uint8 uint8_t
# define ptrszint intptr_t
# define uptrszint uintptr_t
# ifdef QB64_64
# define ptrsz 8
# else
# define ptrsz 4
# endif
#endif