OK, applied. But we indeed should not spend too much work on platforms we don't really test.
OK, like that in trunk? We didn't discuss much the switch from WIN32 to the more specific compiler identities. You think that's safer and some other runtime that doesn't define UCRT will also not share its peculiarities?
OK. Committed … with a bit of tweaking on top (attached). Does this work fine for you?
Is there no extra flag needed to make _open() open the file in 64 bit mode?
Without yet having looked at the patch (just read your message in the train), I want to make more clear what I meant: I was talking about _lseeki64() and some kind of off64_t usage in lfs_wrap.c only. This is the one place that implements seeks for any public API. Looking again … indeed, there should be no need to define any off64_t on MSVC. There is public 32 bit ABI with off_t, mapping to the _32 functions in lfs_wrap.c. All further code paths use int64_t internally to pass things around. We just...
Without yet having looked at the patch (just read your message in the train), I want to make more clear what I meant: I was talking about _lseeki64() and some kind of off64_T usage in lfs_wrap.c only. This is the one place that implements seeks for any public API. Looking again … indeed, there should be no need to define any off64_t on MSVC. There is public 32 bit ABI with off_t, mapping to the _32 functions in lfs_wrap.c. All further code paths use int64_t internally to pass things around. We just...
Well, messing up use of plain lseek counts as part of the same game to me. But let's get down to the technical. We're only talking about this code, right? static int64_t internal_lseek64(void *handle, int64_t offset, int whence) { struct wrap_data* ioh = handle; #ifdef LFS_LARGEFILE_64 return lseek64(ioh->fd, offset, whence); #else if(offset < OFF_MIN || offset > OFF_MAX) { errno = EOVERFLOW; return -1; } return lseek(ioh->fd, (off_t)offset, whence); #endif } With the corollary of off64_t being a...
Well, messing up use of plain lseek counts as part of the same game to me. But let's get down to the technical. We're only talking about this code, right? static int64_t internal_lseek64(void *handle, int64_t offset, int whence) { struct wrap_data* ioh = handle; #ifdef LFS_LARGEFILE_64 return lseek64(ioh->fd, offset, whence); #else if(offset < OFF_MIN || offset > OFF_MAX) { errno = EOVERFLOW; return -1; } return lseek(ioh->fd, (off_t)offset, whence); #endif } With the corrolary of off64_t being a...