From: Rodrigo Kumpera Date: Wed, 30 Aug 2017 23:31:33 +0000 (-0700) Subject: [wasm] Fix eglib issues with WASM. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=cfed4f77102598c3686bd2e12d5f6d3f36102fe8;hp=55316a442fc104b793ccd9aaf527d2f7782b8e4b;p=mono.git [wasm] Fix eglib issues with WASM. --- diff --git a/mono/eglib/eglib-config.h.in b/mono/eglib/eglib-config.h.in index 71797575e68..26e48fd3490 100644 --- a/mono/eglib/eglib-config.h.in +++ b/mono/eglib/eglib-config.h.in @@ -37,6 +37,11 @@ typedef signed @GSIZE@ gssize; #define G_BREAKPOINT() #endif +#if defined (HOST_WASM) +#undef G_BREAKPOINT +#define G_BREAKPOINT() do { printf ("MONO: BREAKPOINT\n"); abort (); } while (0) +#endif + typedef @PIDTYPE@ GPid; #endif diff --git a/mono/eglib/gpath.c b/mono/eglib/gpath.c index 59f5923125b..21e77704603 100644 --- a/mono/eglib/gpath.c +++ b/mono/eglib/gpath.c @@ -160,7 +160,8 @@ g_path_get_basename (const char *filename) return g_strdup (&r[1]); } -#ifndef HAVE_STRTOK_R +//wasm does have strtok_r even though autoconf fails to find +#if !defined (HAVE_STRTOK_R) && !defined (HOST_WASM) // This is from BSD's strtok_r char *