… | |
… | |
1004 | |
1004 | |
1005 | # endif |
1005 | # endif |
1006 | |
1006 | |
1007 | #elif defined (_WIN32) |
1007 | #elif defined (_WIN32) |
1008 | /* does not work, just for documentation of what would need to be done */ |
1008 | /* does not work, just for documentation of what would need to be done */ |
|
|
1009 | /* actually, cannot be done like this, as TransmitFile changes the file offset, */ |
|
|
1010 | /* libeio guarantees that the file offset does not change, and windows */ |
|
|
1011 | /* has no way to get an independent handle to the same file description */ |
1009 | HANDLE h = TO_SOCKET (ifd); |
1012 | HANDLE h = TO_SOCKET (ifd); |
1010 | SetFilePointer (h, offset, 0, FILE_BEGIN); |
1013 | SetFilePointer (h, offset, 0, FILE_BEGIN); |
1011 | res = TransmitFile (TO_SOCKET (ofd), h, count, 0, 0, 0, 0); |
1014 | res = TransmitFile (TO_SOCKET (ofd), h, count, 0, 0, 0, 0); |
1012 | |
1015 | |
1013 | #else |
1016 | #else |
… | |
… | |
2026 | eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data) |
2029 | eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data) |
2027 | { |
2030 | { |
2028 | return eio__2path (EIO_RENAME, path, new_path, pri, cb, data); |
2031 | return eio__2path (EIO_RENAME, path, new_path, pri, cb, data); |
2029 | } |
2032 | } |
2030 | |
2033 | |
2031 | eio_req *eio_custom (void (*)(eio_req *) execute, int pri, eio_cb cb, void *data); |
2034 | eio_req *eio_custom (void (*execute)(eio_req *), int pri, eio_cb cb, void *data) |
2032 | { |
2035 | { |
2033 | REQ (EIO_CUSTOM); req->feed = execute; SEND; |
2036 | REQ (EIO_CUSTOM); req->feed = execute; SEND; |
2034 | } |
2037 | } |
2035 | |
2038 | |
2036 | #endif |
2039 | #endif |