Skip to content

Commit 979a4db

Browse files
committed
build(web): Use the platform strupr on Emscripten, which already declares it
1 parent cec3a42 commit 979a4db

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • Core/Libraries/Source/WWVegas/compat/win32_shims

Core/Libraries/Source/WWVegas/compat/win32_shims/windows.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,11 @@ static inline int lstrcmpi(const char *lhs, const char *rhs)
10561056
return ::strcasecmp(lhs, rhs);
10571057
}
10581058

1059+
// TheSuperHackers @build githubawn 29/07/2026 Emscripten's libc already declares and
1060+
// provides strupr, and a static definition on top of that non-static declaration is a
1061+
// compile error. Use the platform's own on that target and keep the shim everywhere
1062+
// else, where nothing declares it.
1063+
#if !defined(__EMSCRIPTEN__)
10591064
static inline char *strupr(char *src)
10601065
{
10611066
if (src == nullptr) {
@@ -1068,6 +1073,7 @@ static inline char *strupr(char *src)
10681073

10691074
return src;
10701075
}
1076+
#endif
10711077

10721078
// TheSuperHackers @build bobtista 29/04/2026 GetCurrentDirectory and GetFileAttributes are provided by file_compat.h.
10731079

0 commit comments

Comments
 (0)