New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need check for large file support #1032
Comments
My opinion is that large file support is always available these days (was introduced in 1996), so we should just enable it without checking for it. The other question is whether there are legitimate uses where people don't want to enable large file support even when it is available. I don't think there are, but it's possible that there are such uses. We can either add support for disabling it from the start, or just always enable it and change it back if people complain. |
As a data point, this is a Linux-only quirk (probably for backwards-compat in glibc). Bionic, FreeBSD, and Darwin always enable large file support. However, even on Linux if you disable large-file support, |
Probably the only OS that does 32 bit file sizes is Windows and if you are using Windows native system calls you already know what you are doing. |
Yes, on Windows you have to use The thing is on Linux you need to still set compiler flags to get large-file support; specifically you need to set |
For what it's worth
to |
Actually, I now remember that all versions of OS X are now 64-bit so it doesn't matter for Darwin. |
So what shall we do about this? I think just enabling it unconditionally based on platform is fine, with or without checking. But where does this go implementation-wise? just add to global args? |
I think unconditionally based on platform is fine without checking. We can change it if people complain about their precious ancient-kernel-or-libc broken 32-bit platforms. Implementation-wise, it would go in global C and C++ args, but I haven't decided exactly which part of the code is best for adding it. For instance, we definitely want these to also be added when building C code generated by Vala, and also when doing compiler checks. |
On 32-bit Linux and BSD, all libcs support this. Musl always enables it, and UClibc behaves like Glibc unless it's built without large file support (which is a terrible idea). http://wiki.musl-libc.org/wiki/FAQ#Q:_do_i_need_to_define_LARGEFILE64_SOURCE_to_get_64bit_off_t_.3F https://git.uclibc.org/uClibc/tree/include/features.h#n326 macOS now only ships 64-bit, so this is irrelevant there. 32-bit Windows and older versions of Bionic do not have transparent large file support and you must use lseek64, etc there, so this won't affect those. Newer Bionic versions behave like Glibc in theory. https://msdn.microsoft.com/en-us/library/1yee101t.aspx http://code.google.com/p/android/issues/detail?id=64613 Includes a linuxlike test for this. Closes #1032
I think we should have some kind of replacement for
AC_SYS_LARGEFILE
. This is something very common, but there may be more things in future.So question is how/where to best do this.
Just always check for it and add the required defines/flags to global/project args, and enable by default.
Provide a method in meson main
Add a new
sys
module or such and add a method thereAnything else?
The text was updated successfully, but these errors were encountered: