This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Include ffi.h in link.cc.
Andrew Pinski wrote:
On Mar 6, 2006, at 4:50 PM, David Daney wrote:
+#ifdef USE_LIBFFI
+extern "C" {
+#include <ffi.h>
+}
+#endif
+
Is there a reason why you are wrapping the include of ffi.h with 'extern
"C"'
as that seems wrong and problematic. Now if ffi.h is not C++ includable,
it should be fixed instead of working about it each time it is included.
Good Point. I did it that way because I just pasted in code from
java-interp.h. ffi.h seems to be properly wrapped.
New patch:
Still builds natively on i686-pc-linux-gnu and cross mipsel-linux.
Make check in libjava no failures on i686-pc-linux-gnu.
OK to commit?
2006-03-06 David Daney <ddaney@avtrex.com>
* link.cc: Include ffi.h if USE_LIBFFI defined.
Index: link.cc
===================================================================
--- link.cc (revision 111728)
+++ link.cc (working copy)
@@ -15,6 +15,10 @@
#include <stdio.h>
+#ifdef USE_LIBFFI
+#include <ffi.h>
+#endif
+
#include <java-interp.h>
#include <jvm.h>