[wasm] Fix eglib issues with WASM.
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 30 Aug 2017 23:31:33 +0000 (16:31 -0700)
committerRodrigo Kumpera <kumpera@gmail.com>
Fri, 1 Sep 2017 21:52:28 +0000 (14:52 -0700)
mono/eglib/eglib-config.h.in
mono/eglib/gpath.c

index 71797575e685c1107665e4eb14481f1fcb3a796f..26e48fd3490604163234891c3852203c5449f507 100644 (file)
@@ -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
index 59f5923125bffef92db3ff085e4d4ac12773cbd6..21e7770460345029bb2dea2ddd6a56eca8c7f57f 100644 (file)
@@ -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 *