standalone: Use size_t in demo.c

This commit is contained in:
David Mak 2024-01-22 16:44:49 +08:00
parent 2a922c7480
commit 9c9756be33

View File

@ -1,18 +1,12 @@
#include <inttypes.h>
#include <math.h> #include <math.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <inttypes.h>
#if __SIZEOF_POINTER__ == 8 #define usize size_t
#define usize uint64_t
#elif __SIZEOF_POINTER__ == 4
#define usize uint32_t
#else
#error "Unsupported platform - Platform is not 32-bit or 64-bit"
#endif
double dbl_nan(void) { double dbl_nan(void) {
return NAN; return NAN;