This is the mail archive of the java-patches@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: gtk-peer compile fixes for gcc-2.95


Hi,

On Thu, 2004-04-01 at 01:36, Tom Tromey wrote:
> It is better to set AM_CFLAGS instead.  You can set this
> in configure.ac just fine.  There's also a standard trick for
> handling gcc-specific options:
> 
>     AM_CFLAGS=
>     if test "$GCC" = yes; then
>       AM_CFLAGS='-std=c89 -Wfoo -Wbar'
>     fi
>     AC_SUBST(AM_CFLAGS)

Thanks for that tip.
The attached patch does that and enables -Wall for GNU Classpath.
There are some interesting warnings in the code and I think I already
found one issue with TARGET_NATIVE_FILE_FILEPERMISSION_READONLY that
could prevent proper compilation/execution on certain platforms.

> We set CFLAGS to -g in a specific case, that is sort of different
> since it claims to work around bugs in the infamous gcc "2.96".  I'd
> prefer we avoid this in general.

I have just removed this for now.
Will test on a system with 2.96 when I can.

The patch also removes some of the special JAPHAR and KAFFE support that
hasn't worked for years anyway. (Since as Tom pointed out, we should
remove code that isn't supported anymore anyway.

It fixes all issues found when compiling with -std=c89. Lots in the gtk
peers I am afraid. So please yell and scream if this is to intrusive. It
would be good if the gtk-peer stuff in libgcj was also compiled with
this flag.

No ChangeLog entry for now and not tested much yet (it doesn't seem to
break things spectacularly so I think this is generally OK). Will finish
this later this week. But please let me know if the general idea of the
patch is objectionable.

Cheers,

Mark
Index: acinclude.m4
===================================================================
RCS file: /cvsroot/classpath/classpath/acinclude.m4,v
retrieving revision 1.32
diff -u -r1.32 acinclude.m4
--- acinclude.m4	29 Mar 2004 07:07:24 -0000	1.32
+++ acinclude.m4	4 Apr 2004 22:41:52 -0000
@@ -1,193 +1,5 @@
 dnl Used by aclocal to generate configure
 
-dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
-AC_DEFUN([JAPHAR_GREP_CFLAGS],
-[case "$CFLAGS" in
-"$1" | "$1 "* | *" $1" | *" $1 "* )
-  ifelse($#, 3, [$3], [:])
-  ;;
-*)
-  $2
-  ;;
-esac
-])
-
-dnl CLASSPATH_CHECK_JAPHAR
-AC_DEFUN([CLASSPATH_CHECK_JAPHAR],
-[
-  if test "x$1" = x; then
-    AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", $PATH:/usr/local/japhar/bin:/usr/japhar/bin)
-  else
-    AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", $1/bin:$PATH)
-  fi
-  if test "x${JAPHAR_CONFIG}" = x; then
-    echo "configure: cannot find japhar-config: is Japhar installed?" 1>&2
-    exit 1
-  fi
-  AC_MSG_CHECKING(for Japhar)
-  JAPHAR_PREFIX="`$JAPHAR_CONFIG --prefix`"
-  JAPHAR_CFLAGS="`$JAPHAR_CONFIG compile`"
-  JAPHAR_LIBS="`$JAPHAR_CONFIG link`"
-  JVM="yes"
-  JVM_REFERENCE="reference"
-  AC_SUBST(JAPHAR_PREFIX)
-  AC_SUBST(JAPHAR_CFLAGS)
-  AC_SUBST(JAPHAR_LIBS)
-  AC_SUBST(JVM)
-  AC_SUBST(JVM_REFERENCE)
-  conditional_with_japhar=true
-  AC_MSG_RESULT(yes)
-
-  dnl define WITH_JAPHAR for native compilation
-  AC_DEFINE(WITH_JAPHAR)
-
-  dnl Reset prefix so that we install into Japhar directory
-  prefix=$JAPHAR_PREFIX
-  AC_SUBST(prefix)
-
-  dnl programs we probably need somewhere
-  _t_bindir=`$JAPHAR_CONFIG info bindir`
-  _t_datadir=`$JAPHAR_CONFIG info datadir`
-  AC_PATH_PROG(JAPHAR_JABBA, japhar, "", $_t_bindir:$PATH)
-  AC_PATH_PROG(JAPHAR_JAVAC, javac, "", $_t_bindir:$PATH)
-  AC_PATH_PROG(JAPHAR_JAVAH, javah, "", $_t_bindir:$PATH)
-  AC_MSG_CHECKING(for Japhar classes)
-  if test -e $_t_datadir/classes.zip; then
-    JAPHAR_CLASSLIB=$_t_datadir/classes.zip
-  elif test -e $_t_datadir/classes.jar; then
-    JAPHAR_CLASSLIB=$_t_datadir/classes.jar
-  elif test -e $_t_datadir/rt.jar; then
-    JAPHAR_CLASSLIB=$_t_datadir/rt.jar
-  elif test -e $_t_datadir/rt.zip; then
-    JAPHAR_CLASSLIB=$_t_datadir/rt.zip
-  fi
-  if test $JAPHAR_CLASSLIB ; then
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_RESULT(no)
-  fi
-  AC_SUBST(JAPHAR_CLASSLIB)
-])
-
-dnl CLASSPATH_CHECK_KAFFE
-AC_DEFUN([CLASSPATH_CHECK_KAFFE],
-[
-  AC_PATH_PROG(KAFFE_CONFIG, kaffe-config, "", $PATH:/usr/local/kaffe/bin:/usr/kaffe/bin)
-  if test "x${KAFFE_CONFIG}" = x; then
-    echo "configure: cannot find kaffe-config: is Kaffe installed?" 1>&2
-    exit 1
-  fi
-  AC_MSG_CHECKING(for Kaffe)
-
-  KAFFE_PREFIX="`$KAFFE_CONFIG --prefix`"
-  KAFFE_CFLAGS="`$KAFFE_CONFIG compile`"
-  KAFFE_LIBS="`$KAFFE_CONFIG link`"
-  JVM="yes"
-  JVM_REFERENCE="kaffe"
-  AC_SUBST(KAFFE_PREFIX)
-  AC_SUBST(KAFFE_CFLAGS)
-  AC_SUBST(KAFFE_LIBS)
-  AC_SUBST(JVM)
-  AC_SUBST(JVM_REFERENCE)
-
-  conditional_with_kaffe=true
-  AC_MSG_RESULT(yes)
-
-  dnl define WITH_KAFFE for native compilation
-  AC_DEFINE(WITH_KAFFE)
-
-  dnl Reset prefix so that we install into the Kaffe directory
-  prefix=$KAFFE_PREFIX
-  AC_SUBST(prefix)
-
-  dnl programs we probably need somewhere
-  _t_bindir=`$KAFFE_CONFIG info bindir`
-  _t_datadir=`$KAFFE_CONFIG info datadir`
-  AC_PATH_PROG(KAFFE_JABBA, kaffe, "", $_t_bindir:$PATH)
-
-  AC_MSG_CHECKING(for kjc)
-  if test -e $_t_datadir/kaffe/kjc.jar; then
-    KJC_CLASSPATH=$_t_datadir/kaffe/kjc.jar
-    AC_SUBST(KJC_CLASSPATH)
-    conditional_with_kjc=true
-    AC_MSG_RESULT(${withval})
-  elif test -e $_t_datadir/kjc.jar; then
-    KJC_CLASSPATH=$_t_datadir/kjc.jar
-    AC_SUBST(KJC_CLASSPATH)
-    conditional_with_kjc=true
-    AC_MSG_RESULT(${withval})
-  else
-    conditional_with_kjc=false
-    AC_MSG_RESULT(no)
-  fi
-  
-  AC_PATH_PROG(KAFFE_JAVAH, kaffeh, "", $_t_bindir:$PATH)
-
-  AC_MSG_CHECKING(for Kaffe classes)
-  KAFFE_CLASSLIB=""
-  if test -e $_t_datadir/glibj.jar; then
-    KAFFE_CLASSLIB=$_t_datadir/glibj.jar
-  elif test -e $_t_datadir/kaffe/glibj.jar; then
-    KAFFE_CLASSLIB=$_t_datadir/kaffe/glibj.jar
-  elif test -e $_t_datadir/Klasses.jar; then
-    KAFFE_CLASSLIB=$_t_datadir/Klasses.jar
-  elif test -e $_t_datadir/kaffe/Klasses.jar; then
-    KAFFE_CLASSLIB=$_t_datadir/kaffe/Klasses.jar
-  else
-    AC_MSG_RESULT(no)
-  fi
-  AC_MSG_RESULT(yes)
-  if test -e $_t_datadir/rmi.jar; then
-    KAFFE_CLASSLIB=$KAFFE_CLASSLIB:$_t_datadir/rmi.jar
-  fi
-  if test -e $_t_datadir/kaffe/rmi.jar; then
-    KAFFE_CLASSLIB=$KAFFE_CLASSLIB:$_t_datadir/kaffe/rmi.jar
-  fi
-  if test -e $_t_datadir/tools.jar; then
-    KAFFE_CLASSLIB=$KAFFE_CLASSLIB:$_t_datadir/tools.jar
-  fi
-  if test -e $_t_datadir/kaffe/tools.jar; then
-    KAFFE_CLASSLIB=$KAFFE_CLASSLIB:$_t_datadir/kaffe/tools.jar
-  fi
-
-  AC_SUBST(KAFFE_CLASSLIB)
-])
-
-dnl CLASSPATH_WITH_JAPHAR - checks for japhar
-AC_DEFUN([CLASSPATH_WITH_JAPHAR],
-[
-  AC_ARG_WITH(japhar, 
-  [  --with-japhar		  configure GNU Classpath for Japhar [default=yes]],
-  [
-    if test "x${withval}" = xyes || test "x${withval}" = x; then
-      CLASSPATH_CHECK_JAPHAR
-    elif test "x${withval}" != xno || test "x${withval}" != xfalse; then
-      CLASSPATH_CHECK_JAPHAR(${withval})
-    fi
-  ],
-  [ 
-    conditional_with_japhar=false
-    JAPHAR_CFLAGS=""
-    AC_SUBST(JAPHAR_CFLAGS)
-  ])
-])
-
-dnl CLASSPATH_WITH_KAFFE - checks for which java virtual machine to use
-AC_DEFUN([CLASSPATH_WITH_KAFFE],
-[
-  AC_ARG_WITH(kaffe, 
-  [  --with-kaffe		  configure GNU Classpath for Kaffe [default=no]],
-  [   
-    if test "x${withval}" = xyes || test "x${withval}" = x; then
-      CLASSPATH_CHECK_KAFFE
-    fi
-  ],
-  [ conditional_with_kaffe=false
-    KAFFE_CFLAGS=""
-    AC_SUBST(KAFFE_CFLAGS)
-  ])
-])
-
 dnl threads packages (mostly stolen from Japhar)
 dnl given that japhar-config gives -lpthread, may not need this (cbj)
 AC_DEFUN([CLASSPATH_CHECK_THREADS],
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.13
diff -u -r1.13 configure.ac
--- configure.ac	29 Mar 2004 07:07:24 -0000	1.13
+++ configure.ac	4 Apr 2004 22:41:52 -0000
@@ -110,15 +110,11 @@
   dnl FIXME - does not allow cross compiling
   AC_C_BIGENDIAN
 
-  dnl We want to avoid -O2 at the moment, gcc 2.96 from Red Hat 7
-  dnl cannot compile some native functions (gcc errors) with this
-  dnl flag.
-  CFLAGS="-g" 
-
-  dnl We want warnings, lots of warnings :-)
+  AM_CFLAGS=
   if test "x${GCC}" = xyes; then
-    JAPHAR_GREP_CFLAGS(-Wall, [ CFLAGS="$CFLAGS -Wall" ])
+    AM_CFLAGS='-std=c89 -Wall'
   fi
+  AC_SUBST(AM_CFLAGS)
 
   dnl Check for AWT related gthread/gtk/libart_lgpl
   if test "x${COMPILE_GTK_PEER}" = xyes; then
@@ -214,23 +210,6 @@
                 fi
               ])
 AC_SUBST(INIT_LOAD_LIBRARY)
-dnl -----------------------------------------------------------
-
-
-dnl -----------------------------------------------------------
-dnl Small loop to add other things to EXTRA_INCLUDES from a VM
-dnl -----------------------------------------------------------
-dnl for i in $JAPHAR_CFLAGS $KAFFE_CFLAGS ; do
-dnl   add_to_extra_includes=1
-dnl   for j in $EXTRA_INCLUDES ; do
-dnl     if test $i = $j ; then
-dnl       add_to_extra_includes=0
-dnl     fi
-dnl   done
-dnl   if test $add_to_extra_includes -eq 1; then
-dnl     EXTRA_INCLUDES="$EXTRA_INCLUDES $i"
-dnl   fi
-dnl done
 dnl -----------------------------------------------------------
 
 
Index: native/fdlibm/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/Makefile.am,v
retrieving revision 1.2
diff -u -r1.2 Makefile.am
--- native/fdlibm/Makefile.am	7 Feb 2002 14:18:45 -0000	1.2
+++ native/fdlibm/Makefile.am	4 Apr 2004 22:41:54 -0000
@@ -15,7 +15,6 @@
 			e_sqrt.c \
 			fdlibm.h \
 			ieeefp.h \
-			java-assert.h \
 			k_cos.c \
 			k_rem_pio2.c \
 			k_sin.c \
Index: native/fdlibm/java-assert.h
===================================================================
RCS file: native/fdlibm/java-assert.h
diff -N native/fdlibm/java-assert.h
--- native/fdlibm/java-assert.h	5 Nov 2001 02:56:47 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-// java-assert.h - Header file holding assertion definitions.  -*- c++ -*-
-
-/* Copyright (C) 1998, 1999  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-#ifndef __JAVA_ASSERT_H__
-#define __JAVA_ASSERT_H__
-
-// This is a libgcj implementation header.
-
-void _Jv_Abort (const char *, const char *, int, const char *)
-  __attribute__ ((__noreturn__));
-
-#ifdef DEBUG
-#define _Jv_AssertDoCall(Message) _Jv_Abort (__FUNCTION__, __FILE__, __LINE__, Message)
-
-#define JvAssertMessage(Expr, Message) \
-   do { if (! (Expr)) _Jv_AssertDoCall (Message); } while (0)
-#define JvAssert(Expr) \
-   do { if (! (Expr)) _Jv_AssertDoCall (# Expr); } while (0)
-
-#define JvFail(Message) _Jv_AssertDoCall (Message)
-
-#else /* DEBUG */
-
-#define _Jv_AssertDoCall(Message)
-#define JvAssertMessage(Expr, Message)
-#define JvAssert(Expr)
-#define JvFail(Message) _Jv_Abort (0, 0, 0, Message)
-
-#endif /* not DEBUG */
-
-#endif /* __JAVA_ASSERT_H__ */
Index: native/fdlibm/mprec.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/mprec.c,v
retrieving revision 1.3
diff -u -r1.3 mprec.c
--- native/fdlibm/mprec.c	29 Mar 2004 07:07:26 -0000	1.3
+++ native/fdlibm/mprec.c	4 Apr 2004 22:41:54 -0000
@@ -82,7 +82,6 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <java-assert.h>
 #include "mprec.h"
 
 /* reent.c knows this value */
Index: native/fdlibm/mprec.h
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/mprec.h,v
retrieving revision 1.3
diff -u -r1.3 mprec.h
--- native/fdlibm/mprec.h	29 Mar 2004 07:07:26 -0000	1.3
+++ native/fdlibm/mprec.h	4 Apr 2004 22:41:54 -0000
@@ -32,10 +32,6 @@
 #include <config.h>
 #include "ieeefp.h"
 
-// #include <math.h>
-// #include <float.h>
-// #include <errno.h>
-
 #if defined HAVE_STDINT_H
 #include <stdint.h>
 #elif defined HAVE_INTTYPES_H
@@ -61,7 +57,7 @@
 #endif
 
 #if !defined HAVE_BSD_INT32_DEFINED && !defined HAVE_INT32_DEFINED
-// FIXME -- this could have problems with systems that don't define SI to be 4
+/* FIXME this could have problems with systems that don't define SI to be 4 */
 typedef int int32_t __attribute__((mode(SI)));
 
 /* This is a blatant hack: on Solaris 2.5, pthread.h defines uint32_t
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c,v
retrieving revision 1.10
diff -u -r1.10 gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c	29 Mar 2004 07:07:26 -0000	1.10
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c	4 Apr 2004 22:41:54 -0000
@@ -230,7 +230,6 @@
 static void
 item_toggled (GtkToggleButton *item, jobject peer)
 {
-  //g_print ("toggled\n");
   (*gdk_env)->CallVoidMethod (gdk_env, peer,
 			      postItemEventID,
 			      peer,
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,v
retrieving revision 1.23
diff -u -r1.23 gnu_java_awt_peer_gtk_GtkComponentPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	29 Mar 2004 07:07:26 -0000	1.23
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	4 Apr 2004 22:41:54 -0000
@@ -610,10 +610,12 @@
 gboolean
 filter_expose_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer)
 {
-  // Prevent the default event handler from getting this signal if applicable
-  // FIXME: I came up with these filters by looking for patterns in the unwanted
-  //        expose events that are fed back to us from gtk/X. Perhaps there is
-  //        a way to prevent them from occuring in the first place.
+  /*
+   * Prevent the default event handler from getting this signal if applicable
+   * FIXME: I came up with these filters by looking for patterns in the unwanted
+   *        expose events that are fed back to us from gtk/X. Perhaps there is
+   *        a way to prevent them from occuring in the first place.
+   */
   if (event->type == GDK_EXPOSE && (!GTK_IS_LAYOUT(widget)
                                     || event->any.window != widget->window))
     {
@@ -622,8 +624,8 @@
     }
   else
     {
-      // There may be non-expose events that are triggered while we're
-      // painting a heavyweight peer.
+      /* There may be non-expose events that are triggered while we're
+        painting a heavyweight peer. */
       return pre_event_handler(widget, event, peer);
     }
 }
@@ -641,8 +643,8 @@
 
   gdk_threads_enter ();
 
-  // GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow.
-  // Events go to the GtkLayout layer, so we filter them there.
+  /* GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow.
+     Events go to the GtkLayout layer, so we filter them there. */
   if (GTK_IS_WINDOW(ptr))
     {
       children = gtk_container_get_children(GTK_CONTAINER(ptr));
@@ -685,8 +687,8 @@
 
   gdk_threads_enter ();
 
-  // GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow.
-  // Events go to the GtkLayout layer, so we filter them there.
+  /* GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow.
+     Events go to the GtkLayout layer, so we filter them there. */
   if (GTK_IS_WINDOW(ptr))
     {
       children = gtk_container_get_children(GTK_CONTAINER(ptr));
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c,v
retrieving revision 1.24
diff -u -r1.24 gnu_java_awt_peer_gtk_GtkEvents.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c	29 Mar 2004 07:07:26 -0000	1.24
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c	4 Apr 2004 22:41:54 -0000
@@ -934,9 +934,9 @@
 				    click_count,
 				    JNI_FALSE);
 
-	// Generate an AWT click event only if the release occured in the
-	// window it was pressed in, and the mouse has not been dragged since
-	// the last time it was pressed.
+	/* Generate an AWT click event only if the release occured in the
+	   window it was pressed in, and the mouse has not been dragged since
+	   the last time it was pressed. */
 	gdk_window_get_size (event->any.window, &width, &height);
 	if (! hasBeenDragged
 	    && event->button.x >= 0
@@ -1038,11 +1038,11 @@
       break;
     case GDK_EXPOSE:
       {
-        // This filters out unwanted feedback expose events from gtk/X
-        // when we explictly invalidate and update heavyweight components,
-        // thus avoiding an infinite loop.
-        // FIXME: I'm not quite sure why we're getting these expose events. 
-        //        Maybe there is a way to avoid them?
+        /* This filters out unwanted feedback expose events from gtk/X
+           when we explictly invalidate and update heavyweight components,
+           thus avoiding an infinite loop.
+           FIXME: I'm not quite sure why we're getting these expose events. 
+                  Maybe there is a way to avoid them? */
         if((event->any.window == widget->window && event->any.send_event)
            || GTK_IS_LAYOUT(widget))
           {
@@ -1181,7 +1181,6 @@
 			 | GDK_KEY_PRESS_MASK
 			 | GDK_FOCUS_CHANGE_MASK);
 
-  //  g_print("storing obj %p property on window %p\n", obj, window);
   gdk_property_change (window,
 		       addr_atom,
 		       type_atom,
@@ -1196,10 +1195,8 @@
 {
   va_list ap;
   jobject *obj;
-  //void *ptr = NSA_GET_PTR (env, peer_obj);
 
   obj = NSA_GET_GLOBAL_REF (env, peer_obj);
-  //g_print("Connection obj %s\n", gtk_widget_get_name (GTK_WIDGET (ptr)));
   g_assert (obj);
 
   va_start (ap, nwindows);
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c,v
retrieving revision 1.9
diff -u -r1.9 gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c	29 Mar 2004 07:07:27 -0000	1.9
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c	4 Apr 2004 22:41:54 -0000
@@ -156,7 +156,7 @@
   static jmethodID disposeID;
   void *ptr;
 
-  // We only need this for the case when the user closed the window
+  /* We only need this for the case when the user closed the window. */
   if (responseId != GTK_RESPONSE_DELETE_EVENT)
     return;
 
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c,v
retrieving revision 1.10
diff -u -r1.10 gnu_java_awt_peer_gtk_GtkListPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c	29 Mar 2004 07:07:27 -0000	1.10
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c	4 Apr 2004 22:41:54 -0000
@@ -324,7 +324,6 @@
 	     GdkEventButton *event __attribute__((unused)), 
 	     jobject peer_obj)
 {
-  //g_print ("select_row\n");
   (*gdk_env)->CallVoidMethod (gdk_env, peer_obj,
 			      postListItemEventID,
 			      row,
@@ -338,7 +337,6 @@
 	       GdkEventButton *event __attribute__((unused)),
 	       jobject peer_obj)
 {
-  //g_print ("unselect_row\n");
   (*gdk_env)->CallVoidMethod (gdk_env, peer_obj,
 			      postListItemEventID,
 			      row,
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c,v
retrieving revision 1.13
diff -u -r1.13 gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c	29 Mar 2004 07:07:27 -0000	1.13
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c	4 Apr 2004 22:41:54 -0000
@@ -112,8 +112,8 @@
 {
   void *ptr;
   int pos = 0;
-  GtkEditable *editable;    // type of GtkEntry    (TextField)
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkEditable *editable;    /* type of GtkEntry    (TextField) */
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
   GtkTextBuffer *buf;
   GtkTextMark *mark;
   GtkTextIter iter;
@@ -157,8 +157,8 @@
   (JNIEnv *env, jobject obj, jint pos)
 {
   void *ptr;
-  GtkEditable *editable;    // type of GtkEntry    (TextField)
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkEditable *editable;    /* type of GtkEntry    (TextField) */
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
   GtkTextBuffer *buf;
   GtkTextIter iter;
 
@@ -198,8 +198,8 @@
 {
   void *ptr;
   int pos = 0;
-  GtkEditable *editable;    // type of GtkEntry    (TextField)
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkEditable *editable;    /* type of GtkEntry    (TextField) */
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
   GtkTextBuffer *buf;
   GtkTextIter start;
   GtkTextIter end;
@@ -255,8 +255,8 @@
 {
   void *ptr;
   int pos = 0;
-  GtkEditable *editable;    // type of GtkEntry    (TextField)
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkEditable *editable;    /* type of GtkEntry    (TextField) */
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
   GtkTextBuffer *buf;
   GtkTextIter start;
   GtkTextIter end;
@@ -311,8 +311,8 @@
   (JNIEnv *env, jobject obj, jint start, jint end)
 {
   void *ptr;
-  GtkEditable *editable;    // type of GtkEntry    (TextField)
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkEditable *editable;    /* type of GtkEntry    (TextField) */
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
   GtkTextBuffer *buf;
   GtkTextIter iter;
 
@@ -357,8 +357,8 @@
   (JNIEnv *env, jobject obj, jboolean state)
 {
   void *ptr;
-  GtkEditable *editable;    // type of GtkEntry    (TextField)
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkEditable *editable;    /* type of GtkEntry    (TextField) */
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
 
   ptr = NSA_GET_PTR (env, obj);
 
@@ -396,8 +396,8 @@
   void *ptr;
   char *contents = NULL;
   jstring jcontents;
-  GtkEditable *editable;    // type of GtkEntry    (TextField)
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkEditable *editable;    /* type of GtkEntry    (TextField) */
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
   GtkTextBuffer *buf;
   GtkTextIter start, end;
 
@@ -444,7 +444,7 @@
 {
   void *ptr;
   const char *str;
-  GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
+  GtkWidget *text = NULL;   /* type of GtkTextView (TextArea) */
   GtkTextBuffer *buf;
 
   ptr = NSA_GET_PTR (env, obj);
Index: native/jni/gtk-peer/gthread-jni.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gthread-jni.c,v
retrieving revision 1.8
diff -u -r1.8 gthread-jni.c
--- native/jni/gtk-peer/gthread-jni.c	29 Mar 2004 07:07:27 -0000	1.8
+++ native/jni/gtk-peer/gthread-jni.c	4 Apr 2004 22:41:54 -0000
@@ -204,7 +204,7 @@
 static gboolean g_mutex_trylock_jni_impl
   (GMutex *mutex __attribute__((unused)))
 {
-  // Shall we implement this in a JikesRVM-specific way under a flag?
+  /* XXX Shall we implement this in a JikesRVM-specific way under a flag? */
   return FALSE;
 }
 
Index: native/jni/java-io/FileDescriptor.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-io/FileDescriptor.c,v
retrieving revision 1.17
diff -u -r1.17 FileDescriptor.c
--- native/jni/java-io/FileDescriptor.c	29 Mar 2004 07:07:27 -0000	1.17
+++ native/jni/java-io/FileDescriptor.c	4 Apr 2004 22:41:55 -0000
@@ -65,19 +65,19 @@
 
 #include "java_io_FileDescriptor.h"
 
-// FIXME: This can't be right.  Need converter macros
+/* FIXME: This can't be right.  Need converter macros */
 #define CONVERT_JLONG_TO_INT(x) TARGET_NATIVE_MATH_INT_INT64_TO_INT32(x)
 #define CONVERT_INT_TO_JLONG(x) TARGET_NATIVE_MATH_INT_INT32_TO_INT64(x)
 
-// FIXME: This can't be right.  Need converter macros
+/* FIXME: This can't be right.  Need converter macros */
 #define CONVERT_JLONG_TO_OFF_T(x) TARGET_NATIVE_MATH_INT_INT64_TO_INT32(x)
 #define CONVERT_OFF_T_TO_JLONG(x) TARGET_NATIVE_MATH_INT_INT32_TO_INT64(x)
 
-// FIXME: This can't be right.  Need converter macros
+/* FIXME: This can't be right.  Need converter macros */
 #define CONVERT_JINT_TO_INT(x) ((int)(x & 0xFFFFFFFF))
 #define CONVERT_INT_TO_JINT(x) ((int)(x & 0xFFFFFFFF))
 
-// FIXME: This can't be right.  Need converter macros
+/* FIXME: This can't be right.  Need converter macros */
 #define CONVERT_SSIZE_T_TO_JINT(x) ((jint)(x & 0xFFFFFFFF))
 #define CONVERT_JINT_TO_SSIZE_T(x) (x)
 
@@ -420,7 +420,7 @@
       return(0);
     }
 
-// FIXME NYI ??? why only jint and not jlong?
+/* FIXME NYI ??? why only jint and not jlong? */
   return(TARGET_NATIVE_MATH_INT_INT64_TO_INT32(bytes_available));
 }
 
Index: native/jni/java-io/java_io_File.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-io/java_io_File.c,v
retrieving revision 1.12
diff -u -r1.12 java_io_File.c
--- native/jni/java-io/java_io_File.c	29 Mar 2004 07:07:27 -0000	1.12
+++ native/jni/java-io/java_io_File.c	4 Apr 2004 22:41:55 -0000
@@ -81,7 +81,7 @@
   TARGET_NATIVE_FILE_OPEN_CREATE(filename,fd,result);
   if (result != TARGET_NATIVE_OK)
     {
-//??? NYI
+      /* XXX NYI ??? */
       if (errno != EEXIST)
         JCL_ThrowException(env,
                            "java/io/IOException",
Index: native/jni/java-io/javaio.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-io/javaio.c,v
retrieving revision 1.11
diff -u -r1.11 javaio.c
--- native/jni/java-io/javaio.c	29 Mar 2004 07:07:27 -0000	1.11
+++ native/jni/java-io/javaio.c	4 Apr 2004 22:41:55 -0000
@@ -64,7 +64,6 @@
   int        fd;
   int        result;
 
-// fprintf(stderr,"call %s (line %d):\n",__FUNCTION__,__LINE__);
   filename = JCL_jstring_to_cstring(env, name); 
   if (filename == NULL)
     return(-1);
@@ -101,7 +100,6 @@
   int        fd;
   int        result;
 
-// fprintf(stderr,"call %s (line %d):\n",__FUNCTION__,__LINE__);
   filename = JCL_jstring_to_cstring(env, name); 
   if (filename == NULL)
     return(-1);
@@ -163,7 +161,6 @@
   jlong current_offset, new_offset;
   int   result;
 
-// fprintf(stderr,"call %s (line %d):\n",__FUNCTION__,__LINE__);
   TARGET_NATIVE_FILE_SEEK_CURRENT(fd,TARGET_NATIVE_MATH_INT_INT64_CONST_0,current_offset,result);
   if (result != TARGET_NATIVE_OK)
     JCL_ThrowException(env,
@@ -195,7 +192,6 @@
   jlong length;
   int   result;
 
-// fprintf(stderr,"call %s (line %d):\n",__FUNCTION__,__LINE__);
   TARGET_NATIVE_FILE_SIZE(fd,length,result);
   if (result != TARGET_NATIVE_OK)
     {
@@ -229,7 +225,6 @@
   assert(offset>=0);
   assert(len>=0);
 
-// fprintf(stderr,"call %s (line %d):\n",__FUNCTION__,__LINE__);
   if (len == 0)
     return 0; /* Nothing todo, and GetByteArrayElements() seems undefined. */
 
@@ -258,7 +253,6 @@
   assert(offset>=0);
   assert(len>=0);
 
-// fprintf(stderr,"call %s (line %d):\n",__FUNCTION__,__LINE__);
   if ((fd==0) || (fd==1) || (fd==2))
   {
     if (len == 0)
Index: native/jni/java-net/javanet.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-net/javanet.c,v
retrieving revision 1.15
diff -u -r1.15 javanet.c
--- native/jni/java-net/javanet.c	29 Mar 2004 07:07:39 -0000	1.15
+++ native/jni/java-net/javanet.c	4 Apr 2004 22:41:55 -0000
@@ -1,5 +1,5 @@
 /* javanet.c - Common internal functions for the java.net package
-   Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -681,7 +681,7 @@
     }
   DBG("_javanet_bind(): Past native_fd lookup\n");
 
-// NYI ???
+/* XXX NYI ??? */
   _javanet_set_option (env, this, SOCKOPT_SO_REUSEADDR, 
 		       _javanet_create_boolean (env, JNI_TRUE));
 
@@ -1099,7 +1099,8 @@
 
         TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT(fd,optval,result);
 #endif
-	result = TARGET_NATIVE_OK;  // ignore errors and do not throw an exception
+	/* Ignore errors and do not throw an exception. */
+	result = TARGET_NATIVE_OK;
         break;
 
       case SOCKOPT_SO_SNDBUF:
Index: native/target/generic/target_generic_file.h
===================================================================
RCS file: /cvsroot/classpath/classpath/native/target/generic/target_generic_file.h,v
retrieving revision 1.15
diff -u -r1.15 target_generic_file.h
--- native/target/generic/target_generic_file.h	29 Mar 2004 07:07:40 -0000	1.15
+++ native/target/generic/target_generic_file.h	4 Apr 2004 22:41:55 -0000
@@ -1,5 +1,5 @@
-/* generic_math_int64.h - Native methods for 64bit math operations
-   Copyright (C) 1998 Free Software Foundation, Inc.
+/* target_generic_file.h - Generic native methods/defines for file operations.
+   Copyright (C) 1998, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -117,7 +117,7 @@
 #endif
 
 #ifndef TARGET_NATIVE_FILE_FILEPERMISSION_READONLY
-  #define TARGET_NATIVE_FILE_FILEPERMISSION_READONLY (~(S_IWRITE|S_IWGRP|S_IWOTH))
+  #define TARGET_NATIVE_FILE_FILEPERMISSION_READONLY (~(S_IWUSR|S_IWGRP|S_IWOTH))
 #endif
 
 /***************************** Datatypes *******************************/
@@ -795,7 +795,7 @@
 * Notes      : -
 \***********************************************************************/
 
-//??? name als buffer?
+/* XXX ??? name als buffer? */
 #ifndef TARGET_NATIVE_FILE_READ_DIR
   #include <sys/types.h>
   #include <dirent.h>
Index: native/target/generic/target_generic_network.h
===================================================================
RCS file: /cvsroot/classpath/classpath/native/target/generic/target_generic_network.h,v
retrieving revision 1.10
diff -u -r1.10 target_generic_network.h
--- native/target/generic/target_generic_network.h	29 Mar 2004 07:07:40 -0000	1.10
+++ native/target/generic/target_generic_network.h	4 Apr 2004 22:41:55 -0000
@@ -143,7 +143,7 @@
 * Notes      : -
 \***********************************************************************/
 
-//NYI??? reentrant?
+/* XXX NYI??? reentrant? */
 #ifndef TARGET_NATIVE_NETWORK_GET_HOSTNAME_BY_ADDRESS
   #include <netdb.h>
   #define TARGET_NATIVE_NETWORK_GET_HOSTNAME_BY_ADDRESS(address,name,maxNameLen,result) \
@@ -181,7 +181,7 @@
 * Notes      : -
 \***********************************************************************/
 
-//NYI??? reentrant?
+/* XXX NYI??? reentrant? */
 #ifndef TARGET_NATIVE_NETWORK_GET_HOSTNAME_BY_NAME
   #include <netdb.h>
   #define TARGET_NATIVE_NETWORK_GET_HOSTNAME_BY_NAME(name,addresses,maxAddressSize,addressCount,result) \
@@ -317,7 +317,7 @@
 * Notes      : -
 \***********************************************************************/
 
-//??? address in network byte order?
+/* XXX ??? address in network byte order? */
 #ifndef TARGET_NATIVE_NETWORK_SOCKET_BIND
   #include <sys/types.h>
   #include <sys/socket.h>
@@ -347,7 +347,7 @@
 * Notes      : -
 \***********************************************************************/
 
-//??? address in network byte order?
+/* XXX ??? address in network byte order? */
 #ifndef TARGET_NATIVE_NETWORK_SOCKET_LISTEN
   #include <sys/socket.h>
   #define TARGET_NATIVE_NETWORK_SOCKET_LISTEN(socketDescriptor,maxQueueLength,result) \
@@ -367,7 +367,7 @@
 * Notes      : -
 \***********************************************************************/
 
-//??? address in network byte order?
+/* XXX ??? address in network byte order? */
 #ifndef TARGET_NATIVE_NETWORK_SOCKET_ACCEPT
   #include <sys/types.h>
   #include <sys/socket.h>

Attachment: signature.asc
Description: This is a digitally signed message part


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