1 --- a/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java Thu May 28 00:44:10 2020
2 +++ b/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java Wed May 20 19:29:11 2020
7 + * FILE* fopen(const char *filename, const char* mode);
9 + static long fopen(UnixPath filename, String mode) throws UnixException {
10 + NativeBuffer pathBuffer = copyToNativeBuffer(filename);
11 + NativeBuffer modeBuffer = NativeBuffers.asNativeBuffer(Util.toBytes(mode));
13 + return fopen0(pathBuffer.address(), modeBuffer.address());
15 + modeBuffer.release();
16 + pathBuffer.release();
19 + private static native long fopen0(long pathAddress, long modeAddress)
20 + throws UnixException;
23 + * fclose(FILE* stream)
25 + static native void fclose(long stream) throws UnixException;
28 * void rewind(FILE* stream);
30 static native void rewind(long stream) throws UnixException;
35 + * long int pathconf(const char *path, int name);
37 + static long pathconf(UnixPath path, int name) throws UnixException {
38 + NativeBuffer buffer = copyToNativeBuffer(path);
40 + return pathconf0(buffer.address(), name);
45 + private static native long pathconf0(long pathAddress, int name)
46 + throws UnixException;
49 + * long fpathconf(int fildes, int name);
51 + static native long fpathconf(int filedes, int name) throws UnixException;
54 * char* strerror(int errnum)
56 static native byte[] strerror(int errnum);