Page MenuHomeFreeBSD

Improve header self-containment
AbandonedPublic

Authored by jfree on May 20 2023, 4:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 10:46 PM
Unknown Object (File)
Sat, Apr 6, 6:27 PM
Unknown Object (File)
Fri, Apr 5, 2:59 PM
Unknown Object (File)
Wed, Mar 27, 8:37 AM
Unknown Object (File)
Wed, Mar 27, 7:19 AM
Unknown Object (File)
Feb 16 2024, 6:08 AM
Unknown Object (File)
Jan 31 2024, 1:35 AM
Unknown Object (File)
Dec 21 2023, 8:04 PM
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