mirror of
https://github.com/gbdev/rgbds.git
synced 2025-12-01 15:27:48 +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,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "asm/asm.h"
|
||||
#include "asm/charmap.h"
|
||||
@@ -34,6 +33,7 @@
|
||||
#include "extern/utf8decoder.h"
|
||||
|
||||
#include "linkdefs.h"
|
||||
#include "platform.h" // strncasecmp, strdup
|
||||
|
||||
uint32_t nListCountEmpty;
|
||||
char *tzNewMacro;
|
||||
|
||||
Reference in New Issue
Block a user