This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Defining lt_preloaded_symbols
- To: java-patches at sources dot redhat dot com
- Subject: Defining lt_preloaded_symbols
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 12 Sep 2000 04:46:19 -0300
- Organization: GCC Team, Red Hat
In C++, a `const' variable isn't `extern' unless explicitly declared
as such. natRuntime.cc has provided a (fallback?) definition of this
variable for quite some time, but it just wasn't useful, since it
wasn't exported. I've noticed the problem when attempting to link
jv-convert and gij. I don't know since when this is a problem; it
might be related with the libtool overhaul, but most likely not with
libltdl's update, since libltdl doesn't make any direct references to
this variable.
Here's a patch that fixes the problem. Ok to install?
Index: libjava/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* java/lang/natRuntime.cc (lt_preloaded_symbols): Define as `extern'.
Index: libjava/java/lang/natRuntime.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natRuntime.cc,v
retrieving revision 1.13
diff -u -p -r1.13 natRuntime.cc
--- libjava/java/lang/natRuntime.cc 2000/09/04 16:55:47 1.13
+++ libjava/java/lang/natRuntime.cc 2000/09/12 07:29:44
@@ -26,7 +26,7 @@ details. */
/* FIXME: we don't always need this. The next libtool will let us use
AC_LTDL_PREOPEN to see if we do. */
-const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
+extern const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
// We keep track of all the libraries loaded by this application. For
// now we use them to look up symbols for JNI. `libraries_size' holds
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me