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
F170618138: D44382.id.diff
Sat, Sep 5, 4:16 PM
F170602376: D44382.id135920.diff
Sat, Sep 5, 2:36 PM
F170600699: D44382.id135974.diff
Sat, Sep 5, 2:26 PM
F170581928: D44382.id135974.diff
Sat, Sep 5, 12:28 PM
F170565110: D44382.id135920.diff
Sat, Sep 5, 10:45 AM
Unknown Object (File)
Fri, Sep 4, 5:24 PM
Unknown Object (File)
Fri, Sep 4, 9:38 AM
Unknown Object (File)
Thu, Sep 3, 10:22 PM
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