classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: small compilation problem fix


From: Tom Tromey
Subject: Re: small compilation problem fix
Date: 20 Jan 2004 10:49:20 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "David" == David BĂ©langer <address@hidden> writes:

David> Small bug fix.  Some gtk code does not compile since it is
David> not official C standard code: variable declaration after statements.

Actually this is a new feature in C99.  Still, we can easily support
older versions of C.  Here's an untested patch that could be used as a
starting point...

Tom

Index: ChangeLog
from  Tom Tromey  <address@hidden>

        * configure.ac (JNI_CFLAGS): New subst.
        * native/jni/gtk-peer/Makefile.am (INCLUDES): Added JNI_CFLAGS.

Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.1
diff -u -r1.1 configure.ac
--- configure.ac 18 Jan 2004 22:06:42 -0000 1.1
+++ configure.ac 20 Jan 2004 17:54:20 -0000
@@ -115,10 +115,13 @@
   dnl flag.
   CFLAGS="-g" 
 
+  JNI_CFLAGS=
   dnl We want warnings, lots of warnings :-)
   if test "x${GCC}" = xyes; then
     JAPHAR_GREP_CFLAGS(-Wall, [ CFLAGS="$CFLAGS -Wall" ])
+    JNI_CFLAGS=-std=c89
   fi
+  AC_SUBST(JNI_CFLAGS)
 
   dnl Check for AWT related glib/gtk/libart_lgpl
   if test "x${COMPILE_GTK_PEER}" = xyes; then
Index: native/jni/gtk-peer/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- native/jni/gtk-peer/Makefile.am 2 Dec 2003 19:42:10 -0000 1.3
+++ native/jni/gtk-peer/Makefile.am 20 Jan 2004 17:54:42 -0000
@@ -39,7 +39,7 @@
 INCLUDES = -I. @EXTRA_INCLUDES@ \
           @GTK_CFLAGS@ \
           @LIBART_CFLAGS@ \
+          $(JNI_CFLAGS) \
           -I$(top_srcdir)/native/jni/classpath \
            -I$(top_srcdir)/include \
           -I$(top_builddir)/include
-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]