… | |
… | |
100 | #ifdef _WIN32 |
100 | #ifdef _WIN32 |
101 | |
101 | |
102 | #undef PAGESIZE |
102 | #undef PAGESIZE |
103 | #define PAGESIZE 4096 /* GetSystemInfo? */ |
103 | #define PAGESIZE 4096 /* GetSystemInfo? */ |
104 | |
104 | |
105 | #define O_CLOEXEC 0 |
|
|
106 | |
|
|
107 | /* TODO: look at how perl does stat (non-sloppy), unlink (ro-files), utime, link */ |
105 | /* TODO: look at how perl does stat (non-sloppy), unlink (ro-files), utime, link */ |
108 | |
106 | |
109 | #ifdef EIO_STRUCT_STATI64 |
107 | #ifdef EIO_STRUCT_STATI64 |
110 | /* look at perl's non-sloppy stat */ |
108 | /* look at perl's non-sloppy stat */ |
111 | #define stat(path,buf) _stati64 (path,buf) |
109 | #define stat(path,buf) _stati64 (path,buf) |
… | |
… | |
327 | /* used for readlink etc. */ |
325 | /* used for readlink etc. */ |
328 | #ifndef PATH_MAX |
326 | #ifndef PATH_MAX |
329 | # define PATH_MAX 0 |
327 | # define PATH_MAX 0 |
330 | #endif |
328 | #endif |
331 | |
329 | |
|
|
330 | #ifndef O_CLOEXEC |
|
|
331 | #define O_CLOEXEC 0 |
|
|
332 | #endif |
|
|
333 | |
332 | #ifndef EIO_PATH_MIN |
334 | #ifndef EIO_PATH_MIN |
333 | # define EIO_PATH_MIN 8160 |
335 | # define EIO_PATH_MIN 8160 |
334 | #endif |
336 | #endif |
335 | |
337 | |
336 | #define EIO_PATH_MAX (PATH_MAX <= EIO_PATH_MIN ? EIO_PATH_MIN : PATH_MAX) |
338 | #define EIO_PATH_MAX (PATH_MAX <= EIO_PATH_MIN ? EIO_PATH_MIN : PATH_MAX) |
… | |
… | |
957 | intptr_t end = addr + len; |
959 | intptr_t end = addr + len; |
958 | intptr_t page = eio_pagesize (); |
960 | intptr_t page = eio_pagesize (); |
959 | |
961 | |
960 | if (addr < end) |
962 | if (addr < end) |
961 | if (flags & EIO_MT_MODIFY) /* modify */ |
963 | if (flags & EIO_MT_MODIFY) /* modify */ |
962 | do { *((volatile sig_atomic_t *)addr) |= 0; } while ((addr += page) < len && !EIO_CANCELLED (req)); |
964 | do { *((volatile sig_atomic_t *)addr) |= 0; } while ((addr += page) < end && !EIO_CANCELLED (req)); |
963 | else |
965 | else |
964 | do { *((volatile sig_atomic_t *)addr) ; } while ((addr += page) < len && !EIO_CANCELLED (req)); |
966 | do { *((volatile sig_atomic_t *)addr) ; } while ((addr += page) < end && !EIO_CANCELLED (req)); |
965 | } |
967 | } |
966 | |
968 | |
967 | return 0; |
969 | return 0; |
968 | } |
970 | } |
969 | |
971 | |