Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#8299 from pshipton/zos
Browse files Browse the repository at this point in the history
Use com.ibm.jvm.io.ConsolePrintStream.localize for z/OS
  • Loading branch information
keithc-ca authored Jan 16, 2020
2 parents 4bd950a + ed0dddb commit 859442d
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 6 deletions.
1 change: 0 additions & 1 deletion debugtools/DDR_VM/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src_stubs"/>
<classpathentry kind="src" path="testsrc"/>
<classpathentry kind="lib" path="/binaries/common/ibm/ibmjzos.jar"/>
<classpathentry kind="lib" path="/binaries/vm/ibm/dtfj.pkg.tck-head.jar"/>
Expand Down
9 changes: 8 additions & 1 deletion jcl/jpp_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE configurationreg SYSTEM "http://home.ottawa.ibm.com/teams/bluebird/web/eclipse_site/jpp.dtd">
<!--
/*******************************************************************************
* Copyright (c) 2002, 2019 IBM Corp. and others
* Copyright (c) 2002, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -82,6 +82,7 @@
dependencies="SIDECAR18-SE"
jdkcompliance="1.8">
<classpathentry kind="lib" path="/binaries/vm/third/rt-compressed.sun180.jar"/>
<source path="src/com.ibm.jzos/share/classes"/>
<source path="src/java.base/share/classes"/>
<source path="src/java.desktop/share/classes"/>
<source path="src/java.logging/share/classes"/>
Expand All @@ -106,6 +107,7 @@
flags="Sidecar18-SE-OpenJ9, DAA, Open-Module-Support,Sidecar19-SE,Sidecar19-SE-OpenJ9,Java10,Java11"
dependencies="SIDECAR18-SE"
jdkcompliance="1.8">
<classpathentry kind="src" path="src/com.ibm.jzos/share/classes"/>
<classpathentry kind="src" path="src/java.base/share/classes"/>
<classpathentry kind="src" path="src/java.management/share/classes"/>
<classpathentry kind="src" path="src/jdk.attach/share/classes"/>
Expand Down Expand Up @@ -134,6 +136,7 @@
flags="Java12,Java13"
dependencies="JAVA11"
jdkcompliance="1.8">
<classpathentry kind="src" path="src/com.ibm.jzos/share/classes"/>
<classpathentry kind="src" path="src/java.base/share/classes"/>
<classpathentry kind="src" path="src/java.management/share/classes"/>
<classpathentry kind="src" path="src/jdk.attach/share/classes"/>
Expand Down Expand Up @@ -162,6 +165,7 @@
flags="Java14"
dependencies="JAVA13"
jdkcompliance="1.8">
<classpathentry kind="src" path="src/com.ibm.jzos/share/classes"/>
<classpathentry kind="src" path="src/java.base/share/classes"/>
<classpathentry kind="src" path="src/java.management/share/classes"/>
<classpathentry kind="src" path="src/jdk.attach/share/classes"/>
Expand Down Expand Up @@ -190,6 +194,7 @@
flags="Java15"
dependencies="JAVA14"
jdkcompliance="1.8">
<classpathentry kind="src" path="src/com.ibm.jzos/share/classes"/>
<classpathentry kind="src" path="src/java.base/share/classes"/>
<classpathentry kind="src" path="src/java.management/share/classes"/>
<classpathentry kind="src" path="src/jdk.attach/share/classes"/>
Expand Down Expand Up @@ -218,6 +223,7 @@
flags="OpenJ9-RawBuild"
dependencies="JAVA11"
jdkcompliance="1.8">
<classpathentry kind="src" path="src/com.ibm.jzos/share/classes"/>
<classpathentry kind="src" path="src/java.base/share/classes"/>
<classpathentry kind="src" path="src/java.management/share/classes"/>
<classpathentry kind="src" path="src/jdk.attach/share/classes"/>
Expand Down Expand Up @@ -246,6 +252,7 @@
flags="Panama"
dependencies="JAVA13"
jdkcompliance="1.8">
<classpathentry kind="src" path="src/com.ibm.jzos/share/classes"/>
<classpathentry kind="src" path="src/java.base/share/classes"/>
<classpathentry kind="src" path="src/java.management/share/classes"/>
<classpathentry kind="src" path="src/jdk.attach/share/classes"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*[INCLUDE-IF PLATFORM-mz31|PLATFORM-mz64]*/
/*******************************************************************************
* Copyright (c) 2019, 2019 IBM Corp. and others
* Copyright (c) 2019, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -50,10 +51,22 @@ public byte[] getPos() throws IOException {
return new byte[] { 0 };
}

public long getRecordCount() throws IOException {
return 0;
}

public int read(byte[] buffer) throws IOException {
return 0;
}

public int read(byte[] buf, int offset, int len) throws IOException {
return 0;
}

public void seek(long offset, int origin) throws IOException {
return;
}

public void setPos(byte[] position) throws IOException {
return;
}
Expand Down
32 changes: 32 additions & 0 deletions jcl/src/com.ibm.jzos/share/classes/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*[INCLUDE-IF Sidecar19-SE&(PLATFORM-mz31|PLATFORM-mz64)]*/
/*******************************************************************************
* Copyright (c) 2020, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
* or the Apache License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following
* Secondary Licenses when the conditions for such availability set
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
* General Public License, version 2 with the GNU Classpath
* Exception [1] and GNU General Public License, version 2 with the
* OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

/*[REM] This file must not use tabs because the dependency recognition code in openjdk does not support them. */

/**
* Provides access to z/OS datasets.
*/
module com.ibm.jzos {
requires java.base;
exports com.ibm.jzos;
}
6 changes: 3 additions & 3 deletions jcl/src/java.base/share/classes/java/lang/System.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar18-SE]*/
/*******************************************************************************
* Copyright (c) 1998, 2019 IBM Corp. and others
* Copyright (c) 1998, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -177,7 +177,7 @@ static void afterClinitInitialization() {
/*[ELSE]*/
StringCoding.encode(new char[1], 0, 1);
/*[ENDIF]*/
/*[IF Sidecar18-SE-OpenJ9|Sidecar19-SE]*/
/*[IF (Sidecar18-SE-OpenJ9|Sidecar19-SE)&!(PLATFORM-mz31|PLATFORM-mz64)]*/
setErr(new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.err)), true));
setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.out)), true));
/*[IF Sidecar19-SE_RAWPLUSJ9]*/
Expand Down Expand Up @@ -220,7 +220,7 @@ static void completeInitialization() {
}
/*[ENDIF]*/ // Sidecar18-SE-OpenJ9

/*[IF Sidecar18-SE-OpenJ9|Sidecar19-SE]*/
/*[IF (Sidecar18-SE-OpenJ9|Sidecar19-SE)&!(PLATFORM-mz31|PLATFORM-mz64)]*/
setIn(new BufferedInputStream(new FileInputStream(FileDescriptor.in)));
/*[ELSE]*/
/*[PR 100718] Initialize System.in after the main thread*/
Expand Down

0 comments on commit 859442d

Please sign in to comment.