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)
Nov 28 2024, 7:13 AM
Unknown Object (File)
Oct 3 2024, 12:06 PM
Unknown Object (File)
Oct 1 2024, 11:01 AM
Unknown Object (File)
Sep 27 2024, 10:13 PM
Unknown Object (File)
Sep 27 2024, 7:27 PM
Unknown Object (File)
Sep 23 2024, 1:12 PM
Unknown Object (File)
Sep 21 2024, 5:57 AM
Unknown Object (File)
Sep 16 2024, 12:54 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.