Skip to content

Commit

Permalink
lseek should take a long offset.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Jul 20, 2014
1 parent 38e2ab9 commit 580b934
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/jnr/posix/BaseNativePOSIX.java
Expand Up @@ -542,7 +542,7 @@ public int pwrite(int fd, ByteBuffer buf, int n, int offset) {
return libc().pwrite(fd, buf, n, offset);
}

public int lseek(int fd, int offset, int whence) {
public int lseek(int fd, long offset, int whence) {
return libc().lseek(fd, offset, whence);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/jnr/posix/CheckedPOSIX.java
Expand Up @@ -398,7 +398,7 @@ public int pwrite(int fd, ByteBuffer buf, int n, int offset) {
try { return posix.pwrite(fd, buf, n, offset); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}

public int lseek(int fd, int offset, int whence) {
public int lseek(int fd, long offset, int whence) {
try { return posix.lseek(fd, offset, whence); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/jnr/posix/JavaPOSIX.java
Expand Up @@ -511,7 +511,7 @@ public int pwrite(int fd, ByteBuffer buf, int n, int offset) {
return -1;
}

public int lseek(int fd, int offset, int whence) {
public int lseek(int fd, long offset, int whence) {
handler.unimplementedError("lseek");

return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/jnr/posix/LazyPOSIX.java
Expand Up @@ -399,7 +399,7 @@ public int pwrite(int fd, ByteBuffer buf, int n, int offset) {
return posix().pwrite(fd, buf, n, offset);
}

public int lseek(int fd, int offset, int whence) {
public int lseek(int fd, long offset, int whence) {
return posix().lseek(fd, offset, whence);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/jnr/posix/LibC.java
Expand Up @@ -114,7 +114,7 @@ public interface LibCSignalHandler {
int pread(int fd, @Out byte[] src, int len, int offset);
int pwrite(int fd, @In ByteBuffer src, int len, int offset);
int pwrite(int fd, @In byte[] src, int len, int offset);
int lseek(int fd, int offset, int whence);
int lseek(int fd, long offset, int whence);
int close(int fd);
int execv(CharSequence path, @In CharSequence... argv);
int execve(CharSequence path, @In CharSequence[] argv, @In CharSequence[] envp);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/jnr/posix/POSIX.java
Expand Up @@ -123,6 +123,6 @@ public long posix_spawnp(String path, Collection<? extends SpawnFileAction> file
int read(int fd, ByteBuffer buf, int n);
int pwrite(int fd, ByteBuffer buf, int n, int offset);
int pread(int fd, ByteBuffer buf, int n, int offset);
int lseek(int fd, int offset, int whence);
int lseek(int fd, long offset, int whence);
int pipe(int[] fds);
}

0 comments on commit 580b934

Please sign in to comment.