2003/09/20 05:03:47
[org.ibex.core.git] / src / org / xwt / plat / GCJ.cc
index fef47a5..3050a2b 100644 (file)
@@ -5,6 +5,10 @@
 #include <gcj/cni.h>
 #include <gcj/array.h>
 extern "C" {
+
+// hack for broken Solaris headers
+#define _WCHAR_T
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <setjmp.h>
@@ -19,6 +23,19 @@ extern "C" {
 
 
 
+// builtin.xwar /////////////////////////////////////////////////////////
+
+extern unsigned char builtin_bytes[];
+extern int builtin_length;
+
+java::io::InputStream* org::xwt::plat::GCJ::_getBuiltinInputStream() {
+    jbyteArray ret = JvNewByteArray(builtin_length);
+    memcpy(elements(ret), builtin_bytes, builtin_length);
+    return new java::io::ByteArrayInputStream(ret);
+}
+
+
+
 // JPEG ////////////////////////////////////////////////////////////////
 
 #define INPUT_BUF_SIZE (1024 * 16)