[Git][java-team/jnr-enxio][master] 10 commits: d/watch: update to v4 and use git mode.
Louis-Philippe Véronneau
gitlab at salsa.debian.org
Wed Dec 30 20:10:55 GMT 2020
Louis-Philippe Véronneau pushed to branch master at Debian Java Maintainers / jnr-enxio
Commits:
59b74497 by Louis-Philippe Véronneau at 2020-12-30T14:39:16-05:00
d/watch: update to v4 and use git mode.
- - - - -
ba79e1a2 by Louis-Philippe Véronneau at 2020-12-30T15:00:24-05:00
New upstream version 0.32.3
- - - - -
e0a05700 by Louis-Philippe Véronneau at 2020-12-30T15:00:25-05:00
Now packaging 0.32.3-1
- - - - -
e5d5f17d by Louis-Philippe Véronneau at 2020-12-30T15:00:25-05:00
Build using maven-compiler-plugin.
- - - - -
e581913c by Louis-Philippe Véronneau at 2020-12-30T15:00:25-05:00
d/control: use dh-compat and update to dh13.
- - - - -
98544b22 by Louis-Philippe Véronneau at 2020-12-30T15:01:09-05:00
d/*.javadoc: fix install path.
- - - - -
910f4b38 by Louis-Philippe Véronneau at 2020-12-30T15:01:13-05:00
d/control: Standards-Version update to 4.5.1. Add Rules-Requires-Root.
- - - - -
4c3baf54 by Louis-Philippe Véronneau at 2020-12-30T15:01:13-05:00
d/control: update VCS fields.
- - - - -
a52be9ff by Louis-Philippe Véronneau at 2020-12-30T15:06:30-05:00
d/copyright: update for new version.
- - - - -
f7cdd09a by Louis-Philippe Véronneau at 2020-12-30T15:09:35-05:00
Release 0.32.3-1 to unstable
- - - - -
20 changed files:
- + .github/workflows/ci.yml
- − .travis.yml
- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- + debian/libjnr-enxio-java-doc.install
- − debian/libjnr-enxio-java-doc.javadoc
- debian/libjnr-enxio-java.poms
- + debian/maven.properties
- debian/maven.rules
- debian/rules
- debian/watch
- pom.xml
- src/main/java/jnr/enxio/channels/KQSelector.java
- src/main/java/jnr/enxio/channels/Native.java
- src/main/java/jnr/enxio/channels/NativeDeviceChannel.java
- + src/main/java/jnr/enxio/channels/NativeFileSelectorProvider.java
- src/main/java/jnr/enxio/channels/PollSelector.java
- + src/main/java/jnr/enxio/channels/WinLibCAdapter.java
Changes:
=====================================
.github/workflows/ci.yml
=====================================
@@ -0,0 +1,37 @@
+# This workflow will build a Java project with Maven
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+
+name: Java CI with Maven
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ jdk8:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout at v2
+ - name: Set up JDK 8
+ uses: actions/setup-java at v1.4.3
+ with:
+ java-version: 8
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
+
+ jdk11:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout at v2
+ - name: Set up JDK 11
+ uses: actions/setup-java at v1.4.3
+ with:
+ java-version: 11
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
=====================================
.travis.yml deleted
=====================================
@@ -1,15 +0,0 @@
-language: java
-jdk:
- - oraclejdk7
- - openjdk6
-os:
- - linux
-# - osx
-notifications:
- irc:
- channels:
- - "irc.freenode.org#jnr"
- on_success: change
- on_failure: always
- template:
- - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})"
=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+jnr-enxio (0.32.3-1) unstable; urgency=medium
+
+ * Team upload.
+ * New upstream release.
+ * d/watch: update to v4 and use git mode.
+ * Build using maven-compiler-plugin.
+ * d/control: use dh-compat and update to dh13.
+ * d/*.javadoc: fix install path.
+ * d/control: Standards-Version update to 4.5.1. Add Rules-Requires-Root.
+ * d/control: update VCS fields.
+ * d/copyright: update for new version.
+
+ -- Louis-Philippe Véronneau <pollo at debian.org> Wed, 30 Dec 2020 15:06:36 -0500
+
jnr-enxio (0.16-2) unstable; urgency=medium
* Upload to unstable.
=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-10
=====================================
debian/control
=====================================
@@ -4,23 +4,23 @@ Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Tim Potter <tpot at hp.com>,
Miguel Landaeta <nomadium at debian.org>
-Build-Depends: debhelper (>= 10~),
+Build-Depends: debhelper-compat (= 13),
default-jdk,
default-jdk-doc,
javahelper,
junit4,
- libjffi-java (>= 1.2.7),
libjnr-constants-java,
- libjnr-ffi-java (>= 2.1.0~),
- libjnr-x86asm-java (>= 1.0.2),
+ libjnr-ffi-java,
libmaven-bundle-plugin-java,
libmaven-javadoc-plugin-java,
libmaven-source-plugin-java,
+ libmaven-compiler-plugin-java,
maven-debian-helper
-Standards-Version: 3.9.8
+Standards-Version: 4.5.1
Homepage: https://github.com/jnr/jnr-enxio
-Vcs-Git: https://anonscm.debian.org/git/pkg-java/jnr-enxio.git
-Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/jnr-enxio.git
+Vcs-Git: https://salsa.debian.org/java-team/jnr-enxio.git
+Vcs-Browser: https://salsa.debian.org/java-team/jnr-enxio
+Rules-Requires-Root: no
Package: libjnr-enxio-java
Architecture: all
=====================================
debian/copyright
=====================================
@@ -1,19 +1,12 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: jnr-enxio
Source: https://github.com/jnr/jnr-enxio
Files: *
Copyright: 2011-2014 Wayne Meissner
- 2011-2014 Charles Nutter
+ 2011-2020 Charles Nutter
License: Apache-2.0
-Files: src/main/java/jnr/enxio/channels/PollSelectionKey.java
-Copyright: 2011 Wayne Meissner
-License: Apache-2.0
-Comment: This file carries a header stating that the license is LGPL-3.
- Upstream has since clarified that the file is licensed under Apache-2.0..
- See: https://github.com/jnr/jnr-enxio/issues/8
-
Files: debian/*
Copyright: 2014 Tim Potter <tpot at hp.com>
2017 Miguel Landaeta <nomadium at debian.org>
=====================================
debian/libjnr-enxio-java-doc.install
=====================================
@@ -0,0 +1 @@
+target/apidocs/* usr/share/doc/libjnr-enxio-java/api
=====================================
debian/libjnr-enxio-java-doc.javadoc deleted
=====================================
@@ -1 +0,0 @@
-target/site/apidocs usr/share/doc/libjnr-enxio-java/api
=====================================
debian/libjnr-enxio-java.poms
=====================================
@@ -1,28 +1 @@
-# List of POM files for the package
-# Format of this file is:
-# <path to pom file> [option]*
-# where option can be:
-# --ignore: ignore this POM and its artifact if any
-# --ignore-pom: don't install the POM. To use on POM files that are created
-# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
-# --no-parent: remove the <parent> tag from the POM
-# --package=<package>: an alternative package to use when installing this POM
-# and its artifact
-# --has-package-version: to indicate that the original version of the POM is the same as the upstream part
-# of the version for the package.
-# --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
-# during a clean operation with mh_cleanpom or mh_installpom
-# --artifact=<path>: path to the build artifact associated with this POM,
-# it will be installed when using the command mh_install. [mh_install]
-# --java-lib: install the jar into /usr/share/java to comply with Debian
-# packaging guidelines
-# --usj-name=<name>: name to use when installing the library in /usr/share/java
-# --usj-version=<version>: version to use when installing the library in /usr/share/java
-# --no-usj-versionless: don't install the versionless link in /usr/share/java
-# --dest-jar=<path>: the destination for the real jar.
-# It will be installed with mh_install. [mh_install]
-# --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
-# --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
-# Empty by default. [mh_install]
-#
-pom.xml --no-parent --has-package-version --java-lib
+pom.xml --no-parent --has-package-version
=====================================
debian/maven.properties
=====================================
@@ -0,0 +1,3 @@
+project.build.sourceEncoding=UTF-8
+maven.compiler.source=8
+maven.compiler.target=8
=====================================
debian/maven.rules
=====================================
@@ -1,4 +1,2 @@
-junit junit jar s/.*/4.x/ * *
junit junit jar s/4\..*/4.x/ * *
-org.jruby.extras jnr-x86asm * s/.*/debian/ * *
=====================================
debian/rules
=====================================
@@ -1,7 +1,4 @@
#!/usr/bin/make -f
-export JAVA_HOME=/usr/lib/jvm/default-java
-export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
-
%:
- dh $@ --buildsystem=maven --with javahelper
+ dh $@
=====================================
debian/watch
=====================================
@@ -1,2 +1,4 @@
-version=3
-https://github.com/jnr/jnr-enxio/releases .*/(?:jnr-enxio-)?(\d+\.\d+).tar.gz
+version=4
+opts="mode=git, uversionmangle=s/jnr-enxio-//" \
+https://github.com/jnr/jnr-enxio.git \
+refs/tags/jnr-enxio-([\d\.]+)
=====================================
pom.xml
=====================================
@@ -10,7 +10,7 @@
<groupId>com.github.jnr</groupId>
<artifactId>jnr-enxio</artifactId>
<packaging>jar</packaging>
- <version>0.16</version>
+ <version>0.32.3</version>
<name>jnr-enxio</name>
<description>Native I/O access for java</description>
<url>http://github.com/jnr/jnr-enxio</url>
@@ -39,26 +39,26 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>8</maven.compiler.source>
+ <maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.11</version>
+ <version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-constants</artifactId>
- <version>0.9.8</version>
+ <version>0.10.1</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
- <version>2.1.4</version>
+ <version>2.2.1</version>
</dependency>
</dependencies>
@@ -72,6 +72,7 @@
<instructions>
<_nouses>true</_nouses>
<Import-Package>*,jnr.ffi.mapper,jnr.ffi.provider.converters,com.kenai.jffi</Import-Package>
+ <Automatic-Module-Name>jnr.enxio</Automatic-Module-Name>
</instructions>
</configuration>
<executions>
@@ -91,6 +92,9 @@
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ <manifestEntries>
+ <Automatic-Module-Name>org.jnrproject.enxio</Automatic-Module-Name>
+ </manifestEntries>
</archive>
</configuration>
</plugin>
@@ -110,6 +114,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -119,26 +124,32 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ </plugin>
</plugins>
</build>
<profiles>
-
<profile>
- <id>old-jdk</id>
+ <id>java9</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!-- Use -release compiler option rather than source/target if 9+ -->
+ <release>${maven.compiler.target}</release>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<activation>
- <jdk>(,1.6]</jdk>
+ <jdk>[9,)</jdk>
</activation>
-
- <dependencies>
- <dependency>
- <groupId>com.github.jnr</groupId>
- <artifactId>jnr-enxio-protocolfamily</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- </dependencies>
</profile>
</profiles>
</project>
=====================================
src/main/java/jnr/enxio/channels/KQSelector.java
=====================================
@@ -107,11 +107,8 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
protected SelectionKey register(AbstractSelectableChannel ch, int ops, Object att) {
KQSelectionKey k = new KQSelectionKey(this, (NativeSelectableChannel) ch, ops);
synchronized (regLock) {
- Descriptor d = descriptors.get(k.getFD());
- if (d == null) {
- d = new Descriptor(k.getFD());
- descriptors.put(k.getFD(), d);
- }
+ Descriptor d = new Descriptor(k.getFD());
+ descriptors.put(k.getFD(), d);
d.keys.add(k);
handleChangedKey(d);
}
@@ -217,13 +214,13 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
synchronized (regLock) {
for (SelectionKey k : cancelled) {
KQSelectionKey kqs = (KQSelectionKey) k;
- Descriptor d = descriptors.get(kqs.getFD());
deregister(kqs);
synchronized (selected) {
selected.remove(kqs);
}
- d.keys.remove(kqs);
- if (d.keys.isEmpty()) {
+ Descriptor d = descriptors.get(kqs.getFD());
+ if (d != null) d.keys.remove(kqs);
+ if (d == null || d.keys.isEmpty()) {
io.put(changebuf, nchanged++, kqs.getFD(), EVFILT_READ, EV_DELETE);
io.put(changebuf, nchanged++, kqs.getFD(), EVFILT_WRITE, EV_DELETE);
descriptors.remove(kqs.getFD());
=====================================
src/main/java/jnr/enxio/channels/Native.java
=====================================
@@ -19,7 +19,9 @@
package jnr.enxio.channels;
import jnr.constants.platform.Errno;
+import jnr.enxio.channels.WinLibCAdapter.LibMSVCRT;
import jnr.ffi.*;
+import jnr.ffi.Platform.OS;
import jnr.ffi.Runtime;
import jnr.ffi.annotations.IgnoreError;
import jnr.ffi.annotations.In;
@@ -32,7 +34,7 @@ import jnr.ffi.Platform;
import java.io.IOException;
import java.nio.ByteBuffer;
-final class Native {
+public final class Native {
public static interface LibC {
public static final int F_GETFL = jnr.constants.platform.Fcntl.F_GETFL.intValue();
@@ -62,8 +64,25 @@ final class Native {
}
private static final class SingletonHolder {
- static final LibC libc = LibraryLoader.create(LibC.class).load(Platform.getNativePlatform().getStandardCLibraryName());
- static final jnr.ffi.Runtime runtime = Runtime.getRuntime(libc);
+ static final LibC libc;
+ static final jnr.ffi.Runtime runtime;
+
+ static {
+ Platform platform = Platform.getNativePlatform();
+ LibraryLoader<LibC> loader = LibraryLoader.create(LibC.class);
+ loader.library(platform.getStandardCLibraryName());
+ if (platform.getOS() == OS.SOLARIS) {
+ loader.library("socket");
+ }
+ LibC straight = loader.load();
+ if (platform.getOS() == OS.WINDOWS) {
+ LibMSVCRT mslib = LibraryLoader.create(LibMSVCRT.class).load(platform.getStandardCLibraryName());
+ libc = new WinLibCAdapter(mslib);
+ } else {
+ libc = straight;
+ }
+ runtime = Runtime.getRuntime(libc);
+ }
}
static LibC libc() {
@@ -145,7 +164,7 @@ final class Native {
return libc().strerror(LastError.getLastError(getRuntime()));
}
- static Errno getLastError() {
+ public static Errno getLastError() {
return Errno.valueOf(LastError.getLastError(getRuntime()));
}
=====================================
src/main/java/jnr/enxio/channels/NativeDeviceChannel.java
=====================================
@@ -30,16 +30,27 @@ public class NativeDeviceChannel extends AbstractSelectableChannel implements By
private final int fd;
private final int validOps;
+ private final boolean isFile;
public NativeDeviceChannel(int fd) {
- this(NativeSelectorProvider.getInstance(), fd, SelectionKey.OP_READ | SelectionKey.OP_WRITE);
+ this(fd, false);
}
- public NativeDeviceChannel(SelectorProvider provider, int fd, int ops) {
+
+ public NativeDeviceChannel(int fd, boolean isFile) {
+ this(selectorProvider(isFile), fd, SelectionKey.OP_READ | SelectionKey.OP_WRITE, isFile);
+ }
+
+ public NativeDeviceChannel(SelectorProvider provider, int fd, int ops, boolean isFile) {
super(provider);
this.fd = fd;
this.validOps = ops;
+ this.isFile = isFile;
}
-
+
+ private static SelectorProvider selectorProvider(boolean isFile) {
+ return (isFile) ? NativeFileSelectorProvider.getInstance() : NativeSelectorProvider.getInstance();
+ }
+
@Override
protected void implCloseSelectableChannel() throws IOException {
int n = Native.close(fd);
=====================================
src/main/java/jnr/enxio/channels/NativeFileSelectorProvider.java
=====================================
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2008 Wayne Meissner
+ *
+ * This file is part of the JNR project.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jnr.enxio.channels;
+
+import jnr.ffi.Platform;
+
+import java.io.IOException;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.Pipe;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
+import java.nio.channels.spi.AbstractSelector;
+import java.nio.channels.spi.SelectorProvider;
+
+
+public final class NativeFileSelectorProvider extends SelectorProvider {
+ private static final class SingletonHolder {
+ static NativeFileSelectorProvider INSTANCE = new NativeFileSelectorProvider();
+ }
+
+ public static final SelectorProvider getInstance() {
+ return SingletonHolder.INSTANCE;
+ }
+
+ @Override
+ public DatagramChannel openDatagramChannel() throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public DatagramChannel openDatagramChannel(java.net.ProtocolFamily family) throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Pipe openPipe() throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public AbstractSelector openSelector() throws IOException {
+ return new PollSelector(this);
+ }
+
+ @Override
+ public ServerSocketChannel openServerSocketChannel() throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public SocketChannel openSocketChannel() throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+}
=====================================
src/main/java/jnr/enxio/channels/PollSelector.java
=====================================
@@ -116,7 +116,7 @@ class PollSelector extends java.nio.channels.spi.AbstractSelector {
@Override
public Set<SelectionKey> keys() {
- return new HashSet<SelectionKey>(Arrays.asList(keyArray).subList(0, nfds));
+ return new HashSet<SelectionKey>(Arrays.asList(keyArray).subList(1, nfds));
}
@Override
=====================================
src/main/java/jnr/enxio/channels/WinLibCAdapter.java
=====================================
@@ -0,0 +1,117 @@
+/*
+ * This file is part of the JNR project.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jnr.enxio.channels;
+
+import java.nio.ByteBuffer;
+
+import jnr.enxio.channels.Native.LibC;
+import jnr.enxio.channels.Native.Timespec;
+import jnr.ffi.Pointer;
+import jnr.ffi.Runtime;
+import jnr.ffi.annotations.IgnoreError;
+import jnr.ffi.annotations.In;
+import jnr.ffi.annotations.Out;
+import jnr.ffi.provider.LoadedLibrary;
+import jnr.ffi.types.size_t;
+import jnr.ffi.types.ssize_t;
+
+/**
+ * MSVCRT.DLL only supports some LibC functions, but the symbols are different.
+ * This adapter maps the MSVCRT.DLL names to standard LibC names
+ */
+public final class WinLibCAdapter implements LibC, LoadedLibrary {
+
+ public static interface LibMSVCRT {
+
+ public int _close(int fd);
+ public @ssize_t int _read(int fd, @Out ByteBuffer data, @size_t long size);
+ public @ssize_t int _read(int fd, @Out byte[] data, @size_t long size);
+ public @ssize_t int _write(int fd, @In ByteBuffer data, @size_t long size);
+ public @ssize_t int _write(int fd, @In byte[] data, @size_t long size);
+ public int _pipe(@Out int[] fds);
+
+ @IgnoreError String _strerror(int error);
+
+ // These functions don't exist:
+
+ //public int shutdown(int s, int how);
+ //public int fcntl(int fd, int cmd, int data);
+ //public int poll(@In @Out ByteBuffer pfds, int nfds, int timeout);
+ //public int poll(@In @Out Pointer pfds, int nfds, int timeout);
+ //public int kqueue();
+ //public int kevent(int kq, @In ByteBuffer changebuf, int nchanges,
+ // @Out ByteBuffer eventbuf, int nevents,
+ // @In @Transient Timespec timeout);
+ //public int kevent(int kq,
+ // @In Pointer changebuf, int nchanges,
+ // @Out Pointer eventbuf, int nevents,
+ // @In @Transient Timespec timeout);
+ }
+
+ private LibMSVCRT win;
+ public WinLibCAdapter(LibMSVCRT winlibc) { this.win = winlibc; }
+
+ @Override public int close(int fd) { return win._close(fd); }
+ @Override public int read(int fd, ByteBuffer data, long size) { return win._read(fd, data, size); }
+ @Override public int read(int fd, byte[] data, long size) { return win._read(fd, data, size); }
+ @Override public int write(int fd, ByteBuffer data, long size) { return win._write(fd, data, size); }
+ @Override public int write(int fd, byte[] data, long size) { return win._write(fd, data, size); }
+ @Override public int pipe(int[] fds) { return win._pipe(fds); }
+ @Override public String strerror(int error) { return win._strerror(error); }
+
+ @Override
+ public Runtime getRuntime() {
+ return Runtime.getRuntime(win);
+ }
+
+ // Unsupported Operations. Some may be implementable, others like fcntl may not be.
+
+ @Override
+ public int fcntl(int fd, int cmd, int data) {
+ throw new UnsupportedOperationException("fcntl isn't supported on Windows");
+ }
+
+ @Override
+ public int poll(ByteBuffer pfds, int nfds, int timeout) {
+ throw new UnsupportedOperationException("poll isn't supported on Windows");
+ }
+
+ @Override
+ public int poll(Pointer pfds, int nfds, int timeout) {
+ throw new UnsupportedOperationException("poll isn't supported on Windows");
+ }
+
+ @Override
+ public int kqueue() {
+ throw new UnsupportedOperationException("kqueue isn't supported on Windows");
+ }
+
+ @Override
+ public int kevent(int kq, ByteBuffer changebuf, int nchanges, ByteBuffer eventbuf, int nevents, Timespec timeout) {
+ throw new UnsupportedOperationException("kevent isn't supported on Windows");
+ }
+
+ @Override
+ public int kevent(int kq, Pointer changebuf, int nchanges, Pointer eventbuf, int nevents, Timespec timeout) {
+ throw new UnsupportedOperationException("kevent isn't supported on Windows");
+ }
+
+ @Override
+ public int shutdown(int s, int how) {
+ throw new UnsupportedOperationException("shutdown isn't supported on Windows");
+ }
+}
\ No newline at end of file
View it on GitLab: https://salsa.debian.org/java-team/jnr-enxio/-/compare/4ae69181c1fdef807c560fa92c82f68dd3b055cc...f7cdd09a043b04f06ff3d9ad6b63fedd454111f8
--
View it on GitLab: https://salsa.debian.org/java-team/jnr-enxio/-/compare/4ae69181c1fdef807c560fa92c82f68dd3b055cc...f7cdd09a043b04f06ff3d9ad6b63fedd454111f8
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20201230/28c2f1a6/attachment.html>
More information about the pkg-java-commits
mailing list