diff --git a/scripts/cstyle.pl b/scripts/cstyle.pl index 5483c3fe7..123020b08 100755 --- a/scripts/cstyle.pl +++ b/scripts/cstyle.pl @@ -695,10 +695,13 @@ line: while (<$filehandle>) { err("unary * followed by space"); } } - if ($check_posix_types) { + if ($check_posix_types && !$in_macro_call) { # try to detect old non-POSIX types. # POSIX requires all non-standard typedefs to end in _t, # but historically these have been used. + # + # We don't check inside macro invocations because macros have + # legitmate uses for these names in function generators. if (/\b(unchar|ushort|uint|ulong|u_int|u_short|u_long|u_char|quad)\b/) { err("non-POSIX typedef $1 used: use $old2posix{$1} instead"); }