Page MenuHomeFreeBSD

Remove hacks to support lint from system headers and MD x86 headers.
ClosedPublic

Authored by kib on Nov 19 2017, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 1:05 AM
Unknown Object (File)
Mon, Apr 22, 1:05 AM
Unknown Object (File)
Mon, Apr 22, 1:05 AM
Unknown Object (File)
Mon, Apr 22, 1:05 AM
Unknown Object (File)
Mon, Apr 22, 12:53 AM
Unknown Object (File)
Mar 19 2024, 8:03 AM
Unknown Object (File)
Jan 14 2024, 5:41 AM
Unknown Object (File)
Jan 1 2024, 8:54 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

LGTM

sys/x86/include/ucontext.h
165 ↗(On Diff #35454)

Hm, why was it __LINT__ and not just lint here?

This revision is now accepted and ready to land.Nov 19 2017, 3:32 PM
sys/x86/include/ucontext.h
165 ↗(On Diff #35454)

I cannot remember this.

Note that using #ifdef lint breaks user namespace, because user code is allowed to utilize the lint identifier, in particular, to define the symbol before including implementation headers. Then the system functionality is broken.

Looks good. One comment about LINT and one minor nit with varargs for super-duper old-school compilers we don't support anyway.

sys/x86/include/stdarg.h
62–63 ↗(On Diff #35454)

I'm not sure how providing these after #error is useful.

sys/x86/include/ucontext.h
165 ↗(On Diff #35454)

The 'lint' is old school identifier. It was defined all the way back to the earliest days of lint (so Unix v6 at least or the mid 1970's, likely earlier). LINT is the design pattern replacement for the old-school constructs like this. However, it isn't documented in the lint man page. And it appears to have snuck in unannounced in a rather poorly worded commit:

Merge conflicts, fix Makefiles and remove (re)moved file(s).

which was done by markm in 2002. It's likely better documented in NetBSD where I think these changes originated to lint originated.

This change was by kib when he rearranged things, and represents the only use of LINT in the tree I could find.

jhb added inline comments.
include/stdlib.h
241 ↗(On Diff #35454)

The comment still references lint so needs updating?

sys/amd64/include/asm.h
97 ↗(On Diff #35454)

We most often use '!STRIP_FBSDID' style for these comments now.

sys/amd64/include/pcpu.h
243 ↗(On Diff #35454)

Perhaps appreviate as '!GNUCLIKE_ASM || !GNUCLIKE__TYPEOF' based on patterns we have in other headers (such as atomic.h)

247 ↗(On Diff #35454)

The punctuation in the old comment was correct, but I would probably use 'GNUCLIKEASM && GNUCLIKETYPEOF' as the comment instead.

sys/x86/include/stdarg.h
62–63 ↗(On Diff #35454)

I would probably be inclined to drop them as well. We aren't likely to support these types of compilers in the future.

kib marked 6 inline comments as done.Nov 21 2017, 8:04 PM

Handle jhb comments, mostly adjusting comments, but also removing sample dummy implementation of vararg helpers in #error case.

This revision now requires review to proceed.Nov 21 2017, 8:07 PM
This revision is now accepted and ready to land.Nov 21 2017, 9:36 PM
This revision was automatically updated to reflect the committed changes.