mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 03:30:23 +00:00
869e361ee4
This moves a lot of the preprocessor flags for what compiler/platform we're using into a libqb-common.h header inside the libqb/include folder. This gets included at the top of every libqb .cpp file, and is intended to be fairly small, providing only necessary things like _WIN32_WINNT (which needs to be defined before including <windows.h> or friends).
40 lines
1 KiB
C
40 lines
1 KiB
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
|
|
# ifdef QB64_WINDOWS
|
|
# define uint64 unsigned __int64
|
|
# define uint32 unsigned __int32
|
|
# define uint16 unsigned __int16
|
|
# define uint8 unsigned __int8
|
|
# define int64 __int64
|
|
# define int32 __int32
|
|
# define int16 __int16
|
|
# define int8 __int8
|
|
# else
|
|
# 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
|
|
# endif
|
|
|
|
# ifdef QB64_64
|
|
# define ptrszint int64
|
|
# define uptrszint uint64
|
|
# define ptrsz 8
|
|
# else
|
|
# define ptrszint int32
|
|
# define uptrszint uint32
|
|
# define ptrsz 4
|
|
# endif
|
|
#endif
|