mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 09:14:04 +02:00
Add support for forcing stdint.h for sized types.
Public issue https://github.com/mackron/miniaudio/issues/334
This commit is contained in:
+13
@@ -3654,6 +3654,17 @@ extern "C" {
|
|||||||
#include <stddef.h> /* For size_t. */
|
#include <stddef.h> /* For size_t. */
|
||||||
|
|
||||||
/* Sized types. */
|
/* Sized types. */
|
||||||
|
#if defined(MA_USE_STDINT)
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef int8_t ma_int8;
|
||||||
|
typedef uint8_t ma_uint8;
|
||||||
|
typedef int16_t ma_int16;
|
||||||
|
typedef uint16_t ma_uint16;
|
||||||
|
typedef int32_t ma_int32;
|
||||||
|
typedef uint32_t ma_uint32;
|
||||||
|
typedef int64_t ma_int64;
|
||||||
|
typedef uint64_t ma_uint64;
|
||||||
|
#else
|
||||||
typedef signed char ma_int8;
|
typedef signed char ma_int8;
|
||||||
typedef unsigned char ma_uint8;
|
typedef unsigned char ma_uint8;
|
||||||
typedef signed short ma_int16;
|
typedef signed short ma_int16;
|
||||||
@@ -3677,6 +3688,8 @@ typedef unsigned int ma_uint32;
|
|||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* MA_USE_STDINT */
|
||||||
|
|
||||||
#if MA_SIZEOF_PTR == 8
|
#if MA_SIZEOF_PTR == 8
|
||||||
typedef ma_uint64 ma_uintptr;
|
typedef ma_uint64 ma_uintptr;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user