mirror of git://gcc.gnu.org/git/gcc.git
init.c: New file.
* testsuite/libjava.jni/init.c: New file. * testsuite/libjava.jni/init.java: New file. * testsuite/libjava.jni/init.out: New file. * testsuite/libjava.jni/init.jar: New file. * testsuite/libjava.jni/init.h: New file. * testsuite/libjava.jni/init$NativeClass.h: New file. From-SVN: r121698
This commit is contained in:
parent
28890c8243
commit
0ccadf458d
|
@ -1,3 +1,12 @@
|
||||||
|
2007-02-07 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* testsuite/libjava.jni/init.c: New file.
|
||||||
|
* testsuite/libjava.jni/init.java: New file.
|
||||||
|
* testsuite/libjava.jni/init.out: New file.
|
||||||
|
* testsuite/libjava.jni/init.jar: New file.
|
||||||
|
* testsuite/libjava.jni/init.h: New file.
|
||||||
|
* testsuite/libjava.jni/init$NativeClass.h: New file.
|
||||||
|
|
||||||
2007-02-07 Jakub Jelinek <jakub@redhat.com>
|
2007-02-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR libgomp/28468
|
PR libgomp/28468
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||||
|
|
||||||
|
#include <jni.h>
|
||||||
|
|
||||||
|
#ifndef __init_00024NativeClass__
|
||||||
|
#define __init_00024NativeClass__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_init_00024NativeClass_printHello (JNIEnv *env, jclass);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __init_00024NativeClass__ */
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include <jni.h>
|
||||||
|
#include <init$NativeClass.h>
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL
|
||||||
|
Java_init_00024NativeClass_printHello(JNIEnv *env, jclass cl)
|
||||||
|
{
|
||||||
|
printf("hello\n");
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||||
|
|
||||||
|
#include <jni.h>
|
||||||
|
|
||||||
|
#ifndef __init__
|
||||||
|
#define __init__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __init__ */
|
Binary file not shown.
|
@ -0,0 +1,26 @@
|
||||||
|
// Regression test for JNI and static initializers.
|
||||||
|
|
||||||
|
public class init
|
||||||
|
{
|
||||||
|
public static class NativeClass
|
||||||
|
{
|
||||||
|
static
|
||||||
|
{
|
||||||
|
System.out.println("static initializer 2");
|
||||||
|
System.loadLibrary("init"); // if it's here, this app doesn't work
|
||||||
|
}
|
||||||
|
|
||||||
|
public static native void printHello();
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
System.out.println("static initializer 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
//System.loadLibrary("test"); // if it's here, this app works
|
||||||
|
NativeClass.printHello();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
static initializer 1
|
||||||
|
static initializer 2
|
||||||
|
hello
|
Loading…
Reference in New Issue