is this how kaffeh is supposed to work?

Moses DeJong dejong at cs.umn.edu
Sat Dec 26 20:24:23 PST 1998


I am not really sure if this is a bug but kaffeh seems
to do things a little differently then javah. Here is a
short example.


public class Test {

  private static native void foo();

}



(output of Sun's javah)

/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class Test */

#ifndef _Included_Test
#define _Included_Test
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     Test
 * Method:    foo
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_Test_foo
  (JNIEnv *, jclass);

#ifdef __cplusplus
}
#endif
#endif



(output of kaffe's kaffeh)

/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>

#ifndef _Included_Test.h
#define _Included_Test.h

#ifdef __cplusplus
extern "C" {
#endif

extern void Java_Test_foo(JNIEnv*, jclass);

#ifdef __cplusplus
}
#endif

#endif



The generated code is almost the same except that kaffe
does not use the JNIEXPORT defines. Is there some
reason that the kaffeh program does not used the
JNIEXPORT defines? I remember seeing "#define JNIEXPORT "
in the kaffe sources. I thought JNIEXPORT was used for
something. Why doesn't kaffeh use them like the Sun JVM?


thanks for the help
mo dejong
dejong at cs.umn.edu



More information about the kaffe mailing list