classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] RFC: replacing jni_md-x86-linux.h by a generic jni_md.h


From: Dalibor Topic
Subject: [cp-patches] RFC: replacing jni_md-x86-linux.h by a generic jni_md.h
Date: Wed, 04 Jan 2006 22:56:40 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

Hi all,

the attached patch replaces the os/cpu/toolchain specific jni-md.h by a generic version that uses fixed size C99's types to typedef java types. It's been successfully used in Kaffe for a while.

cheers,
dalibor topic

2006-01-04  Dalibor Topic  <address@hidden>

        * configure.ac: Removed jni_md-*-* linking code.

        * include/Makefile.am (DISTCLEANFILES): Removed jni_md.h.

        * include/jni_md-x86-linux-gnu.h: Removed. Moved over to ...

        * include/jni_md.h: New file. Include config-int.h. Switched
        typedefs over to use C99 types where appropriate.
Index: configure.ac
===================================================================
RCS file: /sources/classpath/classpath/configure.ac,v
retrieving revision 1.123
diff -u -r1.123 configure.ac
--- configure.ac        4 Jan 2006 16:37:55 -0000       1.123
+++ configure.ac        4 Jan 2006 21:16:23 -0000
@@ -423,26 +423,6 @@
 CLASSPATH_INCLUDES="-I\$(top_srcdir)/include 
-I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux 
-I\$(top_srcdir)/native/target/generic"
 AC_SUBST(CLASSPATH_INCLUDES)
 
-dnl -----------------------------------------------------------
-if test "x${COMPILE_JNI}" = xyes; then
-  AC_MSG_CHECKING(jni_md.h support)
-  if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then
-    AC_MSG_RESULT(yes)
-  else
-    target_cpu=x86
-    target_os=linux-gnu 
-    AC_MSG_WARN(no, using x86-linux-gnu)
-  fi
-  ac_sources="include/jni_md-${target_cpu}-${target_os}.h"
-  ac_dests="include/jni_md.h"
-  while test -n "$ac_sources"; do
-    set $ac_dests; ac_dest=$1; shift; ac_dests=$*
-    set $ac_sources; ac_source=$1; shift; ac_sources=$*
-    ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
-  done
-  AC_CONFIG_LINKS([$ac_config_links_1])
-fi
-
 CLASSPATH_FIND_JAVAC
 
 CLASSPATH_WITH_CLASSLIB
Index: include/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/include/Makefile.am,v
retrieving revision 1.52
diff -u -r1.52 Makefile.am
--- include/Makefile.am 4 Jan 2006 16:37:55 -0000       1.52
+++ include/Makefile.am 4 Jan 2006 21:16:23 -0000
@@ -1,6 +1,6 @@
 include_HEADERS = jni.h jni_md.h jawt.h jawt_md.h
 
-DISTCLEANFILES = jni_md.h config-int.h
+DISTCLEANFILES = config-int.h
 
 ARG_JNI_JAVAH = -jni
 ARG_CLASSPATH_JAVAH = -bootclasspath
Index: include/jni_md-x86-linux-gnu.h
===================================================================
RCS file: include/jni_md-x86-linux-gnu.h
diff -N include/jni_md-x86-linux-gnu.h
--- include/jni_md-x86-linux-gnu.h      2 Jul 2005 20:32:22 -0000       1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-/* jni_md.h
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
- 
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING.  If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-As a special exception, if you link this library with other files to
-produce an executable, this library does not by itself cause the
-resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why the
-executable file might be covered by the GNU General Public License. */
-
-#ifndef __CLASSPATH_JNI_MD_H__
-#define __CLASSPATH_JNI_MD_H__
-
-/* Define some defaults */
-#define JNICALL
-#define JNIEXPORT
-#define JNIIMPORT
-
-typedef unsigned char jboolean;
-typedef signed char jbyte;
-typedef unsigned short jchar;
-typedef short jshort;
-typedef int jint;
-typedef long long jlong;
-typedef float jfloat;
-typedef double jdouble;
-typedef jint jsize;
-
-#endif /* __CLASSPATH_JNI_MD_H__ */
Index: include/jni_md.h
===================================================================
RCS file: include/jni_md.h
diff -N include/jni_md.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ include/jni_md.h    4 Jan 2006 21:16:29 -0000
@@ -0,0 +1,47 @@
+/* jni_md.h
+   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License. */
+
+#ifndef __CLASSPATH_JNI_MD_H__
+#define __CLASSPATH_JNI_MD_H__
+
+#include "config-int.h"
+
+/* Define some defaults */
+#define JNICALL
+#define JNIEXPORT
+#define JNIIMPORT
+
+typedef uint8_t  jboolean;
+typedef int8_t   jbyte;
+typedef uint16_t jchar;
+typedef int16_t  jshort;
+typedef int32_t  jint;
+typedef int64_t  jlong;
+typedef float    jfloat;
+typedef double   jdouble;
+typedef jint     jsize;
+
+#endif /* __CLASSPATH_JNI_MD_H__ */

reply via email to

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