722 |
JNIEXPORT void JNICALL |
JNIEXPORT void JNICALL |
723 |
Java_java_io_FileDescriptor_nativeSync(JNIEnv *env, jobject obj, jlong fd) |
Java_java_io_FileDescriptor_nativeSync(JNIEnv *env, jobject obj, jlong fd) |
724 |
{ |
{ |
725 |
|
#ifdef HAVE_FSYNC |
726 |
int native_fd; |
int native_fd; |
727 |
int result; |
int result; |
728 |
|
|
729 |
native_fd = CONVERT_JLONG_TO_INT(fd); |
native_fd = CONVERT_JLONG_TO_INT(fd); |
730 |
|
|
|
#ifdef HAVE_FSYNC |
|
731 |
TARGET_NATIVE_FILE_FSYNC(native_fd, result); |
TARGET_NATIVE_FILE_FSYNC(native_fd, result); |
732 |
/* FIXME: gcj does not throw an exception on EROFS or EINVAL. |
/* FIXME: gcj does not throw an exception on EROFS or EINVAL. |
733 |
* Should we emulate? */ |
* Should we emulate? */ |