Page MenuHomeFreeBSD

Improve header self-containment
AbandonedPublic

Authored by jfree on May 20 2023, 4:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 10, 11:49 AM
Unknown Object (File)
Fri, Dec 5, 9:35 AM
Unknown Object (File)
Thu, Nov 27, 10:07 AM
Unknown Object (File)
Wed, Nov 26, 5:44 AM
Unknown Object (File)
Nov 13 2025, 2:41 PM
Unknown Object (File)
Nov 8 2025, 7:56 AM
Unknown Object (File)
Nov 8 2025, 4:43 AM
Unknown Object (File)
Nov 8 2025, 4:43 AM
Subscribers

Details

Summary

For each header below, add appropriate #includes to make them self-contained.

vfp.h:

  • sys/types.h
  • sys/ucontext.h: mcontext32_vfp_t

debug_monitor.h:

  • sys/types.h

_lock.h:

  • sys/types.h

_mutex.h:

  • sys/types.h
  • sys/_lock.h: struct lock_object

resourcevar.h:

  • sys/types.h
  • sys/time.h: struct itimerval

user.h:

  • sys/param.h: MAXCOMLEN
  • sys/priority.h: struct priority
  • sys/syslimits.h: PATH_MAX

priority.h:

  • sys/types.h

freebsd32.h:

  • sys/mount.h: fsid_t

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jfree requested review of this revision.May 20 2023, 4:34 AM

There's a general preference to include sys/_types.h instead of sys/types.h
Otherwise, this looks good... I'd be tempted to do one commit per file to make MFC and backout easier.

In D40177#914781, @imp wrote:

There's a general preference to include sys/_types.h instead of sys/types.h

It looks like including sys/_types.h does not define types like uint32_t and uint64_t. I still get compilation errors for every file in this review when replacing sys/types.h with sys/_types.h.

In D40177#914781, @imp wrote:

There's a general preference to include sys/_types.h instead of sys/types.h

It looks like including sys/_types.h does not define types like uint32_t and uint64_t. I still get compilation errors for every file in this review when replacing sys/types.h with sys/_types.h.

There's two answers for that... if it's user visible, those should be __uint32_t, etc... But if it is kernel private (the whole file), then maybe sys/types.h is fine..

Update diff to include context