Skip to content

Commit

Permalink
HACK uname to treat CLANG like MINGW
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyd2019 committed Jan 4, 2021
1 parent e68ccdf commit b5dbd99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions winsup/cygwin/uname.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ uname_x (struct utsname *name)
msystem ? msystem : msystem_msys,
wincap.osname (), wincap.build_number (),
wincap.is_wow64 () ? "-WOW64" : "");
if (memcmp(name->sysname, "CLANG", 5) == 0)
memcpy(name->sysname, "MINGW", 5);
/* nodename */
memset (buf, 0, sizeof buf);
cygwin_gethostname (buf, sizeof buf - 1);
Expand Down Expand Up @@ -105,6 +107,8 @@ uname (struct utsname *in_name)
char* msystem = getenv("MSYSTEM");
const char *msystem_msys = "MSYS";
__small_sprintf (name->sysname, "%s_%s", msystem ? msystem : msystem_msys, wincap.osname ());
if (memcmp(name->sysname, "CLANG", 5) == 0)
memcpy(name->sysname, "MINGW", 5);
#else
__small_sprintf (name->sysname, "CYGWIN_%s", wincap.osname ());
#endif
Expand Down

0 comments on commit b5dbd99

Please sign in to comment.