Page MenuHomeFreeBSD

lfs: Only define off64_t when _LARGEFILE64_SOURCE is defined
Needs ReviewPublic

Authored by imp on Sep 21 2023, 10:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 9, 9:40 PM
Unknown Object (File)
Nov 1 2025, 4:29 AM
Unknown Object (File)
Oct 22 2025, 3:15 PM
Unknown Object (File)
Oct 22 2025, 3:15 PM
Unknown Object (File)
Oct 22 2025, 2:28 AM
Unknown Object (File)
Oct 13 2025, 7:25 PM
Unknown Object (File)
Sep 4 2025, 2:29 AM
Unknown Object (File)
Aug 30 2025, 5:01 AM
Subscribers
None

Details

Reviewers
kib
cem
Summary

__LFS_VISIBLE controls visibility for the "large file sources" that was
defined by Sun. So put the off64_t behind this.

In addition, use __off64_t for cookie_seek_function_t typedef to not
require namespace polution for this to be present.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 53666
Build 50557: arc lint + arc unit

Event Timeline

imp requested review of this revision.Sep 21 2023, 10:17 PM
imp created this revision.
imp added a reviewer: cem.
lib/libc/stdio/fopencookie.c
118

I do not think we need changes to the .c files, off64_t should be visible with libc compilation setting.

lib/libc/stdio/fopencookie.c
118

I did this to match the prototype type, but you're right: we always have off64_t defined here.

One problem with this, is that off64_t isn't available in BSD_VISIBLE contexts, and the tree fails to build.
Which is why I actually changed the off64_t to __off64_t above and which is why today it fails in more places as we've adopted it in more CDDL code.
Need to rethink this a little still, despite my thinking it was ready to go.