aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/gjavah.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-11-06 22:10:30 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-11-06 22:10:30 +0000
commit5bd717f157eb15478552ec432f30ea32ffe5bc1d (patch)
tree51d9ea13b5da145b0680aa5f857cd9a6c613f535 /gcc/java/gjavah.c
parentfa123c5309ba13c7a941e7fc0d35149a5e3243f3 (diff)
downloadgcc-5bd717f157eb15478552ec432f30ea32ffe5bc1d.zip
gcc-5bd717f157eb15478552ec432f30ea32ffe5bc1d.tar.gz
gcc-5bd717f157eb15478552ec432f30ea32ffe5bc1d.tar.bz2
gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in a JNI header.
* gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in a JNI header. From-SVN: r58867
Diffstat (limited to 'gcc/java/gjavah.c')
-rw-r--r--gcc/java/gjavah.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 3d7e32e..1e8c701 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -1565,7 +1565,7 @@ DEFUN(print_stub_or_jni, (stream, jcf, name_index, signature_index, is_init,
return;
if (flag_jni && ! stubs)
- fputs ("extern ", stream);
+ fputs ("extern JNIEXPORT ", stream);
/* If printing a method, skip to the return signature and print
that first. However, there is no return value if this is a
@@ -1597,6 +1597,9 @@ DEFUN(print_stub_or_jni, (stream, jcf, name_index, signature_index, is_init,
/* When printing a JNI header we need to respect the space. In
other cases we're just going to insert a newline anyway. */
fputs (need_space && ! stubs ? " " : "\n", stream);
+
+ if (flag_jni && ! stubs)
+ fputs ("JNICALL ", stream);
/* Now print the name of the thing. */
print_name_for_stub_or_jni (stream, jcf, name_index,