Page MenuHomeFreeBSD

sys/acl.h: move main typedefs to sys/_types.h
ClosedPublic

Authored by brooks on Mar 15 2024, 10:46 PM.
Tags
None
Referenced Files
F83259455: D44382.id135920.diff
Wed, May 8, 3:42 AM
Unknown Object (File)
Mon, May 6, 10:54 AM
Unknown Object (File)
Sun, May 5, 12:26 PM
Unknown Object (File)
Sat, May 4, 1:22 PM
Unknown Object (File)
Wed, May 1, 9:56 PM
Unknown Object (File)
Tue, Apr 30, 3:44 PM
Unknown Object (File)
Mon, Apr 29, 12:11 PM
Unknown Object (File)
Fri, Apr 26, 4:15 AM
Subscribers

Details

Summary

Make __ prefixed versions available without the pollution of sys/acl.h
(and by extension sys/param.h).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Why not define __acl_type_t in sys/_types.h instead?

In D44382#1012183, @kib wrote:

Why not define __acl_type_t in sys/_types.h instead?

I could do that (presumably declaring all of them), but that doesn't solve the problem of needing to include sys/acl.h unless I s/acl_type_t/__acl_type_t/ in syscalls.master or do a bit of macro magic in _libsys.h. I was particularly trying to avoid pulling in sys/param.h since that significantly increases the polution in libc_private.h (for example it requires removing the MIN macro in qsort.c). I'm fine with other solutions, but this one was low impact.

I was briefly tempted to either use macros or just edit syscalls.master adding __ prefixes to make it work with sys/_types.h instead of sys/types.h, but that seemed a fair bit of churn and would also require expanding u_int and u_long. We could still go that way (or use macros to do it) if that makes sense.

The intent was to use __acl_type_t in syscalls.master (and leaving it with sys/_types.h).

brooks retitled this revision from Define acl_type_t in sys/_acl_type_t.h to sys/acl.h: move main typedefs to sys/_types.h.Mar 18 2024, 9:29 PM
brooks edited the summary of this revision. (Show Details)

Declare __acl types in sys/_types.h

This revision is now accepted and ready to land.Mar 18 2024, 9:30 PM