Skip to content

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

Merged
eao197 merged 1 commit intoStiffstream:0.7-dev-pr-213from
aberaud:largefile
Nov 26, 2024
Merged

sendfile_posix: only use *64 APIs when _LARGEFILE64_SOURCE is defined#213
eao197 merged 1 commit intoStiffstream:0.7-dev-pr-213from
aberaud:largefile

Conversation

@aberaud
Copy link
Contributor

@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
Contributor 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.

@eao197 eao197 changed the base branch from master to 0.7-dev-pr-213 November 26, 2024 13:29
@eao197 eao197 merged commit 48d9a1d into Stiffstream:0.7-dev-pr-213 Nov 26, 2024
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