bug-hurd
[Top][All Lists]
Advanced

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

[RFC] cleanup of #includes


From: Justus Winter
Subject: [RFC] cleanup of #includes
Date: Thu, 14 Nov 2013 12:41:30 +0100

Hi :)

I've been playing with include-what-you-use [0] (iwyu in
Debian). Unfortunately iwyu depends on clang-3.{3,4} which is not
currently avaliable on Debian/Hurd, so I'm using a horrible^Wingenious
hack that runs iwyu on Linux while the actual build runs on Hurd.

0: https://code.google.com/p/include-what-you-use/

iwyu is somewhat aggressive by default, e.g. it likes to pull
mach_port_allocate from mach-shortcuts.h. It can be tuned however, by
means of mapping files that map symbols or private header to public
headers. But, this makes the whole process a lot more manual than I
anticipated. So before I put any more time into this, I'd like to hear
your oppinion on the whole thing.

As an example of a patch generated here is a patch that fixes the
includes in libihash/ihash.c.

1. Do you consider the comment describing which symbols are pulled
   from the header as noise or worthwile information?

2. Do you consider it too noisy to include mach-shortcuts.h instead of
   mach.h for stuff like mach_port_allocate?

3. libihash/ihash.c includes <hurd/ihash.h>. Shouldn't it include
   "ihash.h" instead, so that it gets the local version instead of the
   one in /usr/include?

Cheers,
Justus




reply via email to

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