mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add platform-specific fixes file
Create a new file, platform.h, for platform-specific hacks for MSVC, this includes defining strncasecmp to _stricmp and strdup to _strdup, among other things like defining missing stat macros Change some things not supported in MSVC, like _Static_assert, to their counterparts (in this case, static_assert) Replace usage of VLAs with malloc and free Update getopt_long and use the getopt implementation from musl on Windows. Use comments to show which functions from platform.h are being used
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
#define HASH_NB_BITS 32
|
||||
#define HALF_HASH_NB_BITS 16
|
||||
_Static_assert(HALF_HASH_NB_BITS * 2 == HASH_NB_BITS, "");
|
||||
static_assert(HALF_HASH_NB_BITS * 2 == HASH_NB_BITS, "");
|
||||
#define HASHMAP_NB_BUCKETS (1 << HALF_HASH_NB_BITS)
|
||||
|
||||
/* HashMapEntry is internal, please do not attempt to use it */
|
||||
|
||||
Reference in New Issue
Block a user