Wii: Define _GNU_SOURCE

This commit is contained in:
Vicki Pfau 2018-10-01 11:15:20 -07:00
parent da80c5a971
commit 2bfc3e0ca6
3 changed files with 2 additions and 8 deletions

View File

@ -117,7 +117,7 @@ Bugfixes:
Misc: Misc:
- mGUI: Add SGB border configuration option - mGUI: Add SGB border configuration option
- mGUI: Add support for different settings types - mGUI: Add support for different settings types
- Wii: Disable use of strtof_l (fixes mgba.io/i/1106) - Wii: Define _GNU_SOURCE (fixes mgba.io/i/1106)
- Wii: Expose stretch configuration in settings - Wii: Expose stretch configuration in settings
- Wii: Stretch now sets pixel-accurate mode size cap - Wii: Stretch now sets pixel-accurate mode size cap

View File

@ -321,7 +321,7 @@ if(WII)
add_definitions(-U__STRICT_ANSI__) add_definitions(-U__STRICT_ANSI__)
endif() endif()
if(DEFINED 3DS) if(3DS OR WII)
add_definitions(-D_GNU_SOURCE) add_definitions(-D_GNU_SOURCE)
endif() endif()

View File

@ -59,11 +59,6 @@ int ftostr_u(char* restrict str, size_t size, float f) {
} }
float strtof_u(const char* restrict str, char** restrict end) { float strtof_u(const char* restrict str, char** restrict end) {
#ifdef GEKKO
// strtof_l appears to have broken in devkitPPC sometime around r28
// TODO: Investigate further
float res = strtof(str, end);
#else
#if HAVE_LOCALE #if HAVE_LOCALE
locale_t l = newlocale(LC_NUMERIC_MASK, "C", 0); locale_t l = newlocale(LC_NUMERIC_MASK, "C", 0);
#else #else
@ -72,7 +67,6 @@ float strtof_u(const char* restrict str, char** restrict end) {
float res = strtof_l(str, end, l); float res = strtof_l(str, end, l);
#if HAVE_LOCALE #if HAVE_LOCALE
freelocale(l); freelocale(l);
#endif
#endif #endif
return res; return res;
} }