sahlberg/libnfs — pull request #70 by aredlich (2014-04-01 20:59:55+00:00)
Title: File position fixes

Hi Ronnie,

The file positioning code in libnfs has a few issues:
* nfs_lseek and its async friend do not allow negative offset arguments (they should) but nevertheless a file handle could end up with a file position < 0 (it shouldn't)
* nfs_pread/pwrite and their async counterparts update the file position while the POSIX calls their modelled after do not modify it
.

This is addressed by the following changesets in my tree:
* nfs_lseek{,_async}: allow negative offsets and guard against file pos… …	81d1ff7
* libnfs-sync: nfs_{read,write}: use their _async counterparts internally …	e0fd733
* Fix the file position handling of the read and write calls …	c9b878b

These have seen only light testing so please review carefully.

There's also a fourth, unrelated commit that installs config.h under nfsc and makes use of it from nfsc/libnfs.h - ATM it's used to include if detected during compilation. Please consider this one as an RFC - I didn't convert any other users of conditional compilation to this mechanism yet.

Thanks,
Arne