After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 535704 - Add guards to prevent including individual files
Add guards to prevent including individual files
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2008-05-30 09:51 UTC by Michael Natterer
Modified: 2008-06-05 09:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch implementing the above (27.37 KB, patch)
2008-05-30 09:52 UTC, Michael Natterer
committed Details | Review

Description Michael Natterer 2008-05-30 09:51:24 UTC
I've prepared a patch that allows to define ATK_DISABLE_SINGLE_INCLUDES
the same way it has been done in GLib and GTK+

Patch follows.
Comment 1 Michael Natterer 2008-05-30 09:52:23 UTC
Created attachment 111787 [details] [review]
Patch implementing the above

Also used G_BEGIN_DECLS and G_END_DECLS consistently in all headers.

Ok to commit?
Comment 2 Li Yuan 2008-06-05 07:33:58 UTC
Thanks for the patch.
Comment 3 Michael Natterer 2008-06-05 09:04:58 UTC
Committed to trunk:

2008-06-05  Michael Natterer  <mitch@imendio.com>

	Bug #535704:

	* configure.in: add G_DISABLE_SINGLE_INCLUDES and
	ATK_DISABLE_SINGLE_INCLUDES to CPPFLAGS.

	* atk/atk.h: define __ATK_H_INSIDE__ around including all other
	headers.

	* atk/atk*.h: add single-include guards that #error out if
	ATK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
	included individually. Use G_BEGIN_DECLS/G_END_DECLS in all files.

	* atk/Makefile.am: define ATK_COMPILATION while building ATK.
	Add single-include guards to the generated atk-enum-types.h too.