Windows: fix mlock, remove ftruncate and fix error handling.
authorBruce Cran <bruce@cran.org.uk>
Wed, 6 Feb 2013 23:55:46 +0000 (23:55 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Feb 2013 06:22:03 +0000 (07:22 +0100)
commit10a6b3c67042914fe9d287027bf8792f69e84524
treea88e73fd732e39be50fae3174855108cb6d3c49b
parent01d269552bca14c90bdcc2288e64ba2426c045ea
Windows: fix mlock, remove ftruncate and fix error handling.

Functions in posix.c need to use win_to_posix_err to convert errors from
Windows API calls to their equivalent POSIX error code so perror etc.
work: move it into posix.c and add the prototype to posix.h.

Fix error handling so -1 is always returned on error and errno is set.

Fix mlock to work with sizes greater than about 1MB: the working set size
needs to be increased for the new allocation.

Remove ftruncate from posix.c, since MinGW already provides it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/windowsaio.c
os/windows/posix.c
os/windows/posix.h