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

sendfile_posix: only use *64 APIs when _LARGEFILE64_SOURCE is defined #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aberaud
Copy link

@aberaud aberaud commented Mar 17, 2024

64 APIS are considered deprecated and should not be used unless _LARGEFILE64_SOURCE is explicitly defined.

*64 APIS are considered deprecated and should not be used
unless _LARGEFILE64_SOURCE is explicitly defined.
@eao197
Copy link
Member

eao197 commented Mar 18, 2024

Hi!

64 APIS are considered deprecated

Could you please provide a reference to a document that declares the Large-File Summit (LFS) specification for POSIX deprecated?

@aberaud
Copy link
Author

aberaud commented Nov 22, 2024

Hi,

The API with 64 suffix is called the transitional LFS API and is mostly designed to be used by legacy 32 bits systems.

As documented by glibc for _LARGEFILE64_SOURCE:

This macro was introduced as part of the Large File Support extension (LFS). It is a transition interface for the period when 64 bit offsets are not generally used (see _FILE_OFFSET_BITS).

The modern way to manage large files is to use the standard POSIX API (without 64) with _FILE_OFFSET_BITS=64.

In any case, APIs with 64 at the end must not be used if _LARGEFILE64_SOURCE is not defined, so this patch fixes that.

@eao197
Copy link
Member

eao197 commented Nov 23, 2024

Hi, @aberaud !

Thanks you very much for the explanation.

We'll take a closer look at it the next week.

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.

2 participants