Skip to content
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

configure: Use AC_SYS_LARGEFILE #2957

Merged
merged 1 commit into from Jul 30, 2023

Conversation

orbea
Copy link
Contributor

@orbea orbea commented Jun 12, 2023

With musl-1.2.4 LFS support is being disabled and will later be entirely removed where it is expected to use off_t and lseek rather than off64_t and lseek64.

With glibc these types are also obsolete where it is expected to use the _FILE_OFFSET_BITS define where off_t and lseek will become 64-bit compatible versions when needed. This is set by AC_SYS_LARGEFILE.

With musl-1.2.4 LFS support is being disabled and will later be entirely
removed where it is expected to use off_t and lseek rather than off64_t
and lseek64.

With glibc these types are also obsolete where it is expected to use the
_FILE_OFFSET_BITS define where off_t and lseek will become 64-bit
compatible versions when needed. This is set by AC_SYS_LARGEFILE.
@Oleksiy-Yakovenko
Copy link
Member

Merging this would break compatibility with 32 bit systems, where lseek is 32 bit.

@orbea
Copy link
Contributor Author

orbea commented Jun 12, 2023

@Oleksiy-Yakovenko Are you saying deadbeef needs a 64-bit lseek even on 32-bit systems? Or am I not understanding? Unfortunately I do not have any 32-bit hardware to test.

@Oleksiy-Yakovenko
Copy link
Member

Yes, lseek64 works on 32 bit systems to seek in large files which are larger than 4GB

@orbea
Copy link
Contributor Author

orbea commented Jun 12, 2023

Perhaps it would be better to define _FILE_OFFSET_BITS=64 unconditionally?

@Oleksiy-Yakovenko
Copy link
Member

I checked the docs, and it seems like adding AC_SYS_LARGEFILE should take care of 64 bit file offsets on 32 bit systems as well, but it needs to be tested before merging. (I'll try to find time for this)

@orbea
Copy link
Contributor Author

orbea commented Jul 30, 2023

@Oleksiy-Yakovenko Any chance you had time to investigate this yet?

@Oleksiy-Yakovenko
Copy link
Member

I haven't, and I'm not sure whether I will. Let's assume that it works as it should. There are not that many 32bit users, if they will complain we'll revert.

@Oleksiy-Yakovenko Oleksiy-Yakovenko merged commit 8fa263e into DeaDBeeF-Player:master Jul 30, 2023
3 checks passed
@orbea orbea deleted the musl-1.2.4 branch July 30, 2023 15:10
orbea added a commit to orbea/gentoo that referenced this pull request Aug 28, 2023
orbea added a commit to orbea/gentoo that referenced this pull request Aug 28, 2023
orbea added a commit to orbea/gentoo that referenced this pull request Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants