[PATCH] Include sdk header dependencies and protect agains't multiple inclusion.

Paulo César Pereira de Andrade pcpa at mandriva.com.br
Wed Dec 10 22:45:30 PST 2008


  Hi,

  The attached patch is the result of "as few extra
inclusions as possible", by creating a dummy file
including just that header, and making it compile.
This was done in the loader directory, and I added
some extra -I for module headers, but including in
the build tree.

  I would like some feedback on if it would be correct to,
check in the build directory of the header if AM_CFLAGS
is defined somewhat like:
AM_CFLAGS = $(DIX_CFLAGS) ...

and in that case, ensure the header either itself does:
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
or include a header that has that in the start.

  There are also several different styles for the sequence
#ifndef HEADER_H
#define HEADER_H
...
#endif /* HEADER_H */

I used the _HEADER_H_ stype for headers without multiple
inclusion protection, as it appears to be the most common,
but without start/ending underlines is also very common.
Maybe a common style should be used ?


  Also, another question is about the generation of the
file sdksyms.c. What would be the better approach to have
a Makefile rule to regenerate sdksyms.c if sdksyms.o needs
to be regenerated due to a header being updated?

Paulo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Include-sdk-header-dependencies-and-protect-agains-t.patch
Type: text/x-patch
Size: 21254 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20081211/8a47615e/attachment.bin>


More information about the xorg mailing list