GNOME Bugzilla – Bug 158870
<config.h>
Last modified: 2006-01-14 07:01:24 UTC
Most of these files should include config.h first. In practical terms there will be potential problems when they use stat/open/fopen and friends, bit it is easier always to include config.h ./pango/pango-coverage.c ./pango/pangofc-fontmap.c ./pango/glyphstring.c ./pango/ellipsize.c ./pango/pangofc-decoder.c ./pango/pango-glyph-item.c ./pango/shape.c ./pango/reorder-items.c ./pango/pango-layout.c ./pango/mini-fribidi/fribidi_char_type.c ./pango/mini-fribidi/fribidi.c ./pango/mini-fribidi/fribidi_types.c ./pango/mini-fribidi/fribidi_get_type.c ./pango/pangowin32-fontcache.c ./pango/pango-item.c ./pango/pangoft2-render.c ./pango/fonts.c ./pango/pangoxft-render.c ./pango/pango-fontmap.c ./pango/pango-fontset.c ./pango/pango-tabs.c ./pango/opentype/otlbuffer.c ./pango/opentype/pango-ot-info.c ./pango/opentype/disasm.c ./pango/opentype/ottest.c ./pango/opentype/ftxgdef.c ./pango/opentype/ftxgpos.c ./pango/opentype/ftxgsub.c ./pango/opentype/ftxopen.c ./pango/opentype/pango-ot-ruleset.c ./pango/opentype/pango-ot-buffer.c ./pango/pango-attributes.c ./pango/pangoxft-fontmap.c ./pango/pango-engine.c ./pango/pango-script.c ./pango/pango-markup.c ./pango/pangox-fontcache.c ./pango/pangox-fontmap.c ./pango/pango-context.c ./pango/pangofc-font.c ./pango/break.c ./pango/pango-renderer.c ./pango/mapping.c ./pango/pango-color.c ./tools/gen-script-for-lang.c ./modules/thai/thai-fc.c ./modules/thai/thai-ot.c ./modules/basic/basic-x.c ./modules/basic/basic-fc.c ./modules/indic/mprefixups.c ./modules/indic/indic-ot-class-tables.c ./modules/indic/indic-fc.c ./modules/indic/indic-ot.c ./modules/arabic/arabic-fc.c ./modules/arabic/arabic-ot.c ./modules/hangul/hangul-fc.c ./modules/hebrew/hebrew-shaper.c ./modules/hebrew/hebrew-fc.c
The recommended way to do it is: #if HAVE_CONFIG_H # include <config.h> #endif in every C file and usually before any other include. Do we want that?
#ifdef HAVE_CONFIG_H is just noise in my estimation. A project shouldn't be optionally compilable either way. I don't have any problem with adding #include <config.h> in all files; we do that for GLib/GTK+.
Created attachment 56898 [details] [review] adds config.h Followed Owen's advice: no #ifdef HAVE_CONFIG_H
Thanks. Applied after some cleaning up and fixing new files, etc... Now on all .c files have #include <config.h> as the first include, except for generated sources. 2006-01-14 Behdad Esfahbod <behdad@gnome.org> * */*.c, */*/*.c: Make sure #include <config.h> is the first include in the file. (bug #158870, based on patch by Luis Menina)