< prev index next >
src/java.base/windows/native/libjava/io_util_md.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 221,231 ****
return NULL;
}
return pathbuf;
}
! FD
winFileHandleOpen(JNIEnv *env, jstring path, int flags)
{
const DWORD access =
(flags & O_WRONLY) ? GENERIC_WRITE :
(flags & O_RDWR) ? (GENERIC_READ | GENERIC_WRITE) :
--- 221,231 ----
return NULL;
}
return pathbuf;
}
! JNIEXPORT FD JNICALL
winFileHandleOpen(JNIEnv *env, jstring path, int flags)
{
const DWORD access =
(flags & O_WRONLY) ? GENERIC_WRITE :
(flags & O_RDWR) ? (GENERIC_READ | GENERIC_WRITE) :
*** 573,583 ****
if (CloseHandle(h) == 0) { /* Returns zero on failure */
JNU_ThrowIOExceptionWithLastError(env, "close failed");
}
}
! jlong
handleLseek(FD fd, jlong offset, jint whence)
{
LARGE_INTEGER pos, distance;
DWORD lowPos = 0;
long highPos = 0;
--- 573,583 ----
if (CloseHandle(h) == 0) { /* Returns zero on failure */
JNU_ThrowIOExceptionWithLastError(env, "close failed");
}
}
! JNIEXPORT jlong JNICALL
handleLseek(FD fd, jlong offset, jint whence)
{
LARGE_INTEGER pos, distance;
DWORD lowPos = 0;
long highPos = 0;
< prev index next >