qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-4.0 v7 01/27] qapi: make sure osdep.h is inc


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH for-4.0 v7 01/27] qapi: make sure osdep.h is included in type headers
Date: Wed, 12 Dec 2018 07:48:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Daniel P. Berrangé <address@hidden> writes:

> On Mon, Dec 10, 2018 at 02:28:26PM +0100, Markus Armbruster wrote:
[...]
>> checkpatch.pl could flag patches adding .c files that don't include
>> "qemu/osdep.h" first.  The "first" part might be a bit annoying to code.
>
> You can get this logic from GNULIBs syntax-check make rules. It uses
> this perl code to check that config.h is included first:
>
>     while (<>) {
>         if (/^# *include\b/) {
>             if (not m{^# *include <config\.h>}) {
>                 print "$ARGV\n";
>                 $$ret = 1;
>             }
>             close ARGV;
>         }
>     }

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]