[jffi-next] 03/22: Add S390x patches to 0.6 branch

Tim Potter tpot-guest at moszumanska.debian.org
Wed Mar 4 04:51:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

tpot-guest pushed a commit to tag 0.6.0.1
in repository jffi-next.

commit 46422c7400d6a4c1de0e9a6f5ae54185b5d5b7ec
Author: Wayne Meissner <wmeissner at gmail.com>
Date:   Thu Sep 24 00:47:05 2009 +1000

    Add S390x patches to 0.6 branch
---
 build.xml                        |  1 +
 custom-build.xml                 |  1 +
 jni/GNUmakefile                  |  4 ++++
 libtest/GNUmakefile              |  4 ++++
 src/com/kenai/jffi/Platform.java | 18 +++++++++++-------
 5 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index d4dc888..621572d 100644
--- a/build.xml
+++ b/build.xml
@@ -77,6 +77,7 @@
             <os arch="amd64"/>
             <os arch="x86_64"/>
             <os arch="sparcv9"/>
+            <os arch="s390x"/>
           </or>
         </condition>
         <condition property="run.jvm.model" value="-d32">
diff --git a/custom-build.xml b/custom-build.xml
index 14e8038..d982f32 100644
--- a/custom-build.xml
+++ b/custom-build.xml
@@ -207,6 +207,7 @@
             filesetmanifest="skip">
             <zipfileset src="${dist.dir}/${platform}.jar"/>
             <zipfileset src="archive/i386-Linux.jar"/>
+            <zipfileset src="archive/s390x-Linux.jar"/>
             <zipfileset src="archive/Darwin.jar"/>
             <zipfileset src="archive/i386-SunOS.jar"/>
             <zipfileset src="archive/x86_64-SunOS.jar"/>
diff --git a/jni/GNUmakefile b/jni/GNUmakefile
index b2fea46..587afe4 100755
--- a/jni/GNUmakefile
+++ b/jni/GNUmakefile
@@ -133,6 +133,10 @@ ifeq ($(CPU), x86_64)
   MODEL = 64
 endif
 
+ifeq ($(CPU), s390x)
+  MODEL = 64
+endif
+
 # On platforms (linux, solaris) that support both 32bit and 64bit, force building for one or the other
 ifneq ($(strip $(findstring $(OS), linux solaris)),)
   # Change the CC/LD instead of CFLAGS/LDFLAGS, incase other things in the flags
diff --git a/libtest/GNUmakefile b/libtest/GNUmakefile
index 6455564..173102f 100644
--- a/libtest/GNUmakefile
+++ b/libtest/GNUmakefile
@@ -106,6 +106,10 @@ ifeq ($(CPU), x86_64)
   MODEL = 64
 endif
 
+ifeq ($(CPU), s390x)
+  MODEL = 64
+endif
+
 # On platforms (linux, solaris) that support both 32bit and 64bit, force building for one or the other
 ifneq ($(strip $(findstring $(OS), linux solaris)),)
   # Change the CC/LD instead of CFLAGS/LDFLAGS, incase other things in the flags
diff --git a/src/com/kenai/jffi/Platform.java b/src/com/kenai/jffi/Platform.java
index b60c5e2..c8f5b28 100644
--- a/src/com/kenai/jffi/Platform.java
+++ b/src/com/kenai/jffi/Platform.java
@@ -51,6 +51,9 @@ public abstract class Platform {
         WINDOWS,
         /** IBM AIX */
         AIX,
+        /** IBM zOS **/
+        ZLINUX,
+
         /** No idea what the operating system is */
         UNKNOWN;
 
@@ -77,6 +80,8 @@ public abstract class Platform {
         SPARC,
         /** Sun sparc 64 bit */
         SPARCV9,
+        /** IBM zSeries S/390 64 bit */
+        S390X,
         /** Unknown CPU */
         UNKNOWN;
 
@@ -152,13 +157,11 @@ public abstract class Platform {
             return CPU.X86_64;
         } else if ("ppc".equals(archString) || "powerpc".equals(archString)) {
             return CPU.PPC;
-        } else if ("ppc64".equals(archString)) {
-            return CPU.PPC64;
-        } else if ("sparc".equals(archString)) {
-            return CPU.SPARC;
-        } else if ("sparcv9".equals(archString)) {
-            return CPU.SPARCV9;
-        } else {
+        }
+        // Try to find by lookup up in the CPU list
+        try {
+            return CPU.valueOf(archString.toUpperCase());
+        } catch (IllegalArgumentException ex) {
             throw new ExceptionInInitializerError("Unsupported CPU architecture: " + archString);
         }
     }
@@ -189,6 +192,7 @@ public abstract class Platform {
                 case X86_64:
                 case PPC64:
                 case SPARCV9:
+                case S390X:
                     dataModel = 64;
                     break;
                 default:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jffi-next.git



More information about the pkg-java-commits mailing list