Update Android port
* java/org/gnu/emacs/EmacsNative.java: Declare ftruncate. * java/org/gnu/emacs/EmacsSafThread.java (openDocument1): If initially opening with rwt, verify the file descriptor is really writable; if not, resort to rw and truncating the file descriptor by hand instead. * src/androidvfs.c (NATIVE_NAME (ftruncate)): New function. Truncate file descriptor and return whether that was successful.
This commit is contained in:
@@ -274,6 +274,10 @@ public final class EmacsNative
|
||||
operations. */
|
||||
public static native void safPostRequest ();
|
||||
|
||||
/* Detect and return FD is writable. FD may be truncated to 0 bytes
|
||||
in the process. */
|
||||
public static native boolean ftruncate (int fd);
|
||||
|
||||
static
|
||||
{
|
||||
/* Older versions of Android cannot link correctly with shared
|
||||
|
||||
Reference in New Issue
Block a user