This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fprintf, stderr undeclared


Boehm, Hans wrote:

I keep running into build errors with undefined references
to stderr and fprintf on the trunk,  in libjava/defineclass.cc,
line 340, and in two places in java/lang/natClassloader.cc.

Am I missing something? I don't see reference to anything
like <stdio.h>? Why am I the only one complaining?
Do newer headers have transitive includes
which are hiding this problem?


jni.h includes stdio.h for compatability with Sun's header, and jni.h is picked up from defineclass.cc if JVMPI is enabled (which I guess it is by default):

In file included from ../../../libjava/include/jvmpi.h:18,
                from ../../../libjava/include/jvm.h:503,
                from ../../../libjava/include/java-interp.h:15,
                from ../../../libjava/defineclass.cc:24:

There should certainly be a direct #include in those files - feel free to check in a patch under the "obvious fix" rule.

Thanks

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]